ETHER(3R) — RPC SERVICES
NAME
ether − monitor traffic on the Ethernet
SYNPOSIS
#include <rpcsvc/ether.h>
RPC INFO
program number:
ETHERPROG
xdr routines:
xdr_etherstat(xdrs, es)
XDR ∗xdrs;
struct etherstat ∗es;
xdr_etheraddrs(xdrs, ea)
XDR ∗xdrs;
struct etheraddrs ∗ea;
xdr_etherhtable(xdrs, hm)
XDR ∗xdrs;
struct etherhmem ∗∗hm;
xdr_etherhmem(xdrs, hm)
XDR ∗xdrs;
struct etherhmem ∗∗hm;
xdr_etherhbody(xdrs, hm)
XDR ∗xdrs;
struct etherhmem ∗hm;
xdr_addrmask(xdrs, am)
XDR ∗xdrs;
struct addrmask ∗am;
Xdr_etherhmem processes a single etherhmem structure. Xdr_etherhtable processes an array of HASHSIZE ∗struct etherhmems. The ∗∗etherhmem field of etheraddrs is actually a hashtable, that is, it is a pointer to an array of HASHSIZE hmem pointers.
procs:
ETHERPROC_GETDATA
no args, returns struct etherstat
ETHERPROC_ON
no args or results, puts server in promiscuous mode
ETHERPROC_OFF
no args or results, puts server in promiscuous mode
ETHERPROC_GETSRCDATA
no args, returns struct etheraddrs with information
about source of packets
ETHERPROC_GETDSTDATA
no args, returns struct etheraddrs with information
about destination of packets
ETHERPROC_SELECTSRC
takes struct mask as argument, no results
sets a mask for source
ETHERPROC_SELECTDST
takes struct mask as argument, no results
sets a mask for dst
ETHERPROC_SELECTPROTO
takes struct mask as argument, no results
sets a mask for proto
ETHERPROC_SELECTLNTH
takes struct mask as argument, no results
sets a mask for lnth
versions:
ETHERVERS_ORIG
structures:
/∗
∗ all ether stat’s except src, dst addresses
∗/
struct etherstat {
struct timevale_time;
unsigned longe_bytes;
unsigned longe_packets;
unsigned longe_bcast;
unsigned longe_size[NBUCKETS];
unsigned longe_proto[NPROTOS];
};
/∗
∗ member of address hash table
∗/
struct etherhmem {
int h_addr;
unsigned h_cnt;
struct etherhmem ∗h_nxt;
};
/∗
∗ src, dst address info
∗/
struct etheraddrs {
struct timevale_time;
unsigned longe_bytes;
unsigned longe_packets;
unsigned longe_bcast;
struct etherhmem ∗∗e_addrs;
};
/∗
∗ for size, a_addr is lowvalue, a_mask is high value
∗/
struct addrmask {
int a_addr;
int a_mask;/∗ 0 means wild card ∗/
};
SEE ALSO
traffic(1C), etherfind(8C), etherd(8C)
Sun Release 3.2 — Last change: 10 August 1985