Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ether(3X) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ETHER(3X)  —  Silicon Graphics

NAME

ether − monitor traffic on the Ethernet

SYNOPSIS

#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 */
};

FILES

/usr/lib/librpcsvc.aRPC services library

NOTE

To compile and link a program that calls any of these routines, use a compile command of the form:

cc −I/usr/include/sun −I/usr/include/bsd prog.c −lrpcsvc −lsun −lbsd

Version 3.6  —  December 20, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026