Fix some inconsistent spacing; spaces at the end of lines, etc.

This commit is contained in:
mycroft 1994-01-08 21:21:28 +00:00
parent 8bcd07afc2
commit 4fe12e6e88
33 changed files with 191 additions and 193 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_ether.h,v 1.6 1993/12/30 04:17:40 deraadt Exp $
* $Id: if_ether.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -56,8 +56,8 @@ struct ether_header {
#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
/*
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
@ -76,7 +76,7 @@ struct ether_header {
* The high-order 25 bits of the Ethernet address are statically assigned,
* and the low-order 23 bits are taken from the low end of the IP address.
*/
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
/* struct in_addr *ipaddr; */ \
/* u_char enaddr[6]; */ \
{ \
@ -88,7 +88,7 @@ struct ether_header {
(enaddr)[5] = ((u_char *)ipaddr)[3]; \
}
#endif
/*
* Ethernet Address Resolution Protocol.
@ -180,7 +180,7 @@ struct ether_multistep {
* multicast addresses connected to a given arpcom structure. If no matching
* record is found, "enm" returns NULL.
*/
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
/* u_char addrlo[6]; */ \
/* u_char addrhi[6]; */ \
/* struct arpcom *ac; */ \
@ -200,7 +200,7 @@ struct ether_multistep {
* and get the first record. Both macros return a NULL "enm" when there
* are no remaining records.
*/
#define ETHER_NEXT_MULTI(step, enm) \
#define ETHER_NEXT_MULTI(step, enm) \
/* struct ether_multistep step; */ \
/* struct ether_multi *enm; */ \
{ \
@ -208,7 +208,7 @@ struct ether_multistep {
(step).e_enm = (enm)->enm_next; \
}
#define ETHER_FIRST_MULTI(step, ac, enm) \
#define ETHER_FIRST_MULTI(step, ac, enm) \
/* struct ether_multistep step; */ \
/* struct arpcom *ac; */ \
/* struct ether_multi *enm; */ \

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)icmp_var.h 7.5 (Berkeley) 6/28/90
* $Id: icmp_var.h,v 1.3 1993/05/20 03:49:51 cgd Exp $
* $Id: icmp_var.h,v 1.4 1994/01/08 21:21:28 mycroft Exp $
*/
#ifndef _NETINET_ICMP_VAR_H_
@ -48,7 +48,7 @@ struct icmpstat {
int icps_oldicmp; /* no error 'cuz old was icmp */
int icps_outhist[ICMP_MAXTYPE + 1];
/* statistics related to input messages processed */
int icps_badcode; /* icmp_code out of range */
int icps_badcode; /* icmp_code out of range */
int icps_tooshort; /* packet < ICMP_MINLEN */
int icps_checksum; /* bad checksum */
int icps_badlen; /* calculated bound mismatch */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90
* $Id: if_arp.c,v 1.5 1993/12/18 00:41:48 mycroft Exp $
* $Id: if_arp.c,v 1.6 1994/01/08 21:21:29 mycroft Exp $
*/
/*
@ -76,7 +76,7 @@ int arptab_size = ARPTAB_SIZE; /* for arp command */
* ARP trailer negotiation. Trailer protocol is not IP specific,
* but ARP request/response use IP addresses.
*/
#define ETHERTYPE_IPTRAILERS ETHERTYPE_TRAIL
#define ETHERTYPE_IPTRAILERS ETHERTYPE_TRAIL
#define ARPTAB_HASH(a) \
((u_long)(a) % ARPTAB_NB)
@ -162,7 +162,7 @@ arpwhohas(ac, addr)
int useloopback = 1; /* use loopback interface for local traffic */
/*
* Resolve an IP address into an ethernet address. If success,
* Resolve an IP address into an ethernet address. If success,
* desten is filled in. If there is no entry in arptab,
* set one up and broadcast a request for the IP address.
* Hold onto this mbuf and resend it once the address
@ -441,7 +441,7 @@ reply:
sizeof(ea->arp_spa));
bcopy((caddr_t)&itaddr, (caddr_t)ea->arp_spa,
sizeof(ea->arp_spa));
ea->arp_op = htons(ARPOP_REPLY);
ea->arp_op = htons(ARPOP_REPLY);
/*
* If incoming packet was an IP reply,
* we are sending a reply for type IPTRAILERS.
@ -490,7 +490,7 @@ arptfree(at)
}
/*
* Enter a new address in arptab, pushing out the oldest entry
* Enter a new address in arptab, pushing out the oldest entry
* from the bucket if there is no room.
* This always succeeds since no bucket can be completely filled
* with permanent entries (except from arpioctl when testing whether
@ -579,7 +579,7 @@ arpioctl(cmd, data)
if (ar->arp_flags & ATF_PERM) {
/* never make all entries in a bucket permanent */
register struct arptab *tat;
/* try to re-allocate */
tat = arptnew(&sin->sin_addr);
if (tat == NULL) {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_arp.h,v 1.6 1993/12/30 04:17:40 deraadt Exp $
* $Id: if_arp.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -56,8 +56,8 @@ struct ether_header {
#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
/*
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
@ -76,7 +76,7 @@ struct ether_header {
* The high-order 25 bits of the Ethernet address are statically assigned,
* and the low-order 23 bits are taken from the low end of the IP address.
*/
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
/* struct in_addr *ipaddr; */ \
/* u_char enaddr[6]; */ \
{ \
@ -88,7 +88,7 @@ struct ether_header {
(enaddr)[5] = ((u_char *)ipaddr)[3]; \
}
#endif
/*
* Ethernet Address Resolution Protocol.
@ -180,7 +180,7 @@ struct ether_multistep {
* multicast addresses connected to a given arpcom structure. If no matching
* record is found, "enm" returns NULL.
*/
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
/* u_char addrlo[6]; */ \
/* u_char addrhi[6]; */ \
/* struct arpcom *ac; */ \
@ -200,7 +200,7 @@ struct ether_multistep {
* and get the first record. Both macros return a NULL "enm" when there
* are no remaining records.
*/
#define ETHER_NEXT_MULTI(step, enm) \
#define ETHER_NEXT_MULTI(step, enm) \
/* struct ether_multistep step; */ \
/* struct ether_multi *enm; */ \
{ \
@ -208,7 +208,7 @@ struct ether_multistep {
(step).e_enm = (enm)->enm_next; \
}
#define ETHER_FIRST_MULTI(step, ac, enm) \
#define ETHER_FIRST_MULTI(step, ac, enm) \
/* struct ether_multistep step; */ \
/* struct arpcom *ac; */ \
/* struct ether_multi *enm; */ \

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90
* $Id: if_ether.c,v 1.5 1993/12/18 00:41:48 mycroft Exp $
* $Id: if_ether.c,v 1.6 1994/01/08 21:21:29 mycroft Exp $
*/
/*
@ -76,7 +76,7 @@ int arptab_size = ARPTAB_SIZE; /* for arp command */
* ARP trailer negotiation. Trailer protocol is not IP specific,
* but ARP request/response use IP addresses.
*/
#define ETHERTYPE_IPTRAILERS ETHERTYPE_TRAIL
#define ETHERTYPE_IPTRAILERS ETHERTYPE_TRAIL
#define ARPTAB_HASH(a) \
((u_long)(a) % ARPTAB_NB)
@ -162,7 +162,7 @@ arpwhohas(ac, addr)
int useloopback = 1; /* use loopback interface for local traffic */
/*
* Resolve an IP address into an ethernet address. If success,
* Resolve an IP address into an ethernet address. If success,
* desten is filled in. If there is no entry in arptab,
* set one up and broadcast a request for the IP address.
* Hold onto this mbuf and resend it once the address
@ -441,7 +441,7 @@ reply:
sizeof(ea->arp_spa));
bcopy((caddr_t)&itaddr, (caddr_t)ea->arp_spa,
sizeof(ea->arp_spa));
ea->arp_op = htons(ARPOP_REPLY);
ea->arp_op = htons(ARPOP_REPLY);
/*
* If incoming packet was an IP reply,
* we are sending a reply for type IPTRAILERS.
@ -490,7 +490,7 @@ arptfree(at)
}
/*
* Enter a new address in arptab, pushing out the oldest entry
* Enter a new address in arptab, pushing out the oldest entry
* from the bucket if there is no room.
* This always succeeds since no bucket can be completely filled
* with permanent entries (except from arpioctl when testing whether
@ -579,7 +579,7 @@ arpioctl(cmd, data)
if (ar->arp_flags & ATF_PERM) {
/* never make all entries in a bucket permanent */
register struct arptab *tat;
/* try to re-allocate */
tat = arptnew(&sin->sin_addr);
if (tat == NULL) {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_ether.h,v 1.6 1993/12/30 04:17:40 deraadt Exp $
* $Id: if_ether.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -56,8 +56,8 @@ struct ether_header {
#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
/*
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
@ -76,7 +76,7 @@ struct ether_header {
* The high-order 25 bits of the Ethernet address are statically assigned,
* and the low-order 23 bits are taken from the low end of the IP address.
*/
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
/* struct in_addr *ipaddr; */ \
/* u_char enaddr[6]; */ \
{ \
@ -88,7 +88,7 @@ struct ether_header {
(enaddr)[5] = ((u_char *)ipaddr)[3]; \
}
#endif
/*
* Ethernet Address Resolution Protocol.
@ -180,7 +180,7 @@ struct ether_multistep {
* multicast addresses connected to a given arpcom structure. If no matching
* record is found, "enm" returns NULL.
*/
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
/* u_char addrlo[6]; */ \
/* u_char addrhi[6]; */ \
/* struct arpcom *ac; */ \
@ -200,7 +200,7 @@ struct ether_multistep {
* and get the first record. Both macros return a NULL "enm" when there
* are no remaining records.
*/
#define ETHER_NEXT_MULTI(step, enm) \
#define ETHER_NEXT_MULTI(step, enm) \
/* struct ether_multistep step; */ \
/* struct ether_multi *enm; */ \
{ \
@ -208,7 +208,7 @@ struct ether_multistep {
(step).e_enm = (enm)->enm_next; \
}
#define ETHER_FIRST_MULTI(step, ac, enm) \
#define ETHER_FIRST_MULTI(step, ac, enm) \
/* struct ether_multistep step; */ \
/* struct arpcom *ac; */ \
/* struct ether_multi *enm; */ \

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_inarp.h,v 1.6 1993/12/30 04:17:40 deraadt Exp $
* $Id: if_inarp.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -56,8 +56,8 @@ struct ether_header {
#define ETHERTYPE_PUP 0x0200 /* PUP protocol */
#define ETHERTYPE_IP 0x0800 /* IP protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
#define ETHERTYPE_ARP 0x0806 /* address resolution protocol */
#define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */
/*
* The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
@ -76,7 +76,7 @@ struct ether_header {
* The high-order 25 bits of the Ethernet address are statically assigned,
* and the low-order 23 bits are taken from the low end of the IP address.
*/
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
/* struct in_addr *ipaddr; */ \
/* u_char enaddr[6]; */ \
{ \
@ -88,7 +88,7 @@ struct ether_header {
(enaddr)[5] = ((u_char *)ipaddr)[3]; \
}
#endif
/*
* Ethernet Address Resolution Protocol.
@ -180,7 +180,7 @@ struct ether_multistep {
* multicast addresses connected to a given arpcom structure. If no matching
* record is found, "enm" returns NULL.
*/
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
#define ETHER_LOOKUP_MULTI(addrlo, addrhi, ac, enm) \
/* u_char addrlo[6]; */ \
/* u_char addrhi[6]; */ \
/* struct arpcom *ac; */ \
@ -200,7 +200,7 @@ struct ether_multistep {
* and get the first record. Both macros return a NULL "enm" when there
* are no remaining records.
*/
#define ETHER_NEXT_MULTI(step, enm) \
#define ETHER_NEXT_MULTI(step, enm) \
/* struct ether_multistep step; */ \
/* struct ether_multi *enm; */ \
{ \
@ -208,7 +208,7 @@ struct ether_multistep {
(step).e_enm = (enm)->enm_next; \
}
#define ETHER_FIRST_MULTI(step, ac, enm) \
#define ETHER_FIRST_MULTI(step, ac, enm) \
/* struct ether_multistep step; */ \
/* struct arpcom *ac; */ \
/* struct ether_multi *enm; */ \

View File

@ -80,7 +80,7 @@ igmp_input(m, iphlen)
{
register struct igmp *igmp;
register struct ip *ip;
register int igmplen;
register int igmplen;
register struct ifnet *ifp = m->m_pkthdr.rcvif;
register int minlen;
register struct in_multi *inm;

View File

@ -49,12 +49,12 @@ struct igmp {
struct in_addr igmp_group; /* group address being reported */
}; /* (zero for queries) */
#define IGMP_MINLEN 8
#define IGMP_MINLEN 8
#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* message types, incl. version */
#define IGMP_HOST_MEMBERSHIP_REPORT 0x12
#define IGMP_DVMRP 0x13 /* for experimental multicast */
#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* message types, incl. version */
#define IGMP_HOST_MEMBERSHIP_REPORT 0x12
#define IGMP_DVMRP 0x13 /* for experimental multicast */
/* routing protocol */
#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */
/* query (in seconds) */

View File

@ -66,7 +66,7 @@ struct igmpstat igmpstat;
* DELAY * countdown frequency). We assume that the routine random()
* is defined somewhere (and that it returns a positive number).
*/
#define IGMP_RANDOM_DELAY(multiaddr) \
#define IGMP_RANDOM_DELAY(multiaddr) \
/* struct in_addr multiaddr; */ \
(random() % (IGMP_MAX_HOST_REPORT_DELAY * PR_FASTHZ) + 1)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in.c 7.17 (Berkeley) 4/20/91
* $Id: in.c,v 1.6 1993/12/18 00:41:50 mycroft Exp $
* $Id: in.c,v 1.7 1994/01/08 21:21:36 mycroft Exp $
*/
#include <sys/param.h>
@ -180,7 +180,7 @@ in_lnaof(in)
} else if (IN_CLASSD(i)) {
net = i & IN_CLASSD_NET;
host = i & IN_CLASSD_HOST;
#endif
#endif
} else
return (i);
@ -547,7 +547,7 @@ in_ifinit(ifp, ia, sin, scrub)
* Add route for the network.
*/
if (ifp->if_flags & IFF_BROADCAST) {
ia->ia_broadaddr.sin_addr =
ia->ia_broadaddr.sin_addr =
in_makeaddr(ia->ia_subnet, INADDR_BROADCAST);
ia->ia_netbroadcast.s_addr =
htonl(ia->ia_net | (INADDR_BROADCAST &~ ia->ia_netmask));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in.h 7.11 (Berkeley) 4/20/91
* $Id: in.h,v 1.4 1993/12/06 05:46:37 hpeyerl Exp $
* $Id: in.h,v 1.5 1994/01/08 21:21:38 mycroft Exp $
*/
#ifndef _NETINET_IN_H_
@ -47,7 +47,7 @@
*/
#define IPPROTO_IP 0 /* dummy for IP */
#define IPPROTO_ICMP 1 /* control message protocol */
#define IPPROTO_IGMP 2 /* group control protocol */
#define IPPROTO_IGMP 2 /* group mgmt protocol */
#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */
#define IPPROTO_TCP 6 /* tcp */
#define IPPROTO_EGP 8 /* exterior gateway protocol */
@ -101,31 +101,31 @@ struct in_addr {
#define IN_CLASSC_HOST 0x000000ff
#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
#define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */
#define IN_CLASSD_NSHIFT 28 /* net and host fields, but */
#define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */
#define IN_MULTICAST(i) IN_CLASSD(i)
#define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000) == 0xe0000000)
#define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000)
#define INADDR_ANY (u_long)0x00000000
#define INADDR_LOOPBACK (u_long)0x7f000001
#define INADDR_LOOPBACK (u_long)0x7f000001
#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
#ifndef KERNEL
#define INADDR_NONE 0xffffffff /* -1 return */
#endif
#define INADDR_UNSPEC_GROUP (u_long)0xe0000000 /* 224.0.0.0 */
#define INADDR_ALLHOSTS_GROUP (u_long)0xe0000001 /* 224.0.0.1 */
#define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */
#define INADDR_UNSPEC_GROUP (u_long)0xe0000000 /* 224.0.0.0 */
#define INADDR_ALLHOSTS_GROUP (u_long)0xe0000001 /* 224.0.0.1 */
#define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */
#define IN_LOOPBACKNET 127 /* official! */
/*
* Define a macro to stuff the loopback address into an Internet address
*/
#define IN_SET_LOOPBACK_ADDR(a) { \
#define IN_SET_LOOPBACK_ADDR(a) { \
(a)->sin_addr.s_addr = htonl(INADDR_LOOPBACK); \
(a)->sin_family = AF_INET; }
/*
@ -155,31 +155,30 @@ struct ip_opts {
* Options for use with [gs]etsockopt at the IP level.
* First word of comment is data type; bool is stored in int.
*/
#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP per-packet options */
#define IP_MULTICAST_IF 2 /* set/get IP multicast interface */
#define IP_MULTICAST_TTL 3 /* set/get IP multicast timetolive */
#define IP_MULTICAST_LOOP 4 /* set/get IP multicast loopback */
#define IP_ADD_MEMBERSHIP 5 /* add an IP group membership */
#define IP_DROP_MEMBERSHIP 6 /* drop an IP group membership */
#define IP_HDRINCL 7 /* int; header is included with data (raw) */
#define IP_TOS 8 /* int; IP type of service and precedence */
#define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */
#define IP_MULTICAST_IF 2 /* u_char; set/get IP mcast i/f */
#define IP_MULTICAST_TTL 3 /* u_char; set/get IP mcast ttl */
#define IP_MULTICAST_LOOP 4 /* u_char; set/get IP mcast loopback */
#define IP_ADD_MEMBERSHIP 5 /* ip_mreq; add IP group membership */
#define IP_DROP_MEMBERSHIP 6 /* ip_mreq; drop IP group membership */
#define IP_HDRINCL 7 /* int; header is included with data */
#define IP_TOS 8 /* int; IP type of service and preced */
#define IP_TTL 9 /* int; IP time to live */
#define IP_RECVOPTS 10 /* bool; receive all IP options w/datagram */
#define IP_RECVRETOPTS 11 /* bool; receive IP options for response */
#define IP_RECVDSTADDR 12 /* bool; receive IP dst addr w/datagram */
#define IP_RETOPTS 13 /* ip_opts; set/get IP per-packet options */
#define IP_RECVOPTS 10 /* bool; receive all IP opts w/dgram */
#define IP_RECVRETOPTS 11 /* bool; receive IP opts for response */
#define IP_RECVDSTADDR 12 /* bool; receive IP dst addr w/dgram */
#define IP_RETOPTS 13 /* ip_opts; set/get IP options */
#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */
#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */
/*
* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
*/
struct ip_mreq {
struct in_addr imr_multiaddr; /* IP multicast address of group */
struct in_addr imr_interface; /* local IP address of interface */
struct in_addr imr_multiaddr; /* IP multicast address of group */
struct in_addr imr_interface; /* local IP address of interface */
};
#ifdef KERNEL

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_cksum.c 7.3 (Berkeley) 6/28/90
* $Id: in_cksum.c,v 1.4 1993/12/18 00:41:51 mycroft Exp $
* $Id: in_cksum.c,v 1.5 1994/01/08 21:21:39 mycroft Exp $
*/
#include <sys/types.h>
@ -44,8 +44,8 @@
* code and should be modified for each CPU to be as fast as possible.
*/
#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
#define ADDCARRY(x) (x > 65535 ? x -= 65535 : x)
#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
in_cksum_c(m, len)
register struct mbuf *m;
@ -75,7 +75,7 @@ in_cksum_c(m, len)
* of a word spanning between this mbuf and the
* last mbuf.
*
* s_util.c[0] is already saved when scanning previous
* s_util.c[0] is already saved when scanning previous
* mbuf.
*/
s_util.c[1] = *(char *)w;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_pcb.c 7.14 (Berkeley) 4/20/91
* $Id: in_pcb.c,v 1.7 1993/12/18 00:41:53 mycroft Exp $
* $Id: in_pcb.c,v 1.8 1994/01/08 21:21:40 mycroft Exp $
*/
#include <sys/param.h>
@ -74,7 +74,7 @@ in_pcballoc(so, head)
so->so_pcb = (caddr_t)inp;
return (0);
}
in_pcbbind(inp, nam)
register struct inpcb *inp;
struct mbuf *nam;
@ -89,7 +89,7 @@ in_pcbbind(inp, nam)
return (EADDRNOTAVAIL);
if (inp->inp_lport || inp->inp_laddr.s_addr != INADDR_ANY)
return (EINVAL);
if ((so->so_options & SO_REUSEADDR) == 0 &&
((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 ||
(so->so_options & SO_ACCEPTCONN) == 0))
@ -173,14 +173,14 @@ in_pcbconnect(inp, nam)
struct ifnet *ifp;
ia = (struct in_ifaddr *)0;
/*
/*
* If route is known or can be allocated now,
* our src addr is taken from the i/f, else punt.
*/
ro = &inp->inp_route;
if (ro->ro_rt &&
(satosin(&ro->ro_dst)->sin_addr.s_addr !=
sin->sin_addr.s_addr ||
sin->sin_addr.s_addr ||
inp->inp_socket->so_options & SO_DONTROUTE)) {
RTFREE(ro->ro_rt);
ro->ro_rt = (struct rtentry *)0;
@ -230,7 +230,7 @@ in_pcbconnect(inp, nam)
inp->inp_moptions != NULL) {
struct ip_moptions *imo;
struct ifnet *ifp;
imo = inp->inp_moptions;
if (imo->imo_multicast_ifp != NULL) {
ifp = imo->imo_multicast_ifp;
@ -294,7 +294,7 @@ in_setsockaddr(inp, nam)
struct mbuf *nam;
{
register struct sockaddr_in *sin;
nam->m_len = sizeof (*sin);
sin = mtod(nam, struct sockaddr_in *);
bzero((caddr_t)sin, sizeof (*sin));
@ -309,7 +309,7 @@ in_setpeeraddr(inp, nam)
struct mbuf *nam;
{
register struct sockaddr_in *sin;
nam->m_len = sizeof (*sin);
sin = mtod(nam, struct sockaddr_in *);
bzero((caddr_t)sin, sizeof (*sin));
@ -397,7 +397,7 @@ in_losing(inp)
(struct sockaddr *)0, rt->rt_flags, 0);
if (rt->rt_flags & RTF_DYNAMIC)
(void) rtrequest(RTM_DELETE, rt_key(rt),
rt->rt_gateway, rt_mask(rt), rt->rt_flags,
rt->rt_gateway, rt_mask(rt), rt->rt_flags,
(struct rtentry **)0);
inp->inp_route.ro_rt = 0;
rtfree(rt);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_pcb.h 7.6 (Berkeley) 6/28/90
* $Id: in_pcb.h,v 1.4 1993/12/08 23:46:31 hpeyerl Exp $
* $Id: in_pcb.h,v 1.5 1994/01/08 21:21:41 mycroft Exp $
*/
#ifndef _NETINET_IN_PCB_H_
@ -59,7 +59,7 @@ struct inpcb {
int inp_flags; /* generic IP/datagram flags */
struct ip inp_ip; /* header prototype; should have more */
struct mbuf *inp_options; /* IP options */
struct ip_moptions *inp_moptions; /* IP multicast options */
struct ip_moptions *inp_moptions; /* IP multicast options */
};
/* flags in inp_flags: */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_proto.c 7.5 (Berkeley) 6/28/90
* $Id: in_proto.c,v 1.5 1993/12/18 00:41:54 mycroft Exp $
* $Id: in_proto.c,v 1.6 1994/01/08 21:21:42 mycroft Exp $
*/
#include <sys/param.h>
@ -138,7 +138,7 @@ struct protosw inetsw[] = {
0, 0, 0, 0,
},
#endif
/* raw wildcard */
/* raw wildcard */
{ SOCK_RAW, &inetdomain, 0, PR_ATOMIC|PR_ADDR,
rip_input, rip_output, 0, rip_ctloutput,
rip_usrreq,
@ -147,7 +147,7 @@ struct protosw inetsw[] = {
};
struct domain inetdomain =
{ AF_INET, "internet", 0, 0, 0,
{ AF_INET, "internet", 0, 0, 0,
inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])] };
#if NIMP > 0

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_var.h 7.6 (Berkeley) 6/28/90
* $Id: in_var.h,v 1.4 1993/12/08 23:48:05 hpeyerl Exp $
* $Id: in_var.h,v 1.5 1994/01/08 21:21:43 mycroft Exp $
*/
#ifndef _NETINET_IN_VAR_H_
@ -46,7 +46,7 @@
struct in_ifaddr {
struct ifaddr ia_ifa; /* protocol-independent info */
#define ia_ifp ia_ifa.ifa_ifp
#define ia_flags ia_ifa.ifa_flags
#define ia_flags ia_ifa.ifa_flags
/* ia_{,sub}net{,mask} in host order */
u_long ia_net; /* network number of interface */
u_long ia_netmask; /* mask of net part */
@ -58,14 +58,14 @@ struct in_ifaddr {
struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */
#define ia_broadaddr ia_dstaddr
struct sockaddr_in ia_sockmask; /* reserve space for general netmask */
struct in_multi *ia_multiaddrs; /*list of multicast addresses */
struct in_multi *ia_multiaddrs; /* list of multicast addresses */
};
struct in_aliasreq {
char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */
struct sockaddr_in ifra_addr;
struct sockaddr_in ifra_broadaddr;
#define ifra_dstaddr ifra_broadaddr
#define ifra_dstaddr ifra_broadaddr
struct sockaddr_in ifra_mask;
};
/*
@ -85,7 +85,7 @@ struct ifqueue ipintrq; /* ip packet input queue */
* Macro for finding the interface (ifnet structure) corresponding to one
* of our IP addresses.
*/
#define INADDR_TO_IFP(addr, ifp) \
#define INADDR_TO_IFP(addr, ifp) \
/* struct in_addr addr; */ \
/* struct ifnet *ifp; */ \
{ \
@ -102,7 +102,7 @@ struct ifqueue ipintrq; /* ip packet input queue */
* Macro for finding the internet address structure (in_ifaddr) corresponding
* to a given interface (ifnet structure).
*/
#define IFP_TO_IA(ifp, ia) \
#define IFP_TO_IA(ifp, ia) \
/* struct ifnet *ifp; */ \
/* struct in_ifaddr *ia; */ \
{ \
@ -142,7 +142,7 @@ struct in_multistep {
* Macro for looking up the in_multi record for a given IP multicast address
* on a given interface. If no matching record is found, "inm" returns NULL.
*/
#define IN_LOOKUP_MULTI(addr, ifp, inm) \
#define IN_LOOKUP_MULTI(addr, ifp, inm) \
/* struct in_addr addr; */ \
/* struct ifnet *ifp; */ \
/* struct in_multi *inm; */ \
@ -166,7 +166,7 @@ struct in_multistep {
* and get the first record. Both macros return a NULL "inm" when there
* are no remaining records.
*/
#define IN_NEXT_MULTI(step, inm) \
#define IN_NEXT_MULTI(step, inm) \
/* struct in_multistep step; */ \
/* struct in_multi *inm; */ \
{ \
@ -183,7 +183,7 @@ struct in_multistep {
} \
}
#define IN_FIRST_MULTI(step, inm) \
#define IN_FIRST_MULTI(step, inm) \
/* struct in_multistep step; */ \
/* struct in_multi *inm; */ \
{ \
@ -195,5 +195,5 @@ struct in_multistep {
struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *));
int in_delmulti __P((struct in_multi *));
#endif
#endif /* !_NETINET_IN_VAR_H_ */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip.h 7.10 (Berkeley) 6/28/90
* $Id: ip.h,v 1.3 1993/05/20 03:50:15 cgd Exp $
* $Id: ip.h,v 1.4 1994/01/08 21:21:44 mycroft Exp $
*/
#ifndef _NETINET_IP_H_
@ -51,11 +51,11 @@
* against negative integers quite easily, and fail in subtle ways.
*/
struct ip {
#if BYTE_ORDER == LITTLE_ENDIAN
#if BYTE_ORDER == LITTLE_ENDIAN
u_char ip_hl:4, /* header length */
ip_v:4; /* version */
#endif
#if BYTE_ORDER == BIG_ENDIAN
#if BYTE_ORDER == BIG_ENDIAN
u_char ip_v:4, /* version */
ip_hl:4; /* header length */
#endif
@ -119,7 +119,7 @@ struct ip {
*/
#define IPOPT_OPTVAL 0 /* option ID */
#define IPOPT_OLEN 1 /* option length */
#define IPOPT_OFFSET 2 /* offset within option */
#define IPOPT_OFFSET 2 /* offset within option */
#define IPOPT_MINOFF 4 /* min value of above */
/*
@ -129,11 +129,11 @@ struct ip_timestamp {
u_char ipt_code; /* IPOPT_TS */
u_char ipt_len; /* size of structure (variable) */
u_char ipt_ptr; /* index of current entry */
#if BYTE_ORDER == LITTLE_ENDIAN
#if BYTE_ORDER == LITTLE_ENDIAN
u_char ipt_flg:4, /* flags, see below */
ipt_oflw:4; /* overflow counter */
#endif
#if BYTE_ORDER == BIG_ENDIAN
#if BYTE_ORDER == BIG_ENDIAN
u_char ipt_oflw:4, /* overflow counter */
ipt_flg:4; /* flags, see below */
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_icmp.c 7.15 (Berkeley) 4/20/91
* $Id: ip_icmp.c,v 1.4 1993/12/18 00:41:56 mycroft Exp $
* $Id: ip_icmp.c,v 1.5 1994/01/08 21:21:45 mycroft Exp $
*/
#include <sys/param.h>
@ -188,11 +188,11 @@ icmp_input(m, hlen)
goto freeit;
}
i = hlen + MIN(icmplen, ICMP_ADVLENMIN);
if (m->m_len < i && (m = m_pullup(m, i)) == 0) {
if (m->m_len < i && (m = m_pullup(m, i)) == 0) {
icmpstat.icps_tooshort++;
return;
}
ip = mtod(m, struct ip *);
ip = mtod(m, struct ip *);
m->m_len -= hlen;
m->m_data += hlen;
icp = mtod(m, struct icmp *);
@ -276,7 +276,7 @@ icmp_input(m, hlen)
icp->icmp_rtime = iptime();
icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
goto reflect;
case ICMP_IREQ:
#define satosin(sa) ((struct sockaddr_in *)(sa))
if (in_netof(ip->ip_src) == 0 &&

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_input.c 7.19 (Berkeley) 5/25/91
* $Id: ip_input.c,v 1.5 1993/12/18 00:41:57 mycroft Exp $
* $Id: ip_input.c,v 1.6 1994/01/08 21:21:47 mycroft Exp $
*/
#include <sys/param.h>
@ -876,7 +876,7 @@ ip_srcroute()
if (m == 0)
return ((struct mbuf *)0);
#define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
#define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
/* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
m->m_len = ip_nhops * sizeof(struct in_addr) + sizeof(struct in_addr) +

View File

@ -94,8 +94,8 @@ static void srcrt_send __P((struct ip *, struct vif *, struct mbuf *));
static void encap_send __P((struct ip *, struct vif *, struct mbuf *));
static multiencap_decap __P((struct mbuf *, int hlen));
#define INSIZ sizeof(struct in_addr)
#define same(a1, a2) (bcmp((caddr_t)(a1), (caddr_t)(a2), INSIZ) == 0)
#define INSIZ sizeof(struct in_addr)
#define same(a1, a2) (bcmp((caddr_t)(a1), (caddr_t)(a2), INSIZ) == 0)
#define satosin(sa) ((struct sockaddr_in *)(sa))
/*
@ -119,8 +119,8 @@ struct mrtstat mrtstat;
*/
struct ifnet multicast_decap_if[MAXVIFS];
#define ENCAP_TTL 64
#define ENCAP_PROTO 4
#define ENCAP_TTL 64
#define ENCAP_PROTO 4
/* prototype IP hdr for encapsulated packets */
struct ip multicast_encap_iphdr = {
@ -133,7 +133,7 @@ struct ip multicast_encap_iphdr = {
sizeof(struct ip), /* total length */
0, /* id */
0, /* frag offset */
ENCAP_TTL, ENCAP_PROTO,
ENCAP_TTL, ENCAP_PROTO,
0, /* checksum */
};
@ -176,14 +176,14 @@ nethash(n)
* datagram source address to the associated multicast route. Note
* that unlike mrttable, the hash is on IP address, not IP net number.
*/
#define MSRCHASHSIZ 1024
#define MSRCHASH(a) ((((a) >> 20) ^ ((a) >> 10) ^ (a)) & (MSRCHASHSIZ - 1))
#define MSRCHASHSIZ 1024
#define MSRCHASH(a) ((((a) >> 20) ^ ((a) >> 10) ^ (a)) & (MSRCHASHSIZ - 1))
struct mrt *mrtsrchash[MSRCHASHSIZ];
/*
* Find a route for a given origin IP address.
*/
#define MRTFIND(o, rt) { \
#define MRTFIND(o, rt) { \
register u_int _mrhash = o; \
_mrhash = MSRCHASH(_mrhash); \
++mrtstat.mrts_mrt_lookups; \
@ -196,7 +196,7 @@ struct mrt *mrtsrchash[MSRCHASHSIZ];
static struct mrt *
mrtfind(origin)
u_long origin;
u_long origin;
{
register struct mrt *rt;
register u_int hash;
@ -412,7 +412,7 @@ add_vif(vifcp)
* IP multicasts from the if
*/
((struct sockaddr_in *)&ifr.ifr_addr)->sin_family = AF_INET;
((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr =
((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr =
INADDR_ANY;
s = splnet();
error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, (caddr_t)&ifr);
@ -700,8 +700,8 @@ del_mrt(origin)
* discard it.
*/
#define IP_HDR_LEN 20 /* # bytes of fixed IP header (excluding options) */
#define TUNNEL_LEN 12 /* # bytes of IP option for tunnel encapsulation */
#define IP_HDR_LEN 20 /* # bytes of fixed IP header (excluding options) */
#define TUNNEL_LEN 12 /* # bytes of IP option for tunnel encapsulation */
int
ip_mforward(ip, ifp, m)

View File

@ -90,7 +90,7 @@ struct vifctl {
};
#define VIFF_TUNNEL 0x1 /* vif represents a tunnel end-point */
#define VIFF_SRCRT 0x2 /* tunnel uses IP src routing */
#define VIFF_SRCRT 0x2 /* tunnel uses IP src routing */
/*

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_output.c 7.23 (Berkeley) 11/12/90
* $Id: ip_output.c,v 1.10 1994/01/07 22:16:11 cgd Exp $
* $Id: ip_output.c,v 1.11 1994/01/08 21:21:52 mycroft Exp $
*/
#include <sys/param.h>
@ -207,7 +207,7 @@ ip_output(m0, opt, ro, flags
if (inm != NULL &&
(imo == NULL || imo->imo_multicast_loop)) {
/*
* If we belong to the destination multicast group
* If we belong to the destination multicast group
* on the outgoing interface, and the caller did not
* forbid loopback, loop back a copy.
*/
@ -783,7 +783,7 @@ ip_setmoptions(optname, imop, m)
addr = *(mtod(m, struct in_addr *));
/*
* INADDR_ANY is used to remove a previous selection.
* When no interface is selected, a default one is
* When no interface is selected, a default one is
* chosen every time a multicast packet is sent.
*/
if (addr.s_addr == INADDR_ANY) {
@ -793,7 +793,7 @@ ip_setmoptions(optname, imop, m)
/*
* The selected interface is identified by its local
* IP address. Find the interface and confirm that
* it supports multicasting.
* it supports multicasting.
*/
INADDR_TO_IFP(addr, ifp);
if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
@ -813,7 +813,7 @@ ip_setmoptions(optname, imop, m)
}
imo->imo_multicast_ttl = *(mtod(m, u_char *));
break;
case IP_MULTICAST_LOOP:
/*
* Set the loopback flag for outgoing multicast packets.
@ -823,7 +823,7 @@ ip_setmoptions(optname, imop, m)
(loop = *(mtod(m, u_char *))) > 1) {
error = EINVAL;
break;
}
}
imo->imo_multicast_loop = loop;
break;
@ -866,26 +866,26 @@ ip_setmoptions(optname, imop, m)
* See if we found an interface, and confirm that it
* supports multicast.
*/
if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) {
error = EADDRNOTAVAIL;
break;
}
/*
* See if the membership already exists or if all the
* membership slots are full.
*/
*/
for (i = 0; i < imo->imo_num_memberships; ++i) {
if (imo->imo_membership[i]->inm_ifp == ifp &&
imo->imo_membership[i]->inm_addr.s_addr
== mreq->imr_multiaddr.s_addr)
break;
}
}
if (i < imo->imo_num_memberships) {
error = EADDRINUSE;
break;
}
if (i == IP_MAX_MEMBERSHIPS) {
error = ETOOMANYREFS;
error = ETOOMANYREFS;
break;
}
/*
@ -934,7 +934,7 @@ ip_setmoptions(optname, imop, m)
if ((ifp == NULL ||
imo->imo_membership[i]->inm_ifp == ifp) &&
imo->imo_membership[i]->inm_addr.s_addr ==
mreq->imr_multiaddr.s_addr)
mreq->imr_multiaddr.s_addr)
break;
}
if (i == imo->imo_num_memberships) {
@ -945,7 +945,7 @@ ip_setmoptions(optname, imop, m)
* Give up the multicast address record to which the
* membership points.
*/
in_delmulti(imo->imo_membership[i]);
in_delmulti(imo->imo_membership[i]);
/*
* Remove the gap in the membership array.
*/

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_var.h 7.7 (Berkeley) 6/28/90
* $Id: ip_var.h,v 1.4 1993/12/06 04:59:42 hpeyerl Exp $
* $Id: ip_var.h,v 1.5 1994/01/08 21:21:53 mycroft Exp $
*/
#ifndef _NETINET_IP_VAR_H_
@ -71,11 +71,11 @@ struct ipq {
* Note: ipf_next must be at same offset as ipq_next above
*/
struct ipasfrag {
#if BYTE_ORDER == LITTLE_ENDIAN
#if BYTE_ORDER == LITTLE_ENDIAN
u_char ip_hl:4,
ip_v:4;
#endif
#if BYTE_ORDER == BIG_ENDIAN
#if BYTE_ORDER == BIG_ENDIAN
u_char ip_v:4,
ip_hl:4;
#endif
@ -96,7 +96,7 @@ struct ipasfrag {
* The actual length of the options (including ipopt_dst)
* is in m_len.
*/
#define MAX_IPOPTLEN 40
#define MAX_IPOPTLEN 40
struct ipoption {
struct in_addr ipopt_dst; /* first-hop dst if source routed */
@ -141,7 +141,7 @@ struct ipstat {
#ifdef KERNEL
/* flags passed to ip_output as last parameter */
#define IP_FORWARDING 0x1 /* most of ip header exists */
#define IP_MULTICASTOPTS 0x2 /* multicast opts present */
#define IP_MULTICASTOPTS 0x2 /* multicast opts present */
#define IP_ROUTETOIF SO_DONTROUTE /* bypass routing tables */
#define IP_ALLOWBROADCAST SO_BROADCAST /* can send broadcast packets */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)raw_ip.c 7.8 (Berkeley) 7/25/90
* $Id: raw_ip.c,v 1.7 1993/12/18 00:42:00 mycroft Exp $
* $Id: raw_ip.c,v 1.8 1994/01/08 21:21:55 mycroft Exp $
*/
#include <sys/param.h>
@ -118,7 +118,7 @@ rip_output(m, so)
}
return (ip_output(m,
(rp->rinp_flags & RINPF_HDRINCL)? (struct mbuf *)0: rp->rinp_options,
&rp->rinp_route,
&rp->rinp_route,
(so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST
#ifdef MULTICAST
| IP_MULTICASTOPTS, rp->rinp_rcb.rcb_moptions
@ -205,9 +205,9 @@ rip_ctloutput(op, so, level, optname, m)
case IP_MULTICAST_LOOP:
case IP_ADD_MEMBERSHIP:
case IP_DROP_MEMBERSHIP:
error = ip_getmoptions(optname,
rp->rinp_rcb.rcb_moptions, m);
break;
error = ip_getmoptions(optname,
rp->rinp_rcb.rcb_moptions, m);
break;
#endif
default:
error = EINVAL;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tcp.h 7.7 (Berkeley) 6/28/90
* $Id: tcp.h,v 1.3 1993/05/20 03:50:31 cgd Exp $
* $Id: tcp.h,v 1.4 1994/01/08 21:21:56 mycroft Exp $
*/
#ifndef _NETINET_TCP_H_
@ -47,11 +47,11 @@ struct tcphdr {
u_short th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
#if BYTE_ORDER == LITTLE_ENDIAN
#if BYTE_ORDER == LITTLE_ENDIAN
u_char th_x2:4, /* (unused) */
th_off:4; /* data offset */
#endif
#if BYTE_ORDER == BIG_ENDIAN
#if BYTE_ORDER == BIG_ENDIAN
u_char th_off:4, /* data offset */
th_x2:4; /* (unused) */
#endif

View File

@ -31,13 +31,13 @@
* SUCH DAMAGE.
*
* from: @(#)tcp_debug.c 7.6 (Berkeley) 6/28/90
* $Id: tcp_debug.c,v 1.4 1993/12/18 00:42:01 mycroft Exp $
* $Id: tcp_debug.c,v 1.5 1994/01/08 21:21:57 mycroft Exp $
*/
#ifdef TCPDEBUG
/* load symbolic names */
#define PRUREQUESTS
#define TCPSTATES
#define PRUREQUESTS
#define TCPSTATES
#define TCPTIMERS
#define TANAMES
#endif
@ -131,7 +131,7 @@ tcp_trace(act, ostate, tp, ti, req)
if (flags) {
#ifndef lint
char *cp = "<";
#define pf(f) { if (ti->ti_flags&TH_/**/f) { printf("%s%s", cp, "f"); cp = ","; } }
#define pf(f) { if (ti->ti_flags&TH_/**/f) { printf("%s%s", cp, "f"); cp = ","; } }
pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG);
#endif
printf(">");

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tcp_input.c 7.25 (Berkeley) 6/30/90
* $Id: tcp_input.c,v 1.3 1993/12/18 00:42:03 mycroft Exp $
* $Id: tcp_input.c,v 1.4 1994/01/08 21:21:58 mycroft Exp $
*/
#include <sys/param.h>
@ -368,7 +368,7 @@ findpcb:
tcp_dooptions(tp, om, ti);
om = 0;
}
/*
/*
* Header prediction: check for the two common cases
* of a uni-directional data xfer. If the packet has
* no control flags, is in-sequence, the window didn't
@ -610,7 +610,7 @@ trimthenstep6:
/*
* States other than LISTEN or SYN_SENT.
* First check that at least some bytes of segment are within
* First check that at least some bytes of segment are within
* receive window. If segment begins before rcv_nxt,
* drop leading data (and SYN); if nothing left, just ack.
*/
@ -619,7 +619,7 @@ trimthenstep6:
if (tiflags & TH_SYN) {
tiflags &= ~TH_SYN;
ti->ti_seq++;
if (ti->ti_urp > 1)
if (ti->ti_urp > 1)
ti->ti_urp--;
else
tiflags &= ~TH_URG;
@ -764,7 +764,7 @@ trimthenstep6:
*/
if ((tiflags & TH_ACK) == 0)
goto drop;
/*
* Ack processing.
*/
@ -824,7 +824,7 @@ trimthenstep6:
* the new ssthresh).
*
* Dup acks mean that packets have left the
* network (they're now cached at the receiver)
* network (they're now cached at the receiver)
* so bump cwnd by the amount in the receiver
* to keep a constant cwnd packets in the
* network.
@ -1033,14 +1033,14 @@ step6:
* If this segment advances the known urgent pointer,
* then mark the data stream. This should not happen
* in CLOSE_WAIT, CLOSING, LAST_ACK or TIME_WAIT STATES since
* a FIN has been received from the remote side.
* a FIN has been received from the remote side.
* In these states we ignore the URG.
*
* According to RFC961 (Assigned Protocols),
* the urgent pointer points to the last octet
* of urgent data. We continue, however,
* to consider it to indicate the first octet
* of data past the urgent section as the original
* of data past the urgent section as the original
* spec states (in one of two places).
*/
if (SEQ_GT(ti->ti_seq+ti->ti_urp, tp->rcv_up)) {
@ -1127,7 +1127,7 @@ dodata: /* XXX */
/*
* In FIN_WAIT_2 state enter the TIME_WAIT state,
* starting the time-wait timer, turning off the other
* starting the time-wait timer, turning off the other
* standard timers.
*/
case TCPS_FIN_WAIT_2:
@ -1260,7 +1260,7 @@ tcp_pulloutofband(so, ti, m)
register struct mbuf *m;
{
int cnt = ti->ti_urp - 1;
while (cnt >= 0) {
if (m->m_len > cnt) {
char *cp = mtod(m, caddr_t) + cnt;
@ -1317,7 +1317,7 @@ tcp_xmit_timer(tp)
if ((tp->t_rttvar += delta) <= 0)
tp->t_rttvar = 1;
} else {
/*
/*
* No rtt measurement yet - use the unsmoothed rtt.
* Set the variance to half the rtt (so our first
* retransmit happens at 2*rtt)
@ -1341,7 +1341,7 @@ tcp_xmit_timer(tp)
*/
TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp),
tp->t_rttmin, TCPTV_REXMTMAX);
/*
* We received an ack for a packet that wasn't retransmitted;
* it is probably safe to discard any error indications we've

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tcp_output.c 7.22 (Berkeley) 8/31/90
* $Id: tcp_output.c,v 1.4 1993/12/18 00:42:05 mycroft Exp $
* $Id: tcp_output.c,v 1.5 1994/01/08 21:22:00 mycroft Exp $
*/
#include <sys/param.h>
@ -340,7 +340,7 @@ send:
* window for use in delaying messages about window sizes.
* If resending a FIN, be sure not to use a new sequence number.
*/
if (flags & TH_FIN && tp->t_flags & TF_SENTFIN &&
if (flags & TH_FIN && tp->t_flags & TF_SENTFIN &&
tp->snd_nxt == tp->snd_max)
tp->snd_nxt--;
ti->ti_seq = htonl(tp->snd_nxt);
@ -454,7 +454,7 @@ send:
error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route,
so->so_options & SO_DONTROUTE);
#else
error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route,
error = ip_output(m, (struct mbuf *)0, &tp->t_inpcb->inp_route,
so->so_options & SO_DONTROUTE);
#endif
if (error) {

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tcp_subr.c 7.20 (Berkeley) 12/1/90
* $Id: tcp_subr.c,v 1.5 1993/12/18 00:42:07 mycroft Exp $
* $Id: tcp_subr.c,v 1.6 1994/01/08 21:22:01 mycroft Exp $
*/
#include <sys/param.h>
@ -167,7 +167,7 @@ tcp_respond(tp, ti, m, ack, seq, flags)
m->m_data = (caddr_t)ti;
m->m_len = sizeof (struct tcpiphdr);
tlen = 0;
#define xchg(a,b,type) { type t; t=a; a=b; b=t; }
#define xchg(a,b,type) { type t; t=a; a=b; b=t; }
xchg(ti->ti_dst.s_addr, ti->ti_src.s_addr, u_long);
xchg(ti->ti_dport, ti->ti_sport, u_short);
#undef xchg
@ -220,7 +220,7 @@ tcp_newtcpcb(inp)
tp->t_srtt = TCPTV_SRTTBASE;
tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << 2;
tp->t_rttmin = TCPTV_MIN;
TCPT_RANGESET(tp->t_rxtcur,
TCPT_RANGESET(tp->t_rxtcur,
((TCPTV_SRTTBASE >> 2) + (TCPTV_SRTTDFLT << 2)) >> 1,
TCPTV_MIN, TCPTV_REXMTMAX);
tp->snd_cwnd = TCP_MAXWIN;
@ -273,7 +273,7 @@ tcp_close(tp)
/*
* If we sent enough data to get some meaningful characteristics,
* save them in the routing entry. 'Enough' is arbitrarily
* save them in the routing entry. 'Enough' is arbitrarily
* defined as the sendpipesize (default 4K) * 16. This would
* give us 16 rtt samples assuming we only get one sample per
* window (the usual case on a long haul net). 16 samples is

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tcp_timer.c 7.18 (Berkeley) 6/28/90
* $Id: tcp_timer.c,v 1.4 1993/12/18 00:42:09 mycroft Exp $
* $Id: tcp_timer.c,v 1.5 1994/01/08 21:22:02 mycroft Exp $
*/
#include <sys/param.h>
@ -222,7 +222,7 @@ tcp_timers(tp, timer)
* size increase exponentially with time. If the
* window is larger than the path can handle, this
* exponential growth results in dropped packet(s)
* almost immediately. To get more time between
* almost immediately. To get more time between
* drops but still "push" the network to take advantage
* of improving conditions, we switch from exponential
* to linear window opening at some threshhold size.

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)tcp_var.h 7.10 (Berkeley) 6/28/90
* $Id: tcp_var.h,v 1.3 1993/05/20 03:50:42 cgd Exp $
* $Id: tcp_var.h,v 1.4 1994/01/08 21:22:04 mycroft Exp $
*/
#ifndef _NETINET_TCP_VAR_H_
@ -155,7 +155,7 @@ struct tcpcb {
* port numbers (which are no longer needed once we've located the
* tcpcb) are overlayed with an mbuf pointer.
*/
#define REASS_MBUF(ti) (*(struct mbuf **)&((ti)->ti_t))
#define REASS_MBUF(ti) (*(struct mbuf **)&((ti)->ti_t))
/*
* TCP statistics.

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)udp_usrreq.c 7.20 (Berkeley) 4/20/91
* $Id: udp_usrreq.c,v 1.5 1993/12/18 00:42:15 mycroft Exp $
* $Id: udp_usrreq.c,v 1.6 1994/01/08 21:22:06 mycroft Exp $
*/
#include <sys/param.h>
@ -164,7 +164,6 @@ udp_input(m, iphlen)
* compatibility we avoid the problem here rather than
* fixing the interface. Maybe 4.4BSD will remedy this?)
*/
/*
* Construct sockaddr format source address.
*/
@ -186,7 +185,7 @@ udp_input(m, iphlen)
continue;
}
if (inp->inp_faddr.s_addr != INADDR_ANY) {
if (inp->inp_faddr.s_addr !=
if (inp->inp_faddr.s_addr !=
ip->ip_src.s_addr ||
inp->inp_fport != uh->uh_sport)
continue;
@ -216,7 +215,7 @@ udp_input(m, iphlen)
if ((last->so_options & SO_REUSEADDR) == 0)
break;
}
if (last == NULL) {
/*
* No matching pcb found; discard datagram.