spacing cleaup. also, minor type mixup fixups.
This commit is contained in:
parent
e1a75f1fbc
commit
c03b53c2e8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ether.h,v 1.16 1995/04/13 06:26:04 cgd Exp $ */
|
||||
/* $NetBSD: if_ether.h,v 1.17 1995/04/17 05:32:54 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -76,7 +76,7 @@ struct ether_header {
|
|||
*/
|
||||
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
|
||||
/* struct in_addr *ipaddr; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
{ \
|
||||
(enaddr)[0] = 0x01; \
|
||||
(enaddr)[1] = 0x00; \
|
||||
|
@ -113,7 +113,7 @@ struct ether_arp {
|
|||
* begins with this structure.
|
||||
*/
|
||||
struct arpcom {
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
u_int8_t ac_enaddr[6]; /* ethernet hardware address */
|
||||
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
|
||||
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
|
||||
|
@ -157,7 +157,7 @@ struct llinfo_arp llinfo_arp; /* head of the llinfo queue */
|
|||
void arpwhohas __P((struct arpcom *, struct in_addr *));
|
||||
void arpintr __P((void));
|
||||
int arpresolve __P((struct arpcom *,
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
void arp_ifinit __P((struct arpcom *, struct ifaddr *));
|
||||
void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_arp.c,v 1.22 1995/04/13 06:25:36 cgd Exp $ */
|
||||
/* $NetBSD: if_arp.c,v 1.23 1995/04/17 05:32:52 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1988, 1993
|
||||
|
@ -81,7 +81,7 @@ int arpt_down = 20; /* once declared down, don't send for 20 secs */
|
|||
#define rt_expire rt_rmx.rmx_expire
|
||||
|
||||
static void arprequest
|
||||
__P((struct arpcom *, u_int32_t *, u_int32_t *, u_char *));
|
||||
__P((struct arpcom *, u_int32_t *, u_int32_t *, u_int8_t *));
|
||||
static void arptfree __P((struct llinfo_arp *));
|
||||
static void arptimer __P((void *));
|
||||
static struct llinfo_arp *arplookup __P((u_int32_t, int, int));
|
||||
|
@ -768,7 +768,7 @@ revarpwhoami(in, ifp)
|
|||
}
|
||||
|
||||
|
||||
#ifdef DDB
|
||||
#ifdef DDB
|
||||
static void
|
||||
db_print_sa(sa)
|
||||
struct sockaddr *sa;
|
||||
|
@ -841,7 +841,7 @@ db_show_radix_node(rn, w)
|
|||
db_printf(" mask="); db_print_sa(rt_mask(rt));
|
||||
db_printf(" gw="); db_print_sa(rt->rt_gateway);
|
||||
|
||||
db_printf(" ifp=0x%x ", rt->rt_ifp);
|
||||
db_printf(" ifp=0x%lx ", rt->rt_ifp);
|
||||
if (rt->rt_ifp)
|
||||
db_printf("(%s%d)",
|
||||
rt->rt_ifp->if_name,
|
||||
|
@ -849,7 +849,7 @@ db_show_radix_node(rn, w)
|
|||
else
|
||||
db_printf("(NULL)");
|
||||
|
||||
db_printf(" ifa=0x%x\n", rt->rt_ifa);
|
||||
db_printf(" ifa=0x%lx\n", rt->rt_ifa);
|
||||
db_print_ifa(rt->rt_ifa);
|
||||
|
||||
db_printf(" genmask="); db_print_sa(rt->rt_genmask);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_arp.h,v 1.16 1995/04/13 06:26:04 cgd Exp $ */
|
||||
/* $NetBSD: if_arp.h,v 1.17 1995/04/17 05:32:54 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -76,7 +76,7 @@ struct ether_header {
|
|||
*/
|
||||
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
|
||||
/* struct in_addr *ipaddr; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
{ \
|
||||
(enaddr)[0] = 0x01; \
|
||||
(enaddr)[1] = 0x00; \
|
||||
|
@ -113,7 +113,7 @@ struct ether_arp {
|
|||
* begins with this structure.
|
||||
*/
|
||||
struct arpcom {
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
u_int8_t ac_enaddr[6]; /* ethernet hardware address */
|
||||
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
|
||||
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
|
||||
|
@ -157,7 +157,7 @@ struct llinfo_arp llinfo_arp; /* head of the llinfo queue */
|
|||
void arpwhohas __P((struct arpcom *, struct in_addr *));
|
||||
void arpintr __P((void));
|
||||
int arpresolve __P((struct arpcom *,
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
void arp_ifinit __P((struct arpcom *, struct ifaddr *));
|
||||
void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ether.c,v 1.22 1995/04/13 06:25:36 cgd Exp $ */
|
||||
/* $NetBSD: if_ether.c,v 1.23 1995/04/17 05:32:52 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1988, 1993
|
||||
|
@ -81,7 +81,7 @@ int arpt_down = 20; /* once declared down, don't send for 20 secs */
|
|||
#define rt_expire rt_rmx.rmx_expire
|
||||
|
||||
static void arprequest
|
||||
__P((struct arpcom *, u_int32_t *, u_int32_t *, u_char *));
|
||||
__P((struct arpcom *, u_int32_t *, u_int32_t *, u_int8_t *));
|
||||
static void arptfree __P((struct llinfo_arp *));
|
||||
static void arptimer __P((void *));
|
||||
static struct llinfo_arp *arplookup __P((u_int32_t, int, int));
|
||||
|
@ -768,7 +768,7 @@ revarpwhoami(in, ifp)
|
|||
}
|
||||
|
||||
|
||||
#ifdef DDB
|
||||
#ifdef DDB
|
||||
static void
|
||||
db_print_sa(sa)
|
||||
struct sockaddr *sa;
|
||||
|
@ -841,7 +841,7 @@ db_show_radix_node(rn, w)
|
|||
db_printf(" mask="); db_print_sa(rt_mask(rt));
|
||||
db_printf(" gw="); db_print_sa(rt->rt_gateway);
|
||||
|
||||
db_printf(" ifp=0x%x ", rt->rt_ifp);
|
||||
db_printf(" ifp=0x%lx ", rt->rt_ifp);
|
||||
if (rt->rt_ifp)
|
||||
db_printf("(%s%d)",
|
||||
rt->rt_ifp->if_name,
|
||||
|
@ -849,7 +849,7 @@ db_show_radix_node(rn, w)
|
|||
else
|
||||
db_printf("(NULL)");
|
||||
|
||||
db_printf(" ifa=0x%x\n", rt->rt_ifa);
|
||||
db_printf(" ifa=0x%lx\n", rt->rt_ifa);
|
||||
db_print_ifa(rt->rt_ifa);
|
||||
|
||||
db_printf(" genmask="); db_print_sa(rt->rt_genmask);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ether.h,v 1.16 1995/04/13 06:26:04 cgd Exp $ */
|
||||
/* $NetBSD: if_ether.h,v 1.17 1995/04/17 05:32:54 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -76,7 +76,7 @@ struct ether_header {
|
|||
*/
|
||||
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
|
||||
/* struct in_addr *ipaddr; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
{ \
|
||||
(enaddr)[0] = 0x01; \
|
||||
(enaddr)[1] = 0x00; \
|
||||
|
@ -113,7 +113,7 @@ struct ether_arp {
|
|||
* begins with this structure.
|
||||
*/
|
||||
struct arpcom {
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
u_int8_t ac_enaddr[6]; /* ethernet hardware address */
|
||||
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
|
||||
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
|
||||
|
@ -157,7 +157,7 @@ struct llinfo_arp llinfo_arp; /* head of the llinfo queue */
|
|||
void arpwhohas __P((struct arpcom *, struct in_addr *));
|
||||
void arpintr __P((void));
|
||||
int arpresolve __P((struct arpcom *,
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
void arp_ifinit __P((struct arpcom *, struct ifaddr *));
|
||||
void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_inarp.h,v 1.16 1995/04/13 06:26:04 cgd Exp $ */
|
||||
/* $NetBSD: if_inarp.h,v 1.17 1995/04/17 05:32:54 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -76,7 +76,7 @@ struct ether_header {
|
|||
*/
|
||||
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
|
||||
/* struct in_addr *ipaddr; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
/* u_int8_t enaddr[6]; */ \
|
||||
{ \
|
||||
(enaddr)[0] = 0x01; \
|
||||
(enaddr)[1] = 0x00; \
|
||||
|
@ -113,7 +113,7 @@ struct ether_arp {
|
|||
* begins with this structure.
|
||||
*/
|
||||
struct arpcom {
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
struct ifnet ac_if; /* network-visible interface */
|
||||
u_int8_t ac_enaddr[6]; /* ethernet hardware address */
|
||||
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
|
||||
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
|
||||
|
@ -157,7 +157,7 @@ struct llinfo_arp llinfo_arp; /* head of the llinfo queue */
|
|||
void arpwhohas __P((struct arpcom *, struct in_addr *));
|
||||
void arpintr __P((void));
|
||||
int arpresolve __P((struct arpcom *,
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
struct rtentry *, struct mbuf *, struct sockaddr *, u_char *));
|
||||
void arp_ifinit __P((struct arpcom *, struct ifaddr *));
|
||||
void arp_rtrequest __P((int, struct rtentry *, struct sockaddr *));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ip.h,v 1.7 1995/04/13 06:31:24 cgd Exp $ */
|
||||
/* $NetBSD: ip.h,v 1.8 1995/04/17 05:32:56 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -67,7 +67,7 @@ struct ip {
|
|||
u_int8_t ip_ttl; /* time to live */
|
||||
u_int8_t ip_p; /* protocol */
|
||||
u_int16_t ip_sum; /* checksum */
|
||||
struct in_addr ip_src, ip_dst; /* source and dest address */
|
||||
struct in_addr ip_src, ip_dst; /* source and dest address */
|
||||
};
|
||||
|
||||
#define IP_MAXPACKET 65535 /* maximum packet size */
|
||||
|
@ -137,11 +137,11 @@ struct ip_timestamp {
|
|||
ipt_flg:4; /* flags, see below */
|
||||
#endif
|
||||
union ipt_timestamp {
|
||||
n_time ipt_time[1];
|
||||
struct ipt_ta {
|
||||
n_time ipt_time[1];
|
||||
struct ipt_ta {
|
||||
struct in_addr ipt_addr;
|
||||
n_time ipt_time;
|
||||
} ipt_ta[1];
|
||||
} ipt_ta[1];
|
||||
} ipt_timestamp;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ip_icmp.h,v 1.8 1995/04/13 06:32:41 cgd Exp $ */
|
||||
/* $NetBSD: ip_icmp.h,v 1.9 1995/04/17 05:32:57 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -48,46 +48,46 @@ struct icmp {
|
|||
u_int8_t icmp_code; /* type sub code */
|
||||
u_int16_t icmp_cksum; /* ones complement cksum of struct */
|
||||
union {
|
||||
u_int8_t ih_pptr; /* ICMP_PARAMPROB */
|
||||
u_int8_t ih_pptr; /* ICMP_PARAMPROB */
|
||||
struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
|
||||
struct ih_idseq {
|
||||
n_short icd_id;
|
||||
n_short icd_seq;
|
||||
n_short icd_id;
|
||||
n_short icd_seq;
|
||||
} ih_idseq;
|
||||
int32_t ih_void;
|
||||
int32_t ih_void;
|
||||
|
||||
/* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
|
||||
struct ih_pmtu {
|
||||
n_short ipm_void;
|
||||
n_short ipm_nextmtu;
|
||||
n_short ipm_void;
|
||||
n_short ipm_nextmtu;
|
||||
} ih_pmtu;
|
||||
} icmp_hun;
|
||||
#define icmp_pptr icmp_hun.ih_pptr
|
||||
#define icmp_gwaddr icmp_hun.ih_gwaddr
|
||||
#define icmp_id icmp_hun.ih_idseq.icd_id
|
||||
#define icmp_seq icmp_hun.ih_idseq.icd_seq
|
||||
#define icmp_void icmp_hun.ih_void
|
||||
#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
|
||||
#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
|
||||
#define icmp_pptr icmp_hun.ih_pptr
|
||||
#define icmp_gwaddr icmp_hun.ih_gwaddr
|
||||
#define icmp_id icmp_hun.ih_idseq.icd_id
|
||||
#define icmp_seq icmp_hun.ih_idseq.icd_seq
|
||||
#define icmp_void icmp_hun.ih_void
|
||||
#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
|
||||
#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
|
||||
union {
|
||||
struct id_ts {
|
||||
n_time its_otime;
|
||||
n_time its_rtime;
|
||||
n_time its_ttime;
|
||||
n_time its_otime;
|
||||
n_time its_rtime;
|
||||
n_time its_ttime;
|
||||
} id_ts;
|
||||
struct id_ip {
|
||||
struct ip idi_ip;
|
||||
/* options and then 64 bits of data */
|
||||
struct ip idi_ip;
|
||||
/* options and then 64 bits of data */
|
||||
} id_ip;
|
||||
u_int32_t id_mask;
|
||||
int8_t id_data[1];
|
||||
} icmp_dun;
|
||||
#define icmp_otime icmp_dun.id_ts.its_otime
|
||||
#define icmp_rtime icmp_dun.id_ts.its_rtime
|
||||
#define icmp_ttime icmp_dun.id_ts.its_ttime
|
||||
#define icmp_ip icmp_dun.id_ip.idi_ip
|
||||
#define icmp_mask icmp_dun.id_mask
|
||||
#define icmp_data icmp_dun.id_data
|
||||
#define icmp_otime icmp_dun.id_ts.its_otime
|
||||
#define icmp_rtime icmp_dun.id_ts.its_rtime
|
||||
#define icmp_ttime icmp_dun.id_ts.its_ttime
|
||||
#define icmp_ip icmp_dun.id_ip.idi_ip
|
||||
#define icmp_mask icmp_dun.id_mask
|
||||
#define icmp_data icmp_dun.id_data
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcp.h,v 1.7 1995/04/13 06:36:30 cgd Exp $ */
|
||||
/* $NetBSD: tcp.h,v 1.8 1995/04/17 05:32:58 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -35,7 +35,7 @@
|
|||
* @(#)tcp.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
typedef u_int32_t tcp_seq;
|
||||
typedef u_int32_t tcp_seq;
|
||||
/*
|
||||
* TCP header.
|
||||
* Per RFC 793, September, 1981.
|
||||
|
@ -43,8 +43,8 @@ typedef u_int32_t tcp_seq;
|
|||
struct tcphdr {
|
||||
u_int16_t th_sport; /* source port */
|
||||
u_int16_t th_dport; /* destination port */
|
||||
tcp_seq th_seq; /* sequence number */
|
||||
tcp_seq th_ack; /* acknowledgement number */
|
||||
tcp_seq th_seq; /* sequence number */
|
||||
tcp_seq th_ack; /* acknowledgement number */
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_int8_t th_x2:4, /* (unused) */
|
||||
th_off:4; /* data offset */
|
||||
|
@ -54,12 +54,12 @@ struct tcphdr {
|
|||
th_x2:4; /* (unused) */
|
||||
#endif
|
||||
u_int8_t th_flags;
|
||||
#define TH_FIN 0x01
|
||||
#define TH_SYN 0x02
|
||||
#define TH_RST 0x04
|
||||
#define TH_PUSH 0x08
|
||||
#define TH_ACK 0x10
|
||||
#define TH_URG 0x20
|
||||
#define TH_FIN 0x01
|
||||
#define TH_SYN 0x02
|
||||
#define TH_RST 0x04
|
||||
#define TH_PUSH 0x08
|
||||
#define TH_ACK 0x10
|
||||
#define TH_URG 0x20
|
||||
u_int16_t th_win; /* window */
|
||||
u_int16_t th_sum; /* checksum */
|
||||
u_int16_t th_urp; /* urgent pointer */
|
||||
|
|
Loading…
Reference in New Issue