Let the compiler do the optimizations (or not) based on build options.
Avoid 'value has been optimized out' messages in gdb using '-O0'.
const char *
intoa(uint32_t addr)
{
- register char *cp;
- register u_int byte;
- register int n;
+ char *cp;
+ u_int byte;
+ int n;
static char buf[sizeof(".xxx.xxx.xxx.xxx")];
NTOHL(addr);
const char *
getname(netdissect_options *ndo, const u_char *ap)
{
- register struct hostent *hp;
+ struct hostent *hp;
uint32_t addr;
struct hnamemem *p;
const char *
getname6(netdissect_options *ndo, const u_char *ap)
{
- register struct hostent *hp;
+ struct hostent *hp;
union {
struct in6_addr addr;
struct for_hash_addr {
} addra;
} addr;
struct h6namemem *p;
- register const char *cp;
+ const char *cp;
char ntop_buf[INET6_ADDRSTRLEN];
memcpy(&addr, ap, sizeof(addr));
static inline struct enamemem *
lookup_emem(netdissect_options *ndo, const u_char *ep)
{
- register u_int i, j, k;
+ u_int i, j, k;
struct enamemem *tp;
k = (ep[0] << 8) | ep[1];
*/
static inline struct bsnamemem *
-lookup_bytestring(netdissect_options *ndo, register const u_char *bs,
+lookup_bytestring(netdissect_options *ndo, const u_char *bs,
const unsigned int nlen)
{
struct bsnamemem *tp;
- register u_int i, j, k;
+ u_int i, j, k;
if (nlen >= 6) {
k = (bs[0] << 8) | bs[1];
/* Find the hash node that corresponds the NSAP 'nsap' */
static inline struct enamemem *
-lookup_nsap(netdissect_options *ndo, register const u_char *nsap,
- register u_int nsap_length)
+lookup_nsap(netdissect_options *ndo, const u_char *nsap,
+ u_int nsap_length)
{
- register u_int i, j, k;
+ u_int i, j, k;
struct enamemem *tp;
const u_char *ensap;
static inline struct protoidmem *
lookup_protoid(netdissect_options *ndo, const u_char *pi)
{
- register u_int i, j;
+ u_int i, j;
struct protoidmem *tp;
/* 5 octets won't be aligned */
}
const char *
-etheraddr_string(netdissect_options *ndo, register const u_char *ep)
+etheraddr_string(netdissect_options *ndo, const u_char *ep)
{
- register int i;
- register char *cp;
- register struct enamemem *tp;
+ int i;
+ char *cp;
+ struct enamemem *tp;
int oui;
char buf[BUFSIZE];
le64addr_string(netdissect_options *ndo, const u_char *ep)
{
const unsigned int len = 8;
- register u_int i;
- register char *cp;
- register struct bsnamemem *tp;
+ u_int i;
+ char *cp;
+ struct bsnamemem *tp;
char buf[BUFSIZE];
tp = lookup_bytestring(ndo, ep, len);
linkaddr_string(netdissect_options *ndo, const u_char *ep,
const unsigned int type, const unsigned int len)
{
- register u_int i;
- register char *cp;
- register struct bsnamemem *tp;
+ u_int i;
+ char *cp;
+ struct bsnamemem *tp;
if (len == 0)
return ("<empty>");
const char *
etherproto_string(netdissect_options *ndo, u_short port)
{
- register char *cp;
- register struct hnamemem *tp;
- register uint32_t i = port;
+ char *cp;
+ struct hnamemem *tp;
+ uint32_t i = port;
char buf[sizeof("0000")];
for (tp = &eprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
#define ISONSAP_MAX_LENGTH 20
const char *
isonsap_string(netdissect_options *ndo, const u_char *nsap,
- register u_int nsap_length)
+ u_int nsap_length)
{
- register u_int nsap_idx;
- register char *cp;
- register struct enamemem *tp;
+ u_int nsap_idx;
+ char *cp;
+ struct enamemem *tp;
if (nsap_length < 1 || nsap_length > ISONSAP_MAX_LENGTH)
return ("isonsap_string: illegal length");
const char *
tcpport_string(netdissect_options *ndo, u_short port)
{
- register struct hnamemem *tp;
- register uint32_t i = port;
+ struct hnamemem *tp;
+ uint32_t i = port;
char buf[sizeof("00000")];
for (tp = &tporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
}
const char *
-udpport_string(netdissect_options *ndo, register u_short port)
+udpport_string(netdissect_options *ndo, u_short port)
{
- register struct hnamemem *tp;
- register uint32_t i = port;
+ struct hnamemem *tp;
+ uint32_t i = port;
char buf[sizeof("00000")];
for (tp = &uporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
const char *
ipxsap_string(netdissect_options *ndo, u_short port)
{
- register char *cp;
- register struct hnamemem *tp;
- register uint32_t i = port;
+ char *cp;
+ struct hnamemem *tp;
+ uint32_t i = port;
char buf[sizeof("0000")];
for (tp = &ipxsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
init_servarray(netdissect_options *ndo)
{
struct servent *sv;
- register struct hnamemem *table;
- register int i;
+ struct hnamemem *table;
+ int i;
char buf[sizeof("0000000000")];
while ((sv = getservent()) != NULL) {
static void
init_eprotoarray(netdissect_options *ndo)
{
- register int i;
- register struct hnamemem *table;
+ int i;
+ struct hnamemem *table;
for (i = 0; eproto_db[i].s; i++) {
int j = htons(eproto_db[i].p) & (HASHNAMESIZE-1);
static void
init_protoidarray(netdissect_options *ndo)
{
- register int i;
- register struct protoidmem *tp;
+ int i;
+ struct protoidmem *tp;
const struct protoidlist *pl;
u_char protoid[5];
static void
init_etherarray(netdissect_options *ndo)
{
- register const struct etherlist *el;
- register struct enamemem *tp;
+ const struct etherlist *el;
+ struct enamemem *tp;
#ifdef USE_ETHER_NTOHOST
char name[256];
#else
- register struct pcap_etherent *ep;
- register FILE *fp;
+ struct pcap_etherent *ep;
+ FILE *fp;
/* Suck in entire ethers file */
fp = fopen(PCAP_ETHERS_FILE, "r");
static void
init_ipxsaparray(netdissect_options *ndo)
{
- register int i;
- register struct hnamemem *table;
+ int i;
+ struct hnamemem *table;
for (i = 0; ipxsap_db[i].s != NULL; i++) {
int j = htons(ipxsap_db[i].v) & (HASHNAMESIZE-1);
const char *
dnaddr_string(netdissect_options *ndo, u_short dnaddr)
{
- register struct hnamemem *tp;
+ struct hnamemem *tp;
for (tp = &dnaddrtable[dnaddr & (HASHNAMESIZE-1)]; tp->nxt != NULL;
tp = tp->nxt)
struct hnamemem *
newhnamemem(netdissect_options *ndo)
{
- register struct hnamemem *p;
+ struct hnamemem *p;
static struct hnamemem *ptr = NULL;
static u_int num = 0;
struct h6namemem *
newh6namemem(netdissect_options *ndo)
{
- register struct h6namemem *p;
+ struct h6namemem *p;
static struct h6namemem *ptr = NULL;
static u_int num = 0;
extern const char *etherproto_string(netdissect_options *, u_short);
extern const char *tcpport_string(netdissect_options *, u_short);
extern const char *udpport_string(netdissect_options *, u_short);
-extern const char *isonsap_string(netdissect_options *, const u_char *, register u_int);
+extern const char *isonsap_string(netdissect_options *, const u_char *, u_int);
extern const char *dnaddr_string(netdissect_options *, u_short);
extern const char *ipxsap_string(netdissect_options *, u_short);
extern const char *getname(netdissect_options *, const u_char *);
int
ascii_strcasecmp(const char *s1, const char *s2)
{
- register const unsigned char *cm = charmap,
+ const unsigned char *cm = charmap,
*us1 = (const unsigned char *)s1,
*us2 = (const unsigned char *)s2;
}
int
-ascii_strncasecmp(const char *s1, const char *s2, register size_t n)
+ascii_strncasecmp(const char *s1, const char *s2, size_t n)
{
- register const unsigned char *cm = charmap,
+ const unsigned char *cm = charmap,
*us1 = (const unsigned char *)s1,
*us2 = (const unsigned char *)s2;
init_crc10_table(void)
{
#define CRC10_POLYNOMIAL 0x633
- register int i, j;
- register uint16_t accum;
+ int i, j;
+ uint16_t accum;
uint16_t verify_crc10_table[256];
for ( i = 0; i < 256; i++ )
uint16_t
verify_crc10_cksum(uint16_t accum, const u_char *p, int length)
{
- register int i;
+ int i;
for ( i = 0; i < length; i++ )
{
int32_t
gmt2local(time_t t)
{
- register int dt, dir;
- register struct tm *gmt, *loc;
+ int dt, dir;
+ struct tm *gmt, *loc;
struct tm sgmt;
if (t == 0)
uint16_t
in_cksum(const struct cksum_vec *vec, int veclen)
{
- register const uint16_t *w;
- register int sum = 0;
- register int mlen = 0;
+ const uint16_t *w;
+ int sum = 0;
+ int mlen = 0;
int byte_swapped = 0;
union {
getservent(void)
{
char *p;
- register char *cp, **q;
+ char *cp, **q;
if (servf == NULL && (servf = fopen(etc_path(__PATH_SERVICES), "r")) == NULL)
return (NULL);
size_t
strlcat(char *dst, const char *src, size_t siz)
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
size_t
strlcpy(char *dst, const char *src, size_t siz)
{
- register char *d = dst;
- register const char *s = src;
- register size_t n = siz;
+ char *d = dst;
+ const char *s = src;
+ size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0) {
char *
strsep(char **stringp, const char *delim)
{
- register char *s;
- register const char *spanp;
- register int c, sc;
+ char *s;
+ const char *spanp;
+ int c, sc;
char *tok;
if ((s = *stringp) == NULL)
/* pointer to void function to output stuff */
void (*ndo_default_print)(netdissect_options *,
- register const u_char *bp, register u_int length);
+ const u_char *bp, u_int length);
/* pointer to function to do regular output */
int (*ndo_printf)(netdissect_options *,
/* The printer routines. */
extern void aarp_print(netdissect_options *, const u_char *, u_int);
-extern int ah_print(netdissect_options *, register const u_char *);
+extern int ah_print(netdissect_options *, const u_char *);
extern void ahcp_print(netdissect_options *, const u_char *, const u_int);
extern void aodv_print(netdissect_options *, const u_char *, u_int, int);
extern void aoe_print(netdissect_options *, const u_char *, const u_int);
extern void carp_print(netdissect_options *, const u_char *, u_int, int);
extern void cdp_print(netdissect_options *, const u_char *, u_int, u_int);
extern void cfm_print(netdissect_options *, const u_char *, u_int);
-extern u_int chdlc_print(netdissect_options *, register const u_char *, u_int);
+extern u_int chdlc_print(netdissect_options *, const u_char *, u_int);
extern void cisco_autorp_print(netdissect_options *, const u_char *, u_int);
extern void cnfp_print(netdissect_options *, const u_char *);
extern void dccp_print(netdissect_options *, const u_char *, const u_char *, u_int);
extern int ethertype_print(netdissect_options *, u_short, const u_char *, u_int, u_int, const struct lladdr_info *, const struct lladdr_info *);
extern u_int fddi_print(netdissect_options *, const u_char *, u_int, u_int);
extern void forces_print(netdissect_options *, const u_char *, u_int);
-extern u_int fr_print(netdissect_options *, register const u_char *, u_int);
+extern u_int fr_print(netdissect_options *, const u_char *, u_int);
extern int frag6_print(netdissect_options *, const u_char *, const u_char *);
extern void ftp_print(netdissect_options *, const u_char *, u_int);
extern void geneve_print(netdissect_options *, const u_char *, u_int);
extern void ipN_print(netdissect_options *, const u_char *, u_int);
extern void ip_print(netdissect_options *, const u_char *, u_int);
extern void ip_print_inner(netdissect_options *, const u_char *, u_int, u_int nh, const u_char *);
-extern void ipcomp_print(netdissect_options *, register const u_char *);
+extern void ipcomp_print(netdissect_options *, const u_char *);
extern void ipx_netbios_print(netdissect_options *, const u_char *, u_int);
extern void ipx_print(netdissect_options *, const u_char *, u_int);
extern void isakmp_print(netdissect_options *, const u_char *, u_int, const u_char *);
extern void lwres_print(netdissect_options *, const u_char *, u_int);
extern void m3ua_print(netdissect_options *, const u_char *, const u_int);
extern void medsa_print(netdissect_options *, const u_char *, u_int, u_int, const struct lladdr_info *, const struct lladdr_info *);
-extern u_int mfr_print(netdissect_options *, register const u_char *, u_int);
+extern u_int mfr_print(netdissect_options *, const u_char *, u_int);
extern void mobile_print(netdissect_options *, const u_char *, u_int);
extern int mobility_print(netdissect_options *, const u_char *, const u_char *);
extern void mpcp_print(netdissect_options *, const u_char *, u_int);
extern void nfsreply_print(netdissect_options *, const u_char *, u_int, const u_char *);
extern void nfsreply_noaddr_print(netdissect_options *, const u_char *, u_int, const u_char *);
extern void nfsreq_noaddr_print(netdissect_options *, const u_char *, u_int, const u_char *);
-extern const u_char * ns_nprint (netdissect_options *, register const u_char *, register const u_char *);
+extern const u_char * ns_nprint (netdissect_options *, const u_char *, const u_char *);
extern void domain_print(netdissect_options *, const u_char *, u_int, int);
extern void nsh_print(netdissect_options *ndo, const u_char *bp, u_int len);
extern void ntp_print(netdissect_options *, const u_char *, u_int);
extern void pgm_print(netdissect_options *, const u_char *, u_int, const u_char *);
extern void pim_print(netdissect_options *, const u_char *, u_int, const u_char *);
extern void pimv1_print(netdissect_options *, const u_char *, u_int);
-extern u_int ppp_print(netdissect_options *, register const u_char *, u_int);
+extern u_int ppp_print(netdissect_options *, const u_char *, u_int);
extern u_int pppoe_print(netdissect_options *, const u_char *, u_int);
extern void pptp_print(netdissect_options *, const u_char *);
extern int print_unknown_data(netdissect_options *, const u_char *, const char *, int);
extern void rsvp_print(netdissect_options *, const u_char *, u_int);
extern int rt6_print(netdissect_options *, const u_char *, const u_char *);
extern void rtsp_print(netdissect_options *, const u_char *, u_int);
-extern void rx_print(netdissect_options *, register const u_char *, u_int, u_int, u_int, const u_char *);
+extern void rx_print(netdissect_options *, const u_char *, u_int, u_int, u_int, const u_char *);
extern void sctp_print(netdissect_options *, const u_char *, const u_char *, u_int);
extern void sflow_print(netdissect_options *, const u_char *, u_int);
extern void sip_print(netdissect_options *, const u_char *, u_int);
extern u_int token_print(netdissect_options *, const u_char *, u_int, u_int);
extern void udld_print(netdissect_options *, const u_char *, u_int);
extern void udp_print(netdissect_options *, const u_char *, u_int, const u_char *, int);
-extern int vjc_print(netdissect_options *, register const u_char *, u_short);
-extern void vqp_print(netdissect_options *, register const u_char *, register u_int);
+extern int vjc_print(netdissect_options *, const u_char *, u_short);
+extern void vqp_print(netdissect_options *, const u_char *, u_int);
extern void vrrp_print(netdissect_options *, const u_char *, u_int, const u_char *, int);
extern void vtp_print(netdissect_options *, const u_char *, u_int);
extern void vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len);
static int is_UCX(const unsigned char *, u_int);
void
-Parse_fh(register const unsigned char *fh, u_int len, my_fsid *fsidp,
+Parse_fh(const unsigned char *fh, u_int len, my_fsid *fsidp,
uint32_t *inop,
const char **osnamep, /* if non-NULL, return OS name here */
const char **fsnamep, /* if non-NULL, return server fs name here (for VMS) */
int ourself) /* true if file handle was generated on this host */
{
- register const unsigned char *fhp = fh;
+ const unsigned char *fhp = fh;
uint32_t temp;
int fhtype = FHT_UNKNOWN;
u_int i;
static int
is_UCX(const unsigned char *fhp, u_int len)
{
- register u_int i;
+ u_int i;
int seen_null = 0;
/*
#include "extract.h"
int
-ah_print(netdissect_options *ndo, register const u_char *bp)
+ah_print(netdissect_options *ndo, const u_char *bp)
{
- register const struct ah *ah;
+ const struct ah *ah;
int sumlen;
ah = (const struct ah *)bp;
}
static inline void
-ap1394_hdr_print(netdissect_options *ndo, register const u_char *bp, u_int length)
+ap1394_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
- register const struct firewire_header *fp;
+ const struct firewire_header *fp;
uint16_t firewire_type;
fp = (const struct firewire_header *)bp;
const u_char *cp, u_int length)
{
u_int caplength;
- register u_char s;
+ u_char s;
caplength = (ndo->ndo_snapend >= cp) ? ndo->ndo_snapend - cp : 0;
if (length > caplength)
}
void
-hex_and_ascii_print_with_offset(netdissect_options *ndo, register const char *ident,
- register const u_char *cp, register u_int length, register u_int oset)
+hex_and_ascii_print_with_offset(netdissect_options *ndo, const char *ident,
+ const u_char *cp, u_int length, u_int oset)
{
u_int caplength;
- register u_int i;
- register int s1, s2;
- register int nshorts;
+ u_int i;
+ int s1, s2;
+ int nshorts;
char hexstuff[HEXDUMP_SHORTS_PER_LINE*HEXDUMP_HEXSTUFF_PER_SHORT+1], *hsp;
char asciistuff[ASCII_LINELENGTH+1], *asp;
}
void
-hex_and_ascii_print(netdissect_options *ndo, register const char *ident,
- register const u_char *cp, register u_int length)
+hex_and_ascii_print(netdissect_options *ndo, const char *ident,
+ const u_char *cp, u_int length)
{
hex_and_ascii_print_with_offset(ndo, ident, cp, length, 0);
}
u_int oset)
{
u_int caplength;
- register u_int i, s;
- register int nshorts;
+ u_int i, s;
+ int nshorts;
caplength = (ndo->ndo_snapend >= cp) ? ndo->ndo_snapend - cp : 0;
if (length > caplength)
*/
u_int
llap_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
- register const struct LAP *lp;
- register const struct atDDP *dp;
- register const struct atShortDDP *sdp;
+ const struct LAP *lp;
+ const struct atDDP *dp;
+ const struct atShortDDP *sdp;
u_short snet;
u_int hdrlen;
*/
void
atalk_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
- register const struct atDDP *dp;
+ const struct atDDP *dp;
u_short snet;
if(!ndo->ndo_eflag)
/* XXX should probably pass in the snap header and do checks like arp_print() */
void
aarp_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
- register const struct aarp *ap;
+ const struct aarp *ap;
#define AT(member) ataddr_string(ndo, (ap->member[1]<<8)|ap->member[2],ap->member[3])
*/
static void
ddp_print(netdissect_options *ndo,
- register const u_char *bp, register u_int length, register int t,
- register u_short snet, register u_char snode, u_char skt)
+ const u_char *bp, u_int length, int t,
+ u_short snet, u_char snode, u_char skt)
{
switch (t) {
static void
atp_print(netdissect_options *ndo,
- register const struct atATP *ap, u_int length)
+ const struct atATP *ap, u_int length)
{
uint32_t data;
static void
atp_bitmap_print(netdissect_options *ndo,
- register u_char bm)
+ u_char bm)
{
- register int i;
+ int i;
/*
* The '& 0xff' below is needed for compilers that want to sign
* (gcc is smart enough to eliminate it, at least on the Sparc).
*/
if ((bm + 1) & (bm & 0xff)) {
- register char c = '<';
+ char c = '<';
for (i = 0; bm; ++i) {
if (bm & 1) {
ND_PRINT((ndo, "%c%d", c, i));
static void
nbp_print(netdissect_options *ndo,
- register const struct atNBP *np, u_int length, register u_short snet,
- register u_char snode, register u_char skt)
+ const struct atNBP *np, u_int length, u_short snet,
+ u_char snode, u_char skt)
{
- register const struct atNBPtuple *tp =
+ const struct atNBPtuple *tp =
(const struct atNBPtuple *)((const u_char *)np + nbpHeaderSize);
int i;
const u_char *ep;
/* print a counted string */
static const char *
print_cstring(netdissect_options *ndo,
- register const char *cp, register const u_char *ep)
+ const char *cp, const u_char *ep)
{
- register u_int length;
+ u_int length;
if (cp >= (const char *)ep) {
ND_PRINT((ndo, "%s", tstr));
static const struct atNBPtuple *
nbp_tuple_print(netdissect_options *ndo,
- register const struct atNBPtuple *tp, register const u_char *ep,
- register u_short snet, register u_char snode, register u_char skt)
+ const struct atNBPtuple *tp, const u_char *ep,
+ u_short snet, u_char snode, u_char skt)
{
- register const struct atNBPtuple *tpn;
+ const struct atNBPtuple *tpn;
if ((const u_char *)(tp + 1) > ep) {
ND_PRINT((ndo, "%s", tstr));
static const struct atNBPtuple *
nbp_name_print(netdissect_options *ndo,
- const struct atNBPtuple *tp, register const u_char *ep)
+ const struct atNBPtuple *tp, const u_char *ep)
{
- register const char *cp = (const char *)tp + nbpTupleSize;
+ const char *cp = (const char *)tp + nbpTupleSize;
ND_PRINT((ndo, " "));
ataddr_string(netdissect_options *ndo,
u_short atnet, u_char athost)
{
- register struct hnamemem *tp, *tp2;
- register int i = (atnet << 8) | athost;
+ struct hnamemem *tp, *tp2;
+ int i = (atnet << 8) | athost;
char nambuf[256+1];
static int first = 1;
FILE *fp;
static const char *
ddpskt_string(netdissect_options *ndo,
- register int skt)
+ int skt)
{
static char buf[8];
};
static int
-auth_print(netdissect_options *ndo, register const u_char *pptr)
+auth_print(netdissect_options *ndo, const u_char *pptr)
{
const struct bfd_auth_header_t *bfd_auth_header;
int i;
}
void
-bfd_print(netdissect_options *ndo, register const u_char *pptr,
- register u_int len, register u_int port)
+bfd_print(netdissect_options *ndo, const u_char *pptr,
+ u_int len, u_int port)
{
const struct bfd_header_t *bfd_header;
uint8_t version = 0;
*/
void
bootp_print(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register const struct bootp *bp;
+ const struct bootp *bp;
static const u_char vm_cmu[4] = VM_CMU;
static const u_char vm_rfc1048[4] = VM_RFC1048;
static void
rfc1048_print(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
- register uint16_t tag;
- register u_int len;
- register const char *cp;
- register char c;
+ uint16_t tag;
+ u_int len;
+ const char *cp;
+ char c;
int first, idx;
uint32_t ul;
uint16_t us;
static void
cmu_print(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
- register const struct cmu_vend *cmu;
+ const struct cmu_vend *cmu;
#define PRINTCMUADDR(m, s) { ND_TCHECK(cmu->m); \
if (cmu->m.s_addr != 0) \
#include "extract.h"
void
-carp_print(netdissect_options *ndo, register const u_char *bp, register u_int len, int ttl)
+carp_print(netdissect_options *ndo, const u_char *bp, u_int len, int ttl)
{
int version, type;
const char *type_s;
static int
cfm_network_addr_print(netdissect_options *ndo,
- register const u_char *tptr, const u_int length)
+ const u_char *tptr, const u_int length)
{
u_int network_addr_type;
u_int hexdump = FALSE;
void
cfm_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int length)
+ const u_char *pptr, u_int length)
{
const struct cfm_common_header_t *cfm_common_header;
const struct cfm_tlv_header_t *cfm_tlv_header;
/* Standard CHDLC printer */
u_int
-chdlc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p)
+chdlc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
return chdlc_print(ndo, p, h->len);
}
u_int
-chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length)
+chdlc_print(netdissect_options *ndo, const u_char *p, u_int length)
{
u_int proto;
const u_char *bp = p;
static void
cnfp_v1_print(netdissect_options *ndo, const u_char *cp)
{
- register const struct nfhdr_v1 *nh;
- register const struct nfrec_v1 *nr;
+ const struct nfhdr_v1 *nh;
+ const struct nfrec_v1 *nr;
const char *p_name;
int nrecs, ver;
#if 0
static void
cnfp_v5_print(netdissect_options *ndo, const u_char *cp)
{
- register const struct nfhdr_v5 *nh;
- register const struct nfrec_v5 *nr;
+ const struct nfhdr_v5 *nh;
+ const struct nfrec_v5 *nr;
const char *p_name;
int nrecs, ver;
#if 0
static void
cnfp_v6_print(netdissect_options *ndo, const u_char *cp)
{
- register const struct nfhdr_v6 *nh;
- register const struct nfrec_v6 *nr;
+ const struct nfhdr_v6 *nh;
+ const struct nfrec_v6 *nr;
const char *p_name;
int nrecs, ver;
#if 0
void
decnet_print(netdissect_options *ndo,
- register const u_char *ap, register u_int length,
- register u_int caplen)
+ const u_char *ap, u_int length,
+ u_int caplen)
{
- register const union routehdr *rhp;
- register int mflags;
+ const union routehdr *rhp;
+ int mflags;
int dst, src, hops;
u_int nsplen, pktlen;
const u_char *nspp;
static int
print_decnet_ctlmsg(netdissect_options *ndo,
- register const union routehdr *rhp, u_int length,
+ const union routehdr *rhp, u_int length,
u_int caplen)
{
/* Our caller has already checked for mflags */
int mflags = EXTRACT_U_1(rhp->rh_short.sh_flags);
- register const union controlmsg *cmp = (const union controlmsg *)rhp;
+ const union controlmsg *cmp = (const union controlmsg *)rhp;
int src, dst, info, blksize, eco, ueco, hello, other, vers;
etheraddr srcea, rtea;
int priority;
static void
print_reason(netdissect_options *ndo,
- register int reason)
+ int reason)
{
ND_PRINT((ndo, "%s ", tok2str(reason2str, "reason-%d", reason)));
}
/* skip over a domain name */
static const u_char *
ns_nskip(netdissect_options *ndo,
- register const u_char *cp)
+ const u_char *cp)
{
- register u_char i;
+ u_char i;
if (!ND_TTEST_1(cp))
return (NULL);
labellen(netdissect_options *ndo,
const u_char *cp)
{
- register u_int i;
+ u_int i;
if (!ND_TTEST_1(cp))
return(-1);
const u_char *
ns_nprint(netdissect_options *ndo,
- register const u_char *cp, register const u_char *bp)
+ const u_char *cp, const u_char *bp)
{
- register u_int i, l;
- register const u_char *rp = NULL;
- register int compress = 0;
+ u_int i, l;
+ const u_char *rp = NULL;
+ int compress = 0;
int elt;
u_int offset, max_offset;
/* print a <character-string> */
static const u_char *
ns_cprint(netdissect_options *ndo,
- register const u_char *cp)
+ const u_char *cp)
{
- register u_int i;
+ u_int i;
if (!ND_TTEST_1(cp))
return (NULL);
/* print a query */
static const u_char *
ns_qprint(netdissect_options *ndo,
- register const u_char *cp, register const u_char *bp, int is_mdns)
+ const u_char *cp, const u_char *bp, int is_mdns)
{
- register const u_char *np = cp;
- register u_int i, class;
+ const u_char *np = cp;
+ u_int i, class;
cp = ns_nskip(ndo, cp);
/* print a reply */
static const u_char *
ns_rprint(netdissect_options *ndo,
- register const u_char *cp, register const u_char *bp, int is_mdns)
+ const u_char *cp, const u_char *bp, int is_mdns)
{
- register u_int i, class, opt_flags = 0;
- register u_short typ, len;
- register const u_char *rp;
+ u_int i, class, opt_flags = 0;
+ u_short typ, len;
+ const u_char *rp;
if (ndo->ndo_vflag) {
ND_PRINT((ndo, " "));
void
domain_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, int is_mdns)
+ const u_char *bp, u_int length, int is_mdns)
{
- register const HEADER *np;
+ const HEADER *np;
u_int16_t flags;
u_int qdcount, ancount, nscount, arcount;
u_int i;
- register const u_char *cp;
+ const u_char *cp;
uint16_t b2;
np = (const HEADER *)bp;
void
dvmrp_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
- register const u_char *ep;
- register u_char type;
+ const u_char *ep;
+ u_char type;
uint8_t major_version, minor_version;
ep = (const u_char *)ndo->ndo_snapend;
static int
print_report(netdissect_options *ndo,
- register const u_char *bp, register const u_char *ep,
- register u_int len)
+ const u_char *bp, const u_char *ep,
+ u_int len)
{
- register uint32_t mask, origin;
- register int metric, done;
- register u_int i, width;
+ uint32_t mask, origin;
+ int metric, done;
+ u_int i, width;
while (len > 0) {
if (len < 3) {
static int
print_probe(netdissect_options *ndo,
- register const u_char *bp, register const u_char *ep,
- register u_int len)
+ const u_char *bp, const u_char *ep,
+ u_int len)
{
- register uint32_t genid;
+ uint32_t genid;
ND_TCHECK_4(bp);
if ((len < 4) || ((bp + 4) > ep)) {
static int
print_neighbors(netdissect_options *ndo,
- register const u_char *bp, register const u_char *ep,
- register u_int len)
+ const u_char *bp, const u_char *ep,
+ u_int len)
{
const u_char *laddr;
- register u_char metric;
- register u_char thresh;
- register int ncount;
+ u_char metric;
+ u_char thresh;
+ int ncount;
while (len > 0 && bp < ep) {
ND_TCHECK_7(bp);
static int
print_neighbors2(netdissect_options *ndo,
- register const u_char *bp, register const u_char *ep,
- register u_int len, uint8_t major_version,
+ const u_char *bp, const u_char *ep,
+ u_int len, uint8_t major_version,
uint8_t minor_version)
{
const u_char *laddr;
- register u_char metric, thresh, flags;
- register int ncount;
+ u_char metric, thresh, flags;
+ int ncount;
ND_PRINT((ndo, " (v %u.%u):", major_version, minor_version));
static int
print_prune(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
ND_TCHECK_LEN(bp, 12);
ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
static int
print_graft(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
ND_TCHECK_8(bp);
ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
static int
print_graft_ack(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
ND_TCHECK_8(bp);
ND_PRINT((ndo, " src %s grp %s", ipaddr_string(ndo, bp), ipaddr_string(ndo, bp + 4)));
*/
void
eap_print(netdissect_options *ndo,
- register const u_char *cp,
+ const u_char *cp,
u_int length)
{
const struct eap_frame_t *eap;
static void
egpnrprint(netdissect_options *ndo,
- register const struct egp_packet *egp, u_int length)
+ const struct egp_packet *egp, u_int length)
{
- register const uint8_t *cp;
+ const uint8_t *cp;
uint32_t addr;
- register uint32_t net;
- register u_int netlen;
+ uint32_t net;
+ u_int netlen;
u_int gateways, distances, networks;
u_int t_gateways;
const char *comma;
void
egp_print(netdissect_options *ndo,
- register const uint8_t *bp, register u_int length)
+ const uint8_t *bp, u_int length)
{
- register const struct egp_packet *egp;
- register int status;
- register int code;
- register int type;
+ const struct egp_packet *egp;
+ int status;
+ int code;
+ int type;
egp = (const struct egp_packet *)bp;
if (length < sizeof(*egp) || !ND_TTEST(*egp)) {
};
void
-eigrp_print(netdissect_options *ndo, register const u_char *pptr, register u_int len)
+eigrp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
{
const struct eigrp_common_header *eigrp_com_header;
const struct eigrp_tlv_header *eigrp_tlv_header;
u_int
enc_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int length = h->len;
- register u_int caplen = h->caplen;
+ u_int length = h->len;
+ u_int caplen = h->caplen;
int flags;
const struct enchdr *hdr;
#endif
)
{
- register const struct newesp *esp;
- register const u_char *ep;
+ const struct newesp *esp;
+ const u_char *ep;
#ifdef HAVE_LIBCRYPTO
const struct ip *ip;
struct sa_list *sa = NULL;
ether_hdr_print(netdissect_options *ndo,
const u_char *bp, u_int length)
{
- register const struct ether_header *ep;
+ const struct ether_header *ep;
uint16_t length_type;
ep = (const struct ether_header *)bp;
static inline void
extract_fddi_addrs(const struct fddi_header *fddip, char *fsrc, char *fdst)
{
- register int i;
+ int i;
if (fddi_bitswap) {
/*
*/
static inline void
fddi_hdr_print(netdissect_options *ndo,
- register const struct fddi_header *fddip, register u_int length,
- register const u_char *fsrc, register const u_char *fdst)
+ const struct fddi_header *fddip, u_int length,
+ const u_char *fsrc, const u_char *fdst)
{
const char *srcname, *dstname;
* is the number of bytes actually captured.
*/
u_int
-fddi_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p)
+fddi_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
return (fddi_print(ndo, p, h->len, h->caplen));
}
uint16_t flags;
uint16_t op_msk;
const char *s;
- int (*print) (netdissect_options *ndo, register const u_char * pptr, register u_int len,
+ int (*print) (netdissect_options *ndo, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
};
uint16_t flags;
uint16_t op_msk;
const char *s;
- int (*print) (netdissect_options *ndo, register const u_char * pptr, register u_int len,
+ int (*print) (netdissect_options *ndo, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
};
-static int genoptlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int genoptlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int recpdoptlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int recpdoptlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int invoptlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int invoptlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
#define OP_MIN_SIZ 8
return 0;
}
-static int lfbselect_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int lfbselect_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int redirect_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int redirect_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int asrtlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int asrtlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int asttlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int asttlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
struct forces_lfbsh {
uint16_t flags;
uint16_t op_msk;
const char *s;
- int (*print) (netdissect_options *, register const u_char * pptr, register u_int len,
+ int (*print) (netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
};
nd_uint16_t resv2;
};
-static int prestlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int prestlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int pkeyitlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int pkeyitlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int fdatatlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int fdatatlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
-static int sdatatlv_print(netdissect_options *, register const u_char * pptr, register u_int len,
+static int sdatatlv_print(netdissect_options *, const u_char * pptr, u_int len,
uint16_t op_msk, int indent);
static const struct pdata_ops ForCES_pdata[PD_MAX_IND + 1] = {
static int
prestlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
const struct forces_tlv *tlv = (const struct forces_tlv *)pptr;
- register const u_char *tdp = (const u_char *) TLV_DATA(tlv);
+ const u_char *tdp = (const u_char *) TLV_DATA(tlv);
const struct res_val *r = (const struct res_val *)tdp;
u_int dlen;
uint8_t result;
static int
fdatatlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
const struct forces_tlv *tlv = (const struct forces_tlv *)pptr;
u_int rlen;
- register const u_char *tdp = (const u_char *) TLV_DATA(tlv);
+ const u_char *tdp = (const u_char *) TLV_DATA(tlv);
uint16_t type;
/*
static int
sdatailv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
u_int rlen;
ND_PRINT((ndo, "Jamal - outstanding length <%d>\n", rlen));
#endif
char *ib = indent_pr(indent, 1);
- register const u_char *tdp = (const u_char *) ILV_DATA(ilv);
+ const u_char *tdp = (const u_char *) ILV_DATA(ilv);
ND_TCHECK(*ilv);
invilv = ilv_valid(ilv, rlen);
if (invilv) {
static int
sdatatlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk, int indent)
{
const struct forces_tlv *tlv = (const struct forces_tlv *)pptr;
u_int rlen;
- register const u_char *tdp = (const u_char *) TLV_DATA(tlv);
+ const u_char *tdp = (const u_char *) TLV_DATA(tlv);
uint16_t type;
/*
static int
pkeyitlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk, int indent)
{
const struct forces_tlv *tlv = (const struct forces_tlv *)pptr;
- register const u_char *tdp = (const u_char *) TLV_DATA(tlv);
- register const u_char *dp = tdp + 4;
+ const u_char *tdp = (const u_char *) TLV_DATA(tlv);
+ const u_char *dp = tdp + 4;
const struct forces_tlv *kdtlv = (const struct forces_tlv *)dp;
uint32_t id;
char *ib = indent_pr(indent, 0);
static int
pdatacnt_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t IDcnt, uint16_t op_msk, int indent)
{
u_int i;
static int
pdata_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk, int indent)
{
const struct pathdata_h *pdh = (const struct pathdata_h *)pptr;
static int
genoptlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk, int indent)
{
const struct forces_tlv *pdtlv = (const struct forces_tlv *)pptr;
* length is large enough but not too large (it doesn't
* go past the end of the containing TLV).
*/
- register const u_char *dp = (const u_char *) TLV_DATA(pdtlv);
+ const u_char *dp = (const u_char *) TLV_DATA(pdtlv);
if (!ttlv_valid(type)) {
ND_PRINT((ndo, "%s TLV type 0x%x len %d\n",
tok2str(ForCES_TLV_err, NULL, invtlv), type,
static int
recpdoptlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk, int indent)
{
const struct forces_tlv *pdtlv = (const struct forces_tlv *)pptr;
int tll;
u_int invtlv;
uint16_t type;
- register const u_char *dp;
+ const u_char *dp;
char *ib;
while (len != 0) {
static int
invoptlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
char *ib = indent_pr(indent, 1);
const struct forces_tlv *otlv, uint16_t op_msk _U_, int indent)
{
int rc = 0;
- register const u_char *dp = (const u_char *) TLV_DATA(otlv);
+ const u_char *dp = (const u_char *) TLV_DATA(otlv);
uint16_t type;
int tll;
char *ib = indent_pr(indent, 0);
#define ASTMCD 255
static int
asttlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
uint32_t rescode;
#define ASRMCD 3
static int
asrtlv_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
uint32_t rescode;
*/
static int
gentltlv_print(netdissect_options *ndo,
- register const u_char * pptr _U_, register u_int len,
+ const u_char * pptr _U_, u_int len,
uint16_t op_msk _U_, int indent _U_)
{
u_int dlen = len - TLV_HDRL;
static int
print_metailv(netdissect_options *ndo,
- register const u_char * pptr, uint16_t op_msk _U_, int indent)
+ const u_char * pptr, uint16_t op_msk _U_, int indent)
{
u_int rlen;
char *ib = indent_pr(indent, 0);
static int
print_metatlv(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
u_int dlen;
static int
print_reddata(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
u_int dlen;
static int
redirect_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk _U_, int indent)
{
const struct forces_tlv *tlv = (const struct forces_tlv *)pptr;
static int
lfbselect_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len,
+ const u_char * pptr, u_int len,
uint16_t op_msk, int indent)
{
const struct forces_lfbsh *lfbs;
static int
forces_type_print(netdissect_options *ndo,
- register const u_char * pptr, const struct forcesh *fhdr _U_,
- register u_int mlen, const struct tom_h *tops)
+ const u_char * pptr, const struct forcesh *fhdr _U_,
+ u_int mlen, const struct tom_h *tops)
{
const struct forces_tlv *tltlv;
u_int rlen;
void
forces_print(netdissect_options *ndo,
- register const u_char * pptr, register u_int len)
+ const u_char * pptr, u_int len)
{
const struct forcesh *fhdr;
u_int mlen;
u_int
fr_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int length = h->len;
- register u_int caplen = h->caplen;
+ u_int length = h->len;
+ u_int caplen = h->caplen;
ND_TCHECK_4(p); /* minimum frame header length */
u_int
fr_print(netdissect_options *ndo,
- register const u_char *p, u_int length)
+ const u_char *p, u_int length)
{
int ret;
uint16_t extracted_ethertype;
u_int
mfr_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int length = h->len;
- register u_int caplen = h->caplen;
+ u_int length = h->len;
+ u_int caplen = h->caplen;
ND_TCHECK_2(p); /* minimum frame header length */
u_int
mfr_print(netdissect_options *ndo,
- register const u_char *p, u_int length)
+ const u_char *p, u_int length)
{
u_int tlen,idx,hdr_len = 0;
uint16_t sequence_num;
#include "ip6.h"
int
-frag6_print(netdissect_options *ndo, register const u_char *bp, register const u_char *bp2)
+frag6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2)
{
- register const struct ip6_frag *dp;
- register const struct ip6_hdr *ip6;
+ const struct ip6_frag *dp;
+ const struct ip6_hdr *ip6;
dp = (const struct ip6_frag *)bp;
ip6 = (const struct ip6_hdr *)bp2;
};
void
-hsrp_print(netdissect_options *ndo, register const uint8_t *bp, register u_int len)
+hsrp_print(netdissect_options *ndo, const uint8_t *bp, u_int len)
{
const struct hsrp *hp = (const struct hsrp *) bp;
case ICMP_UNREACH_NEEDFRAG:
{
- register const struct mtu_discovery *mp;
+ const struct mtu_discovery *mp;
mp = (const struct mtu_discovery *)(const u_char *)&dp->icmp_void;
mtu = EXTRACT_BE_U_2(&mp->nexthopmtu);
if (mtu) {
case ICMP_ROUTERADVERT:
{
- register const struct ih_rdiscovery *ihp;
- register const struct id_rdiscovery *idp;
+ const struct ih_rdiscovery *ihp;
+ const struct id_rdiscovery *idp;
u_int lifetime, num, size;
(void)snprintf(buf, sizeof(buf), "router advertisement");
u_int mrc;
int mrt, qqi;
u_int nsrcs;
- register u_int i;
+ u_int i;
/* Minimum len is 28 */
if (len < 28) {
static void
print_mtrace(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
- register const struct tr_query *tr = (const struct tr_query *)(bp + 8);
+ const struct tr_query *tr = (const struct tr_query *)(bp + 8);
ND_TCHECK(*tr);
if (len < 8 + sizeof (struct tr_query)) {
static void
print_mresp(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
- register const struct tr_query *tr = (const struct tr_query *)(bp + 8);
+ const struct tr_query *tr = (const struct tr_query *)(bp + 8);
ND_TCHECK(*tr);
if (len < 8 + sizeof (struct tr_query)) {
static void
print_igmpv3_report(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
u_int group, nsrcs, ngroups;
- register u_int i, j;
+ u_int i, j;
/* Minimum len is 16, and should be a multiple of 4 */
if (len < 16 || len & 0x03) {
static void
print_igmpv3_query(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
u_int mrc;
u_int mrt;
u_int nsrcs;
- register u_int i;
+ u_int i;
ND_PRINT((ndo, " v3"));
/* Minimum len is 12, and should be a multiple of 4 */
void
igmp_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
struct cksum_vec vec[1];
#define IGRP_RTE_SIZE 14 /* don't believe sizeof ! */
static void
-igrp_entry_print(netdissect_options *ndo, register const struct igrprte *igr,
- register int is_interior, register int is_exterior)
+igrp_entry_print(netdissect_options *ndo, const struct igrprte *igr,
+ int is_interior, int is_exterior)
{
- register u_int delay, bandwidth;
+ u_int delay, bandwidth;
u_int metric, mtu;
if (is_interior)
};
void
-igrp_print(netdissect_options *ndo, register const u_char *bp, u_int length)
+igrp_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
- register const struct igrphdr *hdr;
- register const u_char *cp;
+ const struct igrphdr *hdr;
+ const u_char *cp;
u_int nint, nsys, next;
hdr = (const struct igrphdr *)bp;
*/
static int
ip_printroute(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register u_int ptr;
- register u_int len;
+ u_int ptr;
+ u_int len;
if (length < 3) {
ND_PRINT((ndo, " [bad length %u]", length));
static int
ip_printts(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register u_int ptr;
- register u_int len;
+ u_int ptr;
+ u_int len;
int hoplen;
const char *type;
*/
static void
ip_optprint(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register u_int option_len;
+ u_int option_len;
const char *sep = "";
for (; length > 0; cp += option_len, length -= option_len) {
}
void
-ipN_print(netdissect_options *ndo, register const u_char *bp, register u_int length)
+ipN_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
if (length < 1) {
ND_PRINT((ndo, "truncated-ip %d", length));
void
ip6_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
- register const struct ip6_hdr *ip6;
- register int advance;
+ const struct ip6_hdr *ip6;
+ int advance;
u_int len;
const u_char *ipend;
- register const u_char *cp;
- register u_int payload_len;
+ const u_char *cp;
+ u_int payload_len;
u_int nh;
int fragmented = 0;
u_int flow;
}
int
-hbhopt_print(netdissect_options *ndo, register const u_char *bp)
+hbhopt_print(netdissect_options *ndo, const u_char *bp)
{
const struct ip6_hbh *dp = (const struct ip6_hbh *)bp;
u_int hbhlen = 0;
}
int
-dstopt_print(netdissect_options *ndo, register const u_char *bp)
+dstopt_print(netdissect_options *ndo, const u_char *bp)
{
const struct ip6_dest *dp = (const struct ip6_dest *)bp;
u_int dstoptlen = 0;
#include "extract.h"
void
-ipcomp_print(netdissect_options *ndo, register const u_char *bp)
+ipcomp_print(netdissect_options *ndo, const u_char *bp)
{
- register const struct ipcomp *ipcomp;
+ const struct ipcomp *ipcomp;
uint16_t cpi;
ipcomp = (const struct ipcomp *)bp;
*/
static inline void
ipfc_hdr_print(netdissect_options *ndo,
- register const struct ipfc_header *ipfcp _U_,
- register u_int length, register const u_char *ipfcsrc,
- register const u_char *ipfcdst)
+ const struct ipfc_header *ipfcp _U_,
+ u_int length, const u_char *ipfcsrc,
+ const u_char *ipfcdst)
{
const char *srcname, *dstname;
* is the number of bytes actually captured.
*/
u_int
-ipfc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p)
+ipfc_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
return (ipfc_print(ndo, p, h->len, h->caplen));
}
static void
ipx_decode(netdissect_options *ndo, const struct ipxHdr *ipx, const u_char *datap, u_int length)
{
- register u_short dstSkt;
+ u_short dstSkt;
dstSkt = EXTRACT_BE_U_2(&ipx->dstSkt);
switch (dstSkt) {
{ 0, NULL}
};
-static int ip_heuristic_guess(netdissect_options *, register const u_char *, u_int);
-static int juniper_ppp_heuristic_guess(netdissect_options *, register const u_char *, u_int);
+static int ip_heuristic_guess(netdissect_options *, const u_char *, u_int);
+static int juniper_ppp_heuristic_guess(netdissect_options *, const u_char *, u_int);
static int juniper_parse_header(netdissect_options *, const u_char *, const struct pcap_pkthdr *, struct juniper_l2info_t *);
#ifdef DLT_JUNIPER_GGSN
u_int
juniper_ggsn_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
struct juniper_ggsn_header {
#ifdef DLT_JUNIPER_ES
u_int
juniper_es_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
struct juniper_ipsec_header {
#ifdef DLT_JUNIPER_MONITOR
u_int
juniper_monitor_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
struct juniper_monitor_header {
#ifdef DLT_JUNIPER_SERVICES
u_int
juniper_services_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
struct juniper_services_header {
#ifdef DLT_JUNIPER_PPPOE
u_int
juniper_pppoe_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_ETHER
u_int
juniper_ether_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_PPP
u_int
juniper_ppp_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_FRELAY
u_int
juniper_frelay_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_CHDLC
u_int
juniper_chdlc_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_PPPOE_ATM
u_int
juniper_pppoe_atm_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
uint16_t extracted_ethertype;
#ifdef DLT_JUNIPER_MLPPP
u_int
juniper_mlppp_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_MFR
u_int
juniper_mfr_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_MLFR
u_int
juniper_mlfr_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
struct juniper_l2info_t l2info;
#ifdef DLT_JUNIPER_ATM1
u_int
juniper_atm1_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
int llc_hdrlen;
#ifdef DLT_JUNIPER_ATM2
u_int
juniper_atm2_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
int llc_hdrlen;
* a juniper router if the payload data is encapsulated using PPP */
static int
juniper_ppp_heuristic_guess(netdissect_options *ndo,
- register const u_char *p, u_int length)
+ const u_char *p, u_int length)
{
switch(EXTRACT_BE_U_2(p)) {
case PPP_IP :
static int
ip_heuristic_guess(netdissect_options *ndo,
- register const u_char *p, u_int length)
+ const u_char *p, u_int length)
{
switch(EXTRACT_U_1(p)) {
case 0x45:
static const char tstr[] = " [|kerberos]";
-static const u_char *c_print(netdissect_options *, register const u_char *, register const u_char *);
+static const u_char *c_print(netdissect_options *, const u_char *, const u_char *);
static const u_char *krb4_print_hdr(netdissect_options *, const u_char *);
static void krb4_print(netdissect_options *, const u_char *);
static const u_char *
c_print(netdissect_options *ndo,
- register const u_char *s, register const u_char *ep)
+ const u_char *s, const u_char *ep)
{
- register u_char c;
- register int flag;
+ u_char c;
+ int flag;
flag = 1;
while (s < ep) {
krb4_print(netdissect_options *ndo,
const u_char *cp)
{
- register const struct krb *kp;
+ const struct krb *kp;
u_char type;
u_short len;
krb_print(netdissect_options *ndo,
const u_char *dat)
{
- register const struct krb *kp;
+ const struct krb *kp;
kp = (const struct krb *)dat;
{ 0, NULL}
};
-static int ldp_pdu_print(netdissect_options *, register const u_char *);
+static int ldp_pdu_print(netdissect_options *, const u_char *);
/*
* ldp tlv header
static int
ldp_tlv_print(netdissect_options *ndo,
- register const u_char *tptr,
+ const u_char *tptr,
u_short msg_tlen)
{
struct ldp_tlv_header {
void
ldp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
int processed;
while (len > (sizeof(struct ldp_common_header) + sizeof(struct ldp_msg_header))) {
static int
ldp_pdu_print(netdissect_options *ndo,
- register const u_char *pptr)
+ const u_char *pptr)
{
const struct ldp_common_header *ldp_com_header;
const struct ldp_msg_header *ldp_msg_header;
u_int bridge_pad)
{
uint32_t orgcode;
- register u_short et;
- register int ret;
+ u_short et;
+ int ret;
ND_TCHECK_5(p);
if (caplen < 5 || length < 5)
void
lldp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
uint8_t subtype;
uint16_t tlv, cap, ena_cap;
void
lmp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
const struct lmp_common_header *lmp_com_header;
const struct lmp_object_header *lmp_obj_header;
void
lspping_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
const struct lspping_common_header *lspping_com_header;
const struct lspping_tlv_header *lspping_tlv_header;
void
lwres_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
const struct lwres_lwpacket *np;
uint32_t v;
};
void
-mpcp_print(netdissect_options *ndo, register const u_char *pptr, register u_int length)
+mpcp_print(netdissect_options *ndo, const u_char *pptr, u_int length)
{
union {
const struct mpcp_common_header_t *common_header;
void
nfsreply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
char srcid[20], dstid[20]; /*fits 32bit*/
nfserr = 0; /* assume no error */
void
nfsreply_noaddr_print(netdissect_options *ndo,
- register const u_char *bp, u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
uint32_t proc, vers, reply_stat;
enum sunrpc_reject_stat rstat;
uint32_t rlow;
*/
static const uint32_t *
parsereq(netdissect_options *ndo,
- register const struct sunrpc_msg *rp, register u_int length)
+ const struct sunrpc_msg *rp, u_int length)
{
- register const uint32_t *dp;
- register u_int len;
+ const uint32_t *dp;
+ u_int len;
/*
* find the start of the req data (if we captured it)
*/
static const uint32_t *
parsefh(netdissect_options *ndo,
- register const uint32_t *dp, int v3)
+ const uint32_t *dp, int v3)
{
u_int len;
*/
static const uint32_t *
parsefn(netdissect_options *ndo,
- register const uint32_t *dp)
+ const uint32_t *dp)
{
- register uint32_t len;
- register const u_char *cp;
+ uint32_t len;
+ const u_char *cp;
/* Bail if we don't have the string length */
ND_TCHECK(*dp);
*/
static const uint32_t *
parsefhn(netdissect_options *ndo,
- register const uint32_t *dp, int v3)
+ const uint32_t *dp, int v3)
{
dp = parsefh(ndo, dp, v3);
if (dp == NULL)
void
nfsreq_noaddr_print(netdissect_options *ndo,
- register const u_char *bp, u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
- register const uint32_t *dp;
+ const struct sunrpc_msg *rp;
+ const uint32_t *dp;
nfs_type type;
int v3;
uint32_t proc;
*/
static void
nfs_printfh(netdissect_options *ndo,
- register const uint32_t *dp, const u_int len)
+ const uint32_t *dp, const u_int len)
{
my_fsid fsid;
uint32_t ino;
*/
static const uint32_t *
parserep(netdissect_options *ndo,
- register const struct sunrpc_msg *rp, register u_int length)
+ const struct sunrpc_msg *rp, u_int length)
{
- register const uint32_t *dp;
+ const uint32_t *dp;
u_int len;
enum sunrpc_accept_stat astat;
interp_reply(netdissect_options *ndo,
const struct sunrpc_msg *rp, uint32_t proc, uint32_t vers, int length)
{
- register const uint32_t *dp;
- register int v3;
+ const uint32_t *dp;
+ int v3;
int er;
v3 = (vers == NFS_VER3);
static void p_sfix(netdissect_options *ndo, const struct s_fixedpt *);
static void p_ntp_time(netdissect_options *, const struct l_fixedpt *);
static void p_ntp_delta(netdissect_options *, const struct l_fixedpt *, const struct l_fixedpt *);
-static void p_poll(netdissect_options *, register const int);
+static void p_poll(netdissect_options *, const int);
static const struct tok ntp_mode_values[] = {
{ MODE_UNSPEC, "unspecified" },
*/
static void
ntp_time_print(netdissect_options *ndo,
- register const struct ntp_time_data *bp, u_int length)
+ const struct ntp_time_data *bp, u_int length)
{
uint8_t stratum;
*/
static void
ntp_control_print(netdissect_options *ndo,
- register const struct ntp_control_data *cd, u_int length)
+ const struct ntp_control_data *cd, u_int length)
{
uint8_t control, R, E, M, opcode;
uint16_t sequence, status, assoc, offset, count;
*/
void
ntp_print(netdissect_options *ndo,
- register const u_char *cp, u_int length)
+ const u_char *cp, u_int length)
{
- register const union ntpdata *bp = (const union ntpdata *)cp;
+ const union ntpdata *bp = (const union ntpdata *)cp;
int mode, version, leapind;
uint8_t status;
static void
p_sfix(netdissect_options *ndo,
- register const struct s_fixedpt *sfp)
+ const struct s_fixedpt *sfp)
{
- register int i;
- register int f;
- register double ff;
+ int i;
+ int f;
+ double ff;
i = EXTRACT_BE_U_2(&sfp->int_part);
f = EXTRACT_BE_U_2(&sfp->fraction);
static void
p_ntp_time(netdissect_options *ndo,
- register const struct l_fixedpt *lfp)
+ const struct l_fixedpt *lfp)
{
- register uint32_t i;
- register uint32_t uf;
- register uint32_t f;
- register double ff;
+ uint32_t i;
+ uint32_t uf;
+ uint32_t f;
+ double ff;
i = EXTRACT_BE_U_4(&lfp->int_part);
uf = EXTRACT_BE_U_4(&lfp->fraction);
/* Prints time difference between *lfp and *olfp */
static void
p_ntp_delta(netdissect_options *ndo,
- register const struct l_fixedpt *olfp,
- register const struct l_fixedpt *lfp)
+ const struct l_fixedpt *olfp,
+ const struct l_fixedpt *lfp)
{
- register int32_t i;
- register uint32_t u, uf;
- register uint32_t ou, ouf;
- register uint32_t f;
- register double ff;
+ int32_t i;
+ uint32_t u, uf;
+ uint32_t ou, ouf;
+ uint32_t f;
+ double ff;
int signbit;
u = EXTRACT_BE_U_4(&lfp->int_part);
/* Prints polling interval in log2 as seconds or fraction of second */
static void
p_poll(netdissect_options *ndo,
- register const int poll_interval)
+ const int poll_interval)
{
if (poll_interval <= -32 || poll_interval >= 32)
return;
static int
ospf_print_lshdr(netdissect_options *ndo,
- register const struct lsa_hdr *lshp)
+ const struct lsa_hdr *lshp)
{
u_int ls_length;
*/
static const uint8_t *
ospf_print_lsa(netdissect_options *ndo,
- register const struct lsa *lsap)
+ const struct lsa *lsap)
{
- register const uint8_t *ls_end;
- register const struct rlalink *rlp;
- register const struct in_addr *ap;
- register const struct aslametric *almp;
- register const struct mcla *mcp;
- register const uint32_t *lp;
- register int j, tlv_type, tlv_length, topology;
- register int ls_length;
+ const uint8_t *ls_end;
+ const struct rlalink *rlp;
+ const struct in_addr *ap;
+ const struct aslametric *almp;
+ const struct mcla *mcp;
+ const uint32_t *lp;
+ int j, tlv_type, tlv_length, topology;
+ int ls_length;
const uint8_t *tptr;
tptr = (const uint8_t *)lsap->lsa_un.un_unknown; /* squelch compiler warnings */
ND_TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
lp = lsap->lsa_un.un_sla.sla_tosmetric;
while ((const u_char *)lp < ls_end) {
- register uint32_t ul;
+ uint32_t ul;
ND_TCHECK(*lp);
ul = EXTRACT_BE_U_4(lp);
ND_TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
lp = lsap->lsa_un.un_sla.sla_tosmetric;
while ((const u_char *)lp < ls_end) {
- register uint32_t ul;
+ uint32_t ul;
ND_TCHECK(*lp);
ul = EXTRACT_BE_U_4(lp);
ND_TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
almp = lsap->lsa_un.un_asla.asla_metric;
while ((const u_char *)almp < ls_end) {
- register uint32_t ul;
+ uint32_t ul;
ND_TCHECK(almp->asla_tosmetric);
ul = EXTRACT_BE_U_4(&almp->asla_tosmetric);
static int
ospf_decode_lls(netdissect_options *ndo,
- register const struct ospfhdr *op, register u_int length)
+ const struct ospfhdr *op, u_int length)
{
- register const u_char *dptr;
- register const u_char *dataend;
- register u_int length2;
- register uint16_t lls_type, lls_len;
- register uint32_t lls_flags;
+ const u_char *dptr;
+ const u_char *dataend;
+ u_int length2;
+ uint16_t lls_type, lls_len;
+ uint32_t lls_flags;
switch (op->ospf_type) {
static int
ospf_decode_v2(netdissect_options *ndo,
- register const struct ospfhdr *op, register const u_char *dataend)
+ const struct ospfhdr *op, const u_char *dataend)
{
- register const struct in_addr *ap;
- register const struct lsr *lsrp;
- register const struct lsa_hdr *lshp;
- register const struct lsa *lsap;
- register uint32_t lsa_count,lsa_count_max;
+ const struct in_addr *ap;
+ const struct lsr *lsrp;
+ const struct lsa_hdr *lshp;
+ const struct lsa *lsap;
+ uint32_t lsa_count,lsa_count_max;
switch (op->ospf_type) {
void
ospf_print(netdissect_options *ndo,
- register const u_char *bp, register u_int length,
+ const u_char *bp, u_int length,
const u_char *bp2 _U_)
{
- register const struct ospfhdr *op;
- register const u_char *dataend;
- register const char *cp;
+ const struct ospfhdr *op;
+ const u_char *dataend;
+ const char *cp;
op = (const struct ospfhdr *)bp;
static void
ospf6_print_ls_type(netdissect_options *ndo,
- register u_int ls_type, register const rtrid_t *ls_stateid)
+ u_int ls_type, const rtrid_t *ls_stateid)
{
ND_PRINT((ndo, "\n\t %s LSA (%d), %s Scope%s, LSA-ID %s",
tok2str(ospf6_lsa_values, "Unknown", ls_type & LS_TYPE_MASK),
static int
ospf6_print_lshdr(netdissect_options *ndo,
- register const struct lsa6_hdr *lshp, const u_char *dataend)
+ const struct lsa6_hdr *lshp, const u_char *dataend)
{
if ((const u_char *)(lshp + 1) > dataend)
goto trunc;
*/
static int
ospf6_print_lsa(netdissect_options *ndo,
- register const struct lsa6 *lsap, const u_char *dataend)
+ const struct lsa6 *lsap, const u_char *dataend)
{
- register const struct rlalink6 *rlp;
+ const struct rlalink6 *rlp;
#if 0
- register const struct tos_metric *tosp;
+ const struct tos_metric *tosp;
#endif
- register const rtrid_t *ap;
+ const rtrid_t *ap;
#if 0
- register const struct aslametric *almp;
- register const struct mcla *mcp;
+ const struct aslametric *almp;
+ const struct mcla *mcp;
#endif
- register const struct llsa *llsap;
- register const struct lsa6_prefix *lsapp;
+ const struct llsa *llsap;
+ const struct lsa6_prefix *lsapp;
#if 0
- register const uint32_t *lp;
+ const uint32_t *lp;
#endif
- register u_int prefixes;
- register int bytelen;
- register u_int length, lsa_length;
+ u_int prefixes;
+ int bytelen;
+ u_int length, lsa_length;
uint32_t flags32;
const uint8_t *tptr;
static int
ospf6_decode_v3(netdissect_options *ndo,
- register const struct ospf6hdr *op,
- register const u_char *dataend)
+ const struct ospf6hdr *op,
+ const u_char *dataend)
{
- register const rtrid_t *ap;
- register const struct lsr6 *lsrp;
- register const struct lsa6_hdr *lshp;
- register const struct lsa6 *lsap;
- register int i;
+ const rtrid_t *ap;
+ const struct lsr6 *lsrp;
+ const struct lsa6_hdr *lshp;
+ const struct lsa6 *lsap;
+ int i;
switch (op->ospf6_type) {
case OSPF_TYPE_HELLO: {
- register const struct hello6 *hellop = (const struct hello6 *)((const uint8_t *)op + OSPF6HDR_LEN);
+ const struct hello6 *hellop = (const struct hello6 *)((const uint8_t *)op + OSPF6HDR_LEN);
ND_TCHECK_4(&hellop->hello_options);
ND_PRINT((ndo, "\n\tOptions [%s]",
}
case OSPF_TYPE_DD: {
- register const struct dd6 *ddp = (const struct dd6 *)((const uint8_t *)op + OSPF6HDR_LEN);
+ const struct dd6 *ddp = (const struct dd6 *)((const uint8_t *)op + OSPF6HDR_LEN);
ND_TCHECK(ddp->db_options);
ND_PRINT((ndo, "\n\tOptions [%s]",
case OSPF_TYPE_LS_UPDATE:
if (ndo->ndo_vflag > 1) {
- register const struct lsu6 *lsup = (const struct lsu6 *)((const uint8_t *)op + OSPF6HDR_LEN);
+ const struct lsu6 *lsup = (const struct lsu6 *)((const uint8_t *)op + OSPF6HDR_LEN);
ND_TCHECK(lsup->lsu_count);
i = EXTRACT_BE_U_4(&lsup->lsu_count);
void
ospf6_print(netdissect_options *ndo,
- register const u_char *bp, register u_int length)
+ const u_char *bp, u_int length)
{
- register const struct ospf6hdr *op;
- register const u_char *dataend;
- register const char *cp;
+ const struct ospf6hdr *op;
+ const u_char *dataend;
+ const char *cp;
uint16_t datalen;
op = (const struct ospf6hdr *)bp;
u_int
pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
- register const u_char *p)
+ const u_char *p)
{
u_int length = h->len;
u_int hdrlen;
void
pgm_print(netdissect_options *ndo,
- register const u_char *bp, register u_int length,
- register const u_char *bp2)
+ const u_char *bp, u_int length,
+ const u_char *bp2)
{
- register const struct pgm_header *pgm;
- register const struct ip *ip;
- register char ch;
+ const struct pgm_header *pgm;
+ const struct ip *ip;
+ char ch;
uint16_t sport, dport;
u_int nla_afnum;
char nla_buf[INET6_ADDRSTRLEN];
- register const struct ip6_hdr *ip6;
+ const struct ip6_hdr *ip6;
uint8_t opt_type, opt_len;
uint32_t seq, opts_len, len, offset;
u_short pim_cksum; /* IP style check sum */
};
-static void pimv2_print(netdissect_options *, register const u_char *bp, register u_int len, const u_char *);
+static void pimv2_print(netdissect_options *, const u_char *bp, u_int len, const u_char *);
static void
pimv1_join_prune_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
int ngroups, njoin, nprune;
int njp;
void
pimv1_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
- register u_char type;
+ u_char type;
ND_TCHECK_1(bp + 1);
type = EXTRACT_U_1(bp + 1);
*/
void
cisco_autorp_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len)
+ const u_char *bp, u_int len)
{
int type;
int numrps;
void
pim_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len, const u_char *bp2)
+ const u_char *bp, u_int len, const u_char *bp2)
{
- register const struct pim *pim = (const struct pim *)bp;
+ const struct pim *pim = (const struct pim *)bp;
#ifdef notyet /* currently we see only version and type */
ND_TCHECK(pim->pim_rsv);
static void
pimv2_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len, const u_char *bp2)
+ const u_char *bp, u_int len, const u_char *bp2)
{
- register const struct pim *pim = (const struct pim *)bp;
+ const struct pim *pim = (const struct pim *)bp;
int advance;
enum checksum_status cksum_status;
int pimv2_addr_len;
/* Standard PPP printer */
u_int
ppp_print(netdissect_options *ndo,
- register const u_char *p, u_int length)
+ const u_char *p, u_int length)
{
u_int proto,ppp_header;
u_int olen = length; /* _o_riginal length */
/* PPP I/F printer */
u_int
ppp_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int length = h->len;
- register u_int caplen = h->caplen;
+ u_int length = h->len;
+ u_int caplen = h->caplen;
if (caplen < PPP_HDRLEN) {
ND_PRINT((ndo, "[|ppp]"));
*/
u_int
ppp_hdlc_if_print(netdissect_options *ndo,
- const struct pcap_pkthdr *h, register const u_char *p)
+ const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int length = h->len;
- register u_int caplen = h->caplen;
+ u_int length = h->len;
+ u_int caplen = h->caplen;
u_int proto;
u_int hdrlen = 0;
/* BSD/OS specific PPP printer */
u_int
ppp_bsdos_if_print(netdissect_options *ndo _U_,
- const struct pcap_pkthdr *h _U_, register const u_char *p _U_)
+ const struct pcap_pkthdr *h _U_, const u_char *p _U_)
{
- register u_int hdrlength;
+ u_int hdrlength;
#ifdef __bsdi__
- register u_int length = h->len;
- register u_int caplen = h->caplen;
+ u_int length = h->len;
+ u_int caplen = h->caplen;
uint16_t ptype;
uint8_t llhl;
const u_char *q;
#define MAXTAGPRINT 80
u_int
-pppoe_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, register const u_char *p)
+pppoe_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
return (pppoe_print(ndo, p, h->len));
}
u_int
-pppoe_print(netdissect_options *ndo, register const u_char *bp, u_int length)
+pppoe_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
uint16_t pppoe_ver, pppoe_type, pppoe_code, pppoe_sessionid;
u_int pppoe_length;
};
-static void print_attr_string(netdissect_options *, register const u_char *, u_int, u_short );
-static void print_attr_num(netdissect_options *, register const u_char *, u_int, u_short );
-static void print_vendor_attr(netdissect_options *, register const u_char *, u_int, u_short );
-static void print_attr_address(netdissect_options *, register const u_char *, u_int, u_short);
-static void print_attr_address6(netdissect_options *, register const u_char *, u_int, u_short);
-static void print_attr_netmask6(netdissect_options *, register const u_char *, u_int, u_short);
-static void print_attr_time(netdissect_options *, register const u_char *, u_int, u_short);
-static void print_attr_strange(netdissect_options *, register const u_char *, u_int, u_short);
+static void print_attr_string(netdissect_options *, const u_char *, u_int, u_short );
+static void print_attr_num(netdissect_options *, const u_char *, u_int, u_short );
+static void print_vendor_attr(netdissect_options *, const u_char *, u_int, u_short );
+static void print_attr_address(netdissect_options *, const u_char *, u_int, u_short);
+static void print_attr_address6(netdissect_options *, const u_char *, u_int, u_short);
+static void print_attr_netmask6(netdissect_options *, const u_char *, u_int, u_short);
+static void print_attr_time(netdissect_options *, const u_char *, u_int, u_short);
+static void print_attr_strange(netdissect_options *, const u_char *, u_int, u_short);
struct radius_hdr { uint8_t code; /* Radius packet code */
const char **subtypes; /* Standard Values (if any) */
u_char siz_subtypes; /* Size of total standard values */
u_char first_subtype; /* First standard value is 0 or 1 */
- void (*print_func)(netdissect_options *, register const u_char *, u_int, u_short);
+ void (*print_func)(netdissect_options *, const u_char *, u_int, u_short);
} attr_type[]=
{
{ NULL, NULL, 0, 0, NULL },
/*****************************/
static void
print_attr_string(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code)
+ const u_char *data, u_int length, u_short attr_code)
{
- register u_int i;
+ u_int i;
ND_TCHECK_LEN(data, length);
*/
static void
print_vendor_attr(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code _U_)
+ const u_char *data, u_int length, u_short attr_code _U_)
{
u_int idx;
u_int vendor_id;
/******************************/
static void
print_attr_num(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code)
+ const u_char *data, u_int length, u_short attr_code)
{
uint32_t timeout;
/*****************************/
static void
print_attr_address(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code)
+ const u_char *data, u_int length, u_short attr_code)
{
if (length != 4)
{
/*****************************/
static void
print_attr_address6(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code _U_)
+ const u_char *data, u_int length, u_short attr_code _U_)
{
if (length != 16)
{
static void
print_attr_netmask6(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code _U_)
+ const u_char *data, u_int length, u_short attr_code _U_)
{
u_char data2[16];
/*************************************/
static void
print_attr_time(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code _U_)
+ const u_char *data, u_int length, u_short attr_code _U_)
{
time_t attr_time;
char string[26];
/***********************************/
static void
print_attr_strange(netdissect_options *ndo,
- register const u_char *data, u_int length, u_short attr_code)
+ const u_char *data, u_int length, u_short attr_code)
{
u_short len_data;
u_int error_cause_value;
static void
radius_attrs_print(netdissect_options *ndo,
- register const u_char *attr, u_int length)
+ const u_char *attr, u_int length)
{
- register const struct radius_attr *rad_attr = (const struct radius_attr *)attr;
+ const struct radius_attr *rad_attr = (const struct radius_attr *)attr;
const char *attr_string;
while (length > 0)
radius_print(netdissect_options *ndo,
const u_char *dat, u_int length)
{
- register const struct radius_hdr *rad;
+ const struct radius_hdr *rad;
u_int len, auth_idx;
ND_TCHECK_LEN(dat, MIN_RADIUS_LEN);
#define resp_print_invalid(ndo) ND_PRINT((ndo, " invalid"))
void resp_print(netdissect_options *, const u_char *, u_int);
-static int resp_parse(netdissect_options *, register const u_char *, int);
-static int resp_print_string_error_integer(netdissect_options *, register const u_char *, int);
-static int resp_print_simple_string(netdissect_options *, register const u_char *, int);
-static int resp_print_integer(netdissect_options *, register const u_char *, int);
-static int resp_print_error(netdissect_options *, register const u_char *, int);
-static int resp_print_bulk_string(netdissect_options *, register const u_char *, int);
-static int resp_print_bulk_array(netdissect_options *, register const u_char *, int);
-static int resp_print_inline(netdissect_options *, register const u_char *, int);
-static int resp_get_length(netdissect_options *, register const u_char *, int, const u_char **);
+static int resp_parse(netdissect_options *, const u_char *, int);
+static int resp_print_string_error_integer(netdissect_options *, const u_char *, int);
+static int resp_print_simple_string(netdissect_options *, const u_char *, int);
+static int resp_print_integer(netdissect_options *, const u_char *, int);
+static int resp_print_error(netdissect_options *, const u_char *, int);
+static int resp_print_bulk_string(netdissect_options *, const u_char *, int);
+static int resp_print_bulk_array(netdissect_options *, const u_char *, int);
+static int resp_print_inline(netdissect_options *, const u_char *, int);
+static int resp_get_length(netdissect_options *, const u_char *, int, const u_char **);
#define LCHECK2(_tot_len, _len) \
{ \
}
static int
-resp_parse(netdissect_options *ndo, register const u_char *bp, int length)
+resp_parse(netdissect_options *ndo, const u_char *bp, int length)
{
u_char op;
int ret_len;
}
static int
-resp_print_simple_string(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_simple_string(netdissect_options *ndo, const u_char *bp, int length) {
return resp_print_string_error_integer(ndo, bp, length);
}
static int
-resp_print_integer(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_integer(netdissect_options *ndo, const u_char *bp, int length) {
return resp_print_string_error_integer(ndo, bp, length);
}
static int
-resp_print_error(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_error(netdissect_options *ndo, const u_char *bp, int length) {
return resp_print_string_error_integer(ndo, bp, length);
}
static int
-resp_print_string_error_integer(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_string_error_integer(netdissect_options *ndo, const u_char *bp, int length) {
int length_cur = length, len, ret_len;
const u_char *bp_ptr;
}
static int
-resp_print_bulk_string(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_bulk_string(netdissect_options *ndo, const u_char *bp, int length) {
int length_cur = length, string_len;
/* bp points to the op; skip it */
}
static int
-resp_print_bulk_array(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_bulk_array(netdissect_options *ndo, const u_char *bp, int length) {
u_int length_cur = length;
int array_len, i, ret_len;
}
static int
-resp_print_inline(netdissect_options *ndo, register const u_char *bp, int length) {
+resp_print_inline(netdissect_options *ndo, const u_char *bp, int length) {
int length_cur = length;
int len;
const u_char *bp_ptr;
}
static int
-resp_get_length(netdissect_options *ndo, register const u_char *bp, int len, const u_char **endp)
+resp_get_length(netdissect_options *ndo, const u_char *bp, int len, const u_char **endp)
{
int result;
u_char c;
static void
rip_entry_print_v1(netdissect_options *ndo,
- register const struct rip_netinfo *ni)
+ const struct rip_netinfo *ni)
{
- register u_short family;
+ u_short family;
/* RFC 1058 */
family = EXTRACT_BE_U_2(&ni->rip_family);
static unsigned
rip_entry_print_v2(netdissect_options *ndo,
- register const struct rip_netinfo *ni, const unsigned remaining)
+ const struct rip_netinfo *ni, const unsigned remaining)
{
- register u_short family;
+ u_short family;
family = EXTRACT_BE_U_2(&ni->rip_family);
if (family == 0xFFFF) { /* variable-sized authentication structures */
uint16_t auth_type = EXTRACT_BE_U_2(&ni->rip_tag);
if (auth_type == 2) {
- register const u_char *p = (const u_char *)&ni->rip_dest;
+ const u_char *p = (const u_char *)&ni->rip_dest;
u_int i = 0;
ND_PRINT((ndo, "\n\t Simple Text Authentication data: "));
for (; i < RIP_AUTHLEN; p++, i++)
rip_print(netdissect_options *ndo,
const u_char *dat, u_int length)
{
- register const struct rip *rp;
- register const struct rip_netinfo *ni;
- register u_int i, j;
+ const struct rip *rp;
+ const struct rip_netinfo *ni;
+ u_int i, j;
if (ndo->ndo_snapend < dat) {
ND_PRINT((ndo, " %s", tstr));
#endif
static int
-rip6_entry_print(netdissect_options *ndo, register const struct netinfo6 *ni, int metric)
+rip6_entry_print(netdissect_options *ndo, const struct netinfo6 *ni, int metric)
{
int l;
l = ND_PRINT((ndo, "%s/%d", ip6addr_string(ndo, &ni->rip6_dest), ni->rip6_plen));
void
ripng_print(netdissect_options *ndo, const u_char *dat, unsigned int length)
{
- register const struct rip6 *rp = (const struct rip6 *)dat;
- register const struct netinfo6 *ni;
+ const struct rip6 *rp = (const struct rip6 *)dat;
+ const struct netinfo6 *ni;
unsigned int length_left;
u_int j;
}
void
-rpki_rtr_print(netdissect_options *ndo, register const u_char *pptr, register u_int len)
+rpki_rtr_print(netdissect_options *ndo, const u_char *pptr, u_int len)
{
if (!ndo->ndo_vflag) {
ND_PRINT((ndo, ", RPKI-RTR"));
*/
void
rrcp_print(netdissect_options *ndo,
- register const u_char *cp,
+ const u_char *cp,
u_int length _U_,
const struct lladdr_info *src,
const struct lladdr_info *dst)
void
rsvp_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
const struct rsvp_common_header *rsvp_com_header;
const u_char *tptr;
#include "ip6.h"
int
-rt6_print(netdissect_options *ndo, register const u_char *bp, const u_char *bp2 _U_)
+rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_)
{
- register const struct ip6_rthdr *dp;
- register const struct ip6_rthdr0 *dp0;
- register const u_char *ep;
+ const struct ip6_rthdr *dp;
+ const struct ip6_rthdr0 *dp0;
+ const u_char *ep;
u_int i, len, type;
- register const struct in6_addr *addr;
+ const struct in6_addr *addr;
dp = (const struct ip6_rthdr *)bp;
void
rx_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, u_int sport, u_int dport,
+ const u_char *bp, u_int length, u_int sport, u_int dport,
const u_char *bp2)
{
- register const struct rx_header *rxh;
+ const struct rx_header *rxh;
uint32_t i;
uint8_t type, flags;
uint32_t opcode;
static void
fs_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t fs_op;
uint32_t i;
static void
fs_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
uint32_t i;
const struct rx_header *rxh;
static void
cb_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t cb_op;
uint32_t i;
static void
cb_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
prot_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t i;
uint32_t pt_op;
static void
prot_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
vldb_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t vldb_op;
uint32_t i;
static void
vldb_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
kauth_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t kauth_op;
static void
kauth_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
vol_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t vol_op;
static void
vol_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
bos_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
uint32_t bos_op;
static void
bos_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
ubik_print(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
uint32_t ubik_op;
uint32_t temp;
static void
ubik_reply_print(netdissect_options *ndo,
- register const u_char *bp, u_int length, uint32_t opcode)
+ const u_char *bp, u_int length, uint32_t opcode)
{
const struct rx_header *rxh;
uint8_t type;
static void
rx_ack_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
const struct rx_ackPacket *rxa;
uint8_t nAcks;
sl_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int caplen = h->caplen;
- register u_int length = h->len;
- register const struct ip *ip;
+ u_int caplen = h->caplen;
+ u_int length = h->len;
+ const struct ip *ip;
if (caplen < SLIP_HDRLEN || length < SLIP_HDRLEN) {
ND_PRINT((ndo, "%s", tstr));
sl_bsdos_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
- register u_int caplen = h->caplen;
- register u_int length = h->len;
- register const struct ip *ip;
+ u_int caplen = h->caplen;
+ u_int length = h->len;
+ const struct ip *ip;
if (caplen < SLIP_HDRLEN) {
ND_PRINT((ndo, "%s", tstr));
static void
sliplink_print(netdissect_options *ndo,
- register const u_char *p, register const struct ip *ip,
- register u_int length)
+ const u_char *p, const struct ip *ip,
+ u_int length)
{
int dir;
u_int hlen;
}
if (ndo->ndo_nflag) {
/* XXX just dump the header */
- register int i;
+ int i;
for (i = SLX_CHDR; i < SLX_CHDR + CHDR_LEN - 1; ++i)
ND_PRINT((ndo, "%02x.", EXTRACT_U_1(p + i)));
static const u_char *
print_sl_change(netdissect_options *ndo,
- const char *str, register const u_char *cp)
+ const char *str, const u_char *cp)
{
- register u_int i;
+ u_int i;
if ((i = EXTRACT_U_1(cp)) == 0) {
cp++;
static const u_char *
print_sl_winchange(netdissect_options *ndo,
- register const u_char *cp)
+ const u_char *cp)
{
- register short i;
+ short i;
if ((i = EXTRACT_U_1(cp)) == 0) {
cp++;
const u_char *chdr, const struct ip *ip,
u_int length, int dir)
{
- register const u_char *cp = chdr;
- register u_int flags, hlen;
+ const u_char *cp = chdr;
+ u_int flags, hlen;
flags = EXTRACT_U_1(cp);
cp++;
};
static inline void
-sll_print(netdissect_options *ndo, register const struct sll_header *sllp, u_int length)
+sll_print(netdissect_options *ndo, const struct sll_header *sllp, u_int length)
{
u_short ether_type;
{
u_int caplen = h->caplen;
u_int length = h->len;
- register const struct sll_header *sllp;
+ const struct sll_header *sllp;
u_short ether_type;
int llc_hdrlen;
u_int hdrlen;
uint8_t pad[50];
};
-static void slow_marker_lacp_print(netdissect_options *, register const u_char *, register u_int, u_int);
-static void slow_oam_print(netdissect_options *, register const u_char *, register u_int);
+static void slow_marker_lacp_print(netdissect_options *, const u_char *, u_int, u_int);
+static void slow_oam_print(netdissect_options *, const u_char *, u_int);
void
slow_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
int print_version;
u_int subtype;
static void
slow_marker_lacp_print(netdissect_options *ndo,
- register const u_char *tptr, register u_int tlen,
+ const u_char *tptr, u_int tlen,
u_int proto_subtype)
{
const struct tlv_header_t *tlv_header;
static void
slow_oam_print(netdissect_options *ndo,
- register const u_char *tptr, register u_int tlen)
+ const u_char *tptr, u_int tlen)
{
uint8_t code;
uint8_t type, length;
*/
static int
asn1_parse(netdissect_options *ndo,
- register const u_char *p, u_int len, struct be *elem)
+ const u_char *p, u_int len, struct be *elem)
{
u_char form, class, id;
int i, hdr;
break;
case INTEGER: {
- register int32_t data;
+ int32_t data;
elem->type = BE_INT;
data = 0;
case COUNTER:
case GAUGE:
case TIMETICKS: {
- register uint32_t data;
+ uint32_t data;
elem->type = BE_UNS;
data = 0;
for (i = elem->asnlen; i-- > 0; p++)
}
case COUNTER64: {
- register uint64_t data64;
+ uint64_t data64;
elem->type = BE_UNS64;
data64 = 0;
for (i = elem->asnlen; i-- > 0; p++)
static int
asn1_print_string(netdissect_options *ndo, struct be *elem)
{
- register int printable = 1, first = 1;
+ int printable = 1, first = 1;
const u_char *p;
uint32_t asnlen = elem->asnlen;
uint32_t i;
static char *progstr(uint32_t);
void
-sunrpc_print(netdissect_options *ndo, register const u_char *bp,
- register u_int length, register const u_char *bp2)
+sunrpc_print(netdissect_options *ndo, const u_char *bp,
+ u_int length, const u_char *bp2)
{
- register const struct sunrpc_msg *rp;
- register const struct ip *ip;
- register const struct ip6_hdr *ip6;
+ const struct sunrpc_msg *rp;
+ const struct ip *ip;
+ const struct ip6_hdr *ip6;
uint32_t x;
char srcid[20], dstid[20]; /*fits 32bit*/
progstr(uint32_t prog)
{
#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
- register struct rpcent *rp;
+ struct rpcent *rp;
#endif
static char buf[32];
static uint32_t lastprog = 0;
};
static inline void
-symantec_hdr_print(netdissect_options *ndo, register const u_char *bp, u_int length)
+symantec_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
- register const struct symantec_header *sp;
+ const struct symantec_header *sp;
uint16_t etype;
sp = (const struct symantec_header *)bp;
void
syslog_print(netdissect_options *ndo,
- register const u_char *pptr, register u_int len)
+ const u_char *pptr, u_int len)
{
uint16_t msg_off = 0;
uint16_t pri = 0;
const u_char *data, int length, const u_char *rcvsig);
#endif
-static void print_tcp_rst_data(netdissect_options *, register const u_char *sp, u_int length);
-static void print_tcp_fastopen_option(netdissect_options *ndo, register const u_char *cp,
+static void print_tcp_rst_data(netdissect_options *, const u_char *sp, u_int length);
+static void print_tcp_fastopen_option(netdissect_options *ndo, const u_char *cp,
u_int datalen, int exp);
#define MAX_RST_DATA_LEN 30
static int
tcp_cksum(netdissect_options *ndo,
- register const struct ip *ip,
- register const struct tcphdr *tp,
- register u_int len)
+ const struct ip *ip,
+ const struct tcphdr *tp,
+ u_int len)
{
return nextproto4_cksum(ndo, ip, (const uint8_t *)tp, len, len,
IPPROTO_TCP);
static int
tcp6_cksum(netdissect_options *ndo,
- register const struct ip6_hdr *ip6,
- register const struct tcphdr *tp,
- register u_int len)
+ const struct ip6_hdr *ip6,
+ const struct tcphdr *tp,
+ u_int len)
{
return nextproto6_cksum(ndo, ip6, (const uint8_t *)tp, len, len,
IPPROTO_TCP);
void
tcp_print(netdissect_options *ndo,
- register const u_char *bp, register u_int length,
- register const u_char *bp2, int fragmented)
+ const u_char *bp, u_int length,
+ const u_char *bp2, int fragmented)
{
- register const struct tcphdr *tp;
- register const struct ip *ip;
- register u_char flags;
- register u_int hlen;
- register char ch;
+ const struct tcphdr *tp;
+ const struct ip *ip;
+ u_char flags;
+ u_int hlen;
+ char ch;
uint16_t sport, dport, win, urp;
uint32_t seq, ack, thseq, thack;
u_int utoval;
uint16_t magic;
- register int rev;
- register const struct ip6_hdr *ip6;
+ int rev;
+ const struct ip6_hdr *ip6;
tp = (const struct tcphdr *)bp;
ip = (const struct ip *)bp2;
*/
rev = 0;
if (ip6) {
- register struct tcp_seq_hash6 *th;
+ struct tcp_seq_hash6 *th;
struct tcp_seq_hash6 *tcp_seq_hash;
const void *src, *dst;
struct tha6 tha;
thseq = th->seq;
thack = th->ack;
} else {
- register struct tcp_seq_hash *th;
+ struct tcp_seq_hash *th;
struct tcp_seq_hash *tcp_seq_hash;
struct tha tha;
* Handle any options.
*/
if (hlen > sizeof(*tp)) {
- register const u_char *cp;
- register u_int i, opt, datalen;
- register u_int len;
+ const u_char *cp;
+ u_int i, opt, datalen;
+ u_int len;
hlen -= sizeof(*tp);
cp = (const u_char *)tp + sizeof(*tp);
* to NFS print routines.
*/
uint32_t fraglen;
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
fraglen = EXTRACT_BE_U_4(bp) & 0x7FFFFFFF;
static void
print_tcp_rst_data(netdissect_options *ndo,
- register const u_char *sp, u_int length)
+ const u_char *sp, u_int length)
{
int c;
}
static void
-print_tcp_fastopen_option(netdissect_options *ndo, register const u_char *cp,
+print_tcp_fastopen_option(netdissect_options *ndo, const u_char *cp,
u_int datalen, int exp)
{
u_int i;
*/
void
tftp_print(netdissect_options *ndo,
- register const u_char *bp, u_int length)
+ const u_char *bp, u_int length)
{
- register const char *cp;
- register int opcode;
+ const char *cp;
+ int opcode;
u_int ui;
/* Print length */
void
timed_print(netdissect_options *ndo,
- register const u_char *bp)
+ const u_char *bp)
{
const struct tsp *tsp = (const struct tsp *)bp;
long sec, usec;
*/
static inline void
token_hdr_print(netdissect_options *ndo,
- register const struct token_header *trp, register u_int length,
- register const u_char *fsrc, register const u_char *fdst)
+ const struct token_header *trp, u_int length,
+ const u_char *fsrc, const u_char *fdst)
{
const char *srcname, *dstname;
#define RTCP_PT_APP 204
static void
-vat_print(netdissect_options *ndo, const void *hdr, register const struct udphdr *up)
+vat_print(netdissect_options *ndo, const void *hdr, const struct udphdr *up)
{
/* vat/vt audio */
u_int ts;
static void
rtp_print(netdissect_options *ndo, const void *hdr, u_int len,
- register const struct udphdr *up)
+ const struct udphdr *up)
{
/* rtp v1 or v2 */
const u_int *ip = (const u_int *)hdr;
return ep;
}
-static int udp_cksum(netdissect_options *ndo, register const struct ip *ip,
- register const struct udphdr *up,
- register u_int len)
+static int udp_cksum(netdissect_options *ndo, const struct ip *ip,
+ const struct udphdr *up,
+ u_int len)
{
return nextproto4_cksum(ndo, ip, (const uint8_t *)(const void *)up, len, len,
IPPROTO_UDP);
}
void
-udp_print(netdissect_options *ndo, register const u_char *bp, u_int length,
- register const u_char *bp2, int fragmented)
+udp_print(netdissect_options *ndo, const u_char *bp, u_int length,
+ const u_char *bp2, int fragmented)
{
- register const struct udphdr *up;
- register const struct ip *ip;
- register const u_char *cp;
- register const u_char *ep = bp + length;
+ const struct udphdr *up;
+ const struct ip *ip;
+ const u_char *cp;
+ const u_char *ep = bp + length;
uint16_t sport, dport, ulen;
- register const struct ip6_hdr *ip6;
+ const struct ip6_hdr *ip6;
if (ep > ndo->ndo_snapend)
ep = ndo->ndo_snapend;
}
if (ndo->ndo_packettype) {
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
switch (ndo->ndo_packettype) {
udpipaddr_print(ndo, ip, sport, dport);
if (!ndo->ndo_qflag) {
- register const struct sunrpc_msg *rp;
+ const struct sunrpc_msg *rp;
enum sunrpc_msg_type direction;
rp = (const struct sunrpc_msg *)(up + 1);
*/
u_int
usb_linux_48_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
- register const u_char *p)
+ const u_char *p)
{
if (h->caplen < sizeof(pcap_usb_header)) {
ND_PRINT((ndo, "%s", tstr));
*/
u_int
usb_linux_64_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
- register const u_char *p)
+ const u_char *p)
{
if (h->caplen < sizeof(pcap_usb_header_mmapped)) {
ND_PRINT((ndo, "%s", tstr));
* to the packet capture mechanism.
*/
int
-vjc_print(netdissect_options *ndo, register const u_char *bp, u_short proto _U_)
+vjc_print(netdissect_options *ndo, const u_char *bp, u_short proto _U_)
{
int i;
};
void
-vqp_print(netdissect_options *ndo, register const u_char *pptr, register u_int len)
+vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
{
const struct vqp_common_header_t *vqp_common_header;
const struct vqp_obj_tlv_t *vqp_obj_tlv;
void
vrrp_print(netdissect_options *ndo,
- register const u_char *bp, register u_int len,
- register const u_char *bp2, int ttl)
+ const u_char *bp, u_int len,
+ const u_char *bp2, int ttl)
{
int version, type, auth_type = VRRP_AUTH_NONE; /* keep compiler happy */
const char *type_s;
*/
void
wb_print(netdissect_options *ndo,
- register const void *hdr, register u_int len)
+ const void *hdr, u_int len)
{
- register const struct pkt_hdr *ph;
+ const struct pkt_hdr *ph;
ph = (const struct pkt_hdr *)hdr;
if (len < sizeof(*ph) || !ND_TTEST(*ph)) {
* Copy arg vector into a new buffer, concatenating arguments with spaces.
*/
static char *
-copy_argv(register char **argv)
+copy_argv(char **argv)
{
- register char **p;
- register u_int len = 0;
+ char **p;
+ u_int len = 0;
char *buf;
char *src, *dst;
static char *
read_infile(char *fname)
{
- register int i, fd, cc;
- register char *cp;
+ int i, fd, cc;
+ char *cp;
struct stat buf;
fd = open(fname, O_RDONLY|O_BINARY);
int
main(int argc, char **argv)
{
- register int cnt, op, i;
+ int cnt, op, i;
bpf_u_int32 localnet = 0, netmask = 0;
int timezone_offset = 0;
- register char *cp, *infile, *cmdbuf, *device, *RFileName, *VFileName, *WFileName;
+ char *cp, *infile, *cmdbuf, *device, *RFileName, *VFileName, *WFileName;
char *endp;
pcap_handler callback;
int dlt;
#endif /* HAVE_FORK && HAVE_VFORK */
static void
-info(register int verbose)
+info(int verbose)
{
struct pcap_stat stats;
*/
int
fn_print(netdissect_options *ndo,
- register const u_char *s, register const u_char *ep)
+ const u_char *s, const u_char *ep)
{
- register int ret;
- register u_char c;
+ int ret;
+ u_char c;
ret = 1; /* assume truncated */
while (ep == NULL || s < ep) {
*/
u_int
fn_printztn(netdissect_options *ndo,
- register const u_char *s, register u_int n, register const u_char *ep)
+ const u_char *s, u_int n, const u_char *ep)
{
- register u_int bytes;
- register u_char c;
+ u_int bytes;
+ u_char c;
bytes = 0;
for (;;) {
*/
int
fn_printn(netdissect_options *ndo,
- register const u_char *s, register u_int n, register const u_char *ep)
+ const u_char *s, u_int n, const u_char *ep)
{
- register u_char c;
+ u_char c;
while (n > 0 && (ep == NULL || s < ep)) {
n--;
*/
int
fn_printzp(netdissect_options *ndo,
- register const u_char *s, register u_int n,
- register const u_char *ep)
+ const u_char *s, u_int n,
+ const u_char *ep)
{
- register int ret;
- register u_char c;
+ int ret;
+ u_char c;
ret = 1; /* assume truncated */
while (n > 0 && (ep == NULL || s < ep)) {
*/
void
ts_print(netdissect_options *ndo,
- register const struct timeval *tvp)
+ const struct timeval *tvp)
{
- register int s;
+ int s;
struct tm *tm;
time_t Time;
char buf[TS_BUF_SIZE];
* Convert a token value to a string; use "fmt" if not found.
*/
const char *
-tok2strbuf(register const struct tok *lp, register const char *fmt,
- register u_int v, char *buf, size_t bufsize)
+tok2strbuf(const struct tok *lp, const char *fmt,
+ u_int v, char *buf, size_t bufsize)
{
if (lp != NULL) {
while (lp->s != NULL) {
* in round-robin fashion.
*/
const char *
-tok2str(register const struct tok *lp, register const char *fmt,
- register u_int v)
+tok2str(const struct tok *lp, const char *fmt,
+ u_int v)
{
static char buf[4][TOKBUFSIZE];
static int idx = 0;
* if the s field is positive.
*/
static char *
-bittok2str_internal(register const struct tok *lp, register const char *fmt,
- register u_int v, const char *sep)
+bittok2str_internal(const struct tok *lp, const char *fmt,
+ u_int v, const char *sep)
{
static char buf[1024+1]; /* our string buffer */
char *bufp = buf;
size_t space_left = sizeof(buf), string_size;
- register u_int rotbit; /* this is the bit we rotate through all bitpositions */
- register u_int tokval;
+ u_int rotbit; /* this is the bit we rotate through all bitpositions */
+ u_int tokval;
const char * sepstr = "";
while (lp != NULL && lp->s != NULL) {
* this is useful for parsing bitfields, the output strings are not seperated.
*/
char *
-bittok2str_nosep(register const struct tok *lp, register const char *fmt,
- register u_int v)
+bittok2str_nosep(const struct tok *lp, const char *fmt,
+ u_int v)
{
return (bittok2str_internal(lp, fmt, v, ""));
}
* this is useful for parsing bitfields, the output strings are comma seperated.
*/
char *
-bittok2str(register const struct tok *lp, register const char *fmt,
- register u_int v)
+bittok2str(const struct tok *lp, const char *fmt,
+ u_int v)
{
return (bittok2str_internal(lp, fmt, v, ", "));
}
* correct for bounds-checking.
*/
const char *
-tok2strary_internal(register const char **lp, int n, register const char *fmt,
- register int v)
+tok2strary_internal(const char **lp, int n, const char *fmt,
+ int v)
{
static char buf[TOKBUFSIZE];