**This is automatically generated documentation.** Edit after the "[[#COMMENTS|COMMENTS]]" heading; changes to the main body will be lost. ====== AddressInfo Element Documentation ====== ===== NAME ===== **AddressInfo** -- Click element; specifies address information ===== SYNOPSIS ===== AddressInfo(NAME ADDRESS [ADDRESS...], ...) **Ports**: None\\ **Package**: standard (core)\\ ===== DESCRIPTION ===== Lets you use mnemonic names for IPv4 and IPv6 addresses, IPv4 and IPv6 address prefixes, and Ethernet addresses. Each argument has the form `NAME ADDRESS [ADDRESS...]', which associates the given ADDRESSes with NAME. For example, if a configuration contains this AddressInfo element, AddressInfo(mauer 10.0.0.1, mazu 10.0.0.10); then other configuration strings can use ''mauer'' and ''mazu'' as mnemonics for the IP addresses 10.0.0.1 and 10.0.0.10, respectively. The mnemonic names introduced by AddressInfo elements are local with respect to compound elements. That is, names created inside a compound element apply only within that compound element and its subelements. For example: AddressInfo(mauer 10.0.0.1); compound :: { AddressInfo(mazu 10.0.0.10); ... -> IPEncap(6, mauer, mazu) -> ... // OK }; ... -> IPEncap(6, mauer, mazu) -> ... // error: `mazu' undefined Any name can be simultaneously associated with an IP address, an IP network address, and an Ethernet address. The kind of address that is returned is generally determined from context. For example: AddressInfo(mauer 10.0.0.1/8 00-50-BA-85-84-A9); ... -> IPEncap(6, mauer, ...) // as IP address -> EtherEncap(0x0800, mauer, ...) -> ... // as Ethernet address ... -> ARPResponder(mauer) -> ... // as IP prefix AND Ethernet address! An optional suffix makes the context unambiguous. ''NAME'' is an ambiguous reference to some address, but ''NAME:ip'' is always an IPv4 address, ''NAME:ipnet'' is always an IPv4 network address (IPv4 address prefix), ''NAME:ip6'' is always an IPv6 address, ''NAME:ip6net'' is always an IPv6 network address, and ''NAME:eth'' is always an Ethernet address. If ''NAME:ipnet'' is a valid IPv4 network address, then ''NAME:bcast'' is a valid IPv4 address equaling the broadcast address for that network. This is obtained by setting all the host bits in the address prefix to 1. ===== DEFAULT ADDRESSES ===== If you do not define an address for a given name, AddressInfo will use the default, if any. Defaults are as follows: ? **%%*%%** ! If DEVNAME is the name of an Ethernet device, then ''DEVNAME:eth'' defaults to DEVNAME's Ethernet address. (At userlevel, this works only on BSD and Linux.) ? **%%*%%** ! ''DEVNAME:ip'' defaults to the first primary IPv4 address associated with the device DEVNAME. These defaults are not available on all platforms. ===== SEE ALSO ===== [[PortInfo]] Generated by 'click-elem2man' from '../include/click/standard/addressinfo.hh' on 7/Mar/2009. ===== COMMENTS =====