add missing control messages to the manual page, including addmulti, remmulti, scanbs, bridge and headersonly. Notes: Fri May 7 12:21:19 EDT 2010 geoff see ip(3), not ether(3). Reference: /n/sources/patch/maybe/man-ether Date: Thu May 6 15:32:17 CES 2010 Signed-off-by: quanstro@quantro.net Reviewed-by: geoff --- /sys/man/3/ether Thu May 6 15:30:49 2010 +++ /sys/man/3/ether Thu May 6 15:30:48 2010 @@ -67,8 +67,8 @@ is a decimal integer constant identifying the Ethernet packet type. A type of \-1 enables the connection to receive copies of packets of all types. A type of \-2 enables the connection to receive copies of -the first 64 bytes of packets of all types. -If multiple connections are assigned to a given packet type +the first 64 bytes of packets of all types. Other types must be unique. +If multiple connections may receive a given packet type, a copy of each packet is passed up each connection. .PP Some interfaces also accept unique options when written to the @@ -94,9 +94,20 @@ contains device-specific data and statistics about the card. .PP An interface normally receives only those packets whose -destination address is that of the interface or is the +destination address is that of the interface, the broadcast address, -.BR ff:ff:ff:ff:ff:ff . +.BR ff:ff:ff:ff:ff:ff , +or a a multicast address assigned to the interface. +Multicast addresses are added by writing +.B addmulti +.I ea +and remove by writing +.B remmulti +.I ea +to the +.B ctl +file. Multicast addresses are automatically dropped when +the connection is closed. The interface can be made to receive all packets on the network by writing the string .B promiscuous @@ -104,8 +115,35 @@ .B ctl file. The interface remains promiscuous until the control file is -closed. -The extra packets are passed up connections only of types \-1 -and \-2. +closed by all connections requesting promiscuous mode. +The extra packets are passed up connections of types \-1 +and \-2 only. +.PP +Writing +.B bridge +to the +.B ctl +file causes loop back packets to be ignored. This is useful for +layer 3 bridging. +Writing +.B scanbs +[ +.I secs +] +starts a scan for wireless base stations and sets the +scanning interval to +.IR secs. +Scanning is terminated when the connection is closed. +The default interval is 5s. +For wired connections, this command is ignored. +.PP +Writing +.B headersonly +causes the connection to return only the first +58 bytes of the packet followed by a two-byte +length and a four-byte time in machine ticks. +Both numbers are in big-endian format. .SH SOURCE .B /sys/src/9/*/devether.c +.br +.B /sys/src/9/port/netif.c