This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

DHCPClient Element Documentation

NAME

DHCPClient -- Click element; The core of the DHCP Client. The state machine resides in this element.

SYNOPSIS

DHCPClient(ETH [, keywords])

Ports: 1 input, 2-3 outputs
Processing: push
Package: dhcp

DESCRIPTION

DHCPClient has at least 2 outgoing ports. Port 0 is designated for all broadcast packets. Port 1 is designated for all unicast packets. Invalid packets are output on port 2, if it exists; otherwise they are dropped. Keyword arguments are:

IP
The client's current IP address, if any.
LEASE_CALL
A write handler to be called when the client gets a new lease, or loses its current lease. The write handler is called with additional arguments consisting of the new lease description (see the 'lease' handler below).

ELEMENT HANDLERS

addr (read-only)
Returns the client's current IP address.
server (read-only)
Returns the server's current IP address.
lease (read/write)
The read handler returns information about the currently active DHCP lease. If a lease is active, the format is "true MYIP SRVIP START END", where MYIP is the client's current IP address, SRVIP is the server's current IP address, and START and END are times in seconds. If no lease is active, the format is "false MYIP", where MYIP is the client's most recently active IP address. The write handler expects a string in the same format, and sets the current lease accordingly.
release (write-only)
When written, releases the currently active DHCP lease, if any.

EXAMPLES

  dhcpc :: DHCPClient(00:11:22:33:44, LEASE_CALL newlease.run)
        -> UDPIPEncap(0.0.0.0, bootpc, 255.255.255.255, bootps)
        -> ...;
  dhcpc[1] -> dhcp_udp :: UDPIPEncap(0.0.0.0, bootpc, 255.255.255.255, bootps)
        -> ...;
  newlease :: Script(TYPE PASSIVE,
        goto end $(not $1),
        write dhcp_udp.src $2,
        write dhcp_udp.dst $3);

Generated by 'click-elem2man' from 'package/dhcpclient.hh:11' on 17/Jan/2012.

COMMENTS

 
elements/dhcpclient.txt · Last modified: 2012/01/17 10:22 (external edit)
 
Recent changes RSS feed Driven by DokuWiki