| Main index | Section 3 | 日本語 | Options |
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if_dl.h>
For link_addr(), the string addr may contain an optional network interface identifier of the form "name unit-number", suitable for the first argument to ifconfig(8), followed in all cases by a colon and an interface address in the form of groups of hexadecimal digits separated by periods. Each group represents a byte of address; address bytes are filled left to right from low order bytes through high order bytes.
Thus le0:8.0.9.13.d.30 represents an ethernet address to be transmitted on the first Lance ethernet interface.
The function link_addr() should diagnose improperly formed input, and there should be an unambiguous way to recognize this.
If the sdl_len field of the link socket address sdl is 0, link_ntoa() will not insert a colon before the interface address bytes. If this translated address is given to link_addr() without inserting an initial colon, the latter will not interpret it correctly.
| LINK_ADDR (3) | February 28, 2007 |
| Main index | Section 3 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | "I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act." | ” |
| — Ken Pier, Xerox PARC | ||