SCCS-vsn: sys/netinet/ip.h 1.2
SCCS-vsn: sys/netinet/ip_input.c 1.2
struct ip { /* ip leader */
unsigned char ip_hl:4, /* header length */
ip_v:4; /* version */
struct ip { /* ip leader */
unsigned char ip_hl:4, /* header length */
ip_v:4; /* version */
#define IPLINK IPLOLINK
#define MAXTTL 255 /* maximum time to live (seconds) */
#define IPLINK IPLOLINK
#define MAXTTL 255 /* maximum time to live (seconds) */
+#define ip_bswap(p) { \
+ p->ip_len = ntohs(p->ip_len); \
+ p->ip_id = ntohs(p->ip_id); \
+ p->ip_off = ntohs(p->ip_off); }
+
-/* ip_input.c 1.1 81/10/14 */
+/* ip_input.c 1.2 81/10/14 */
#include "../h/param.h"
#include "../bbnnet/net.h"
#include "../bbnnet/tcp.h"
#include "../h/param.h"
#include "../bbnnet/net.h"
#include "../bbnnet/tcp.h"
p->ip_next->ip_prev = p->ip_prev;
}
p->ip_next->ip_prev = p->ip_prev;
}
-ip_bswap(p) /* byte swap ip header */
-register struct ip *p;
-{
-COUNT(IP_BSWAP);
- p->ip_len = ntohs(p->ip_len);
- p->ip_id = ntohs(p->ip_id);
- p->ip_off = ntohs(p->ip_off);
-}
-
ip_timeo() /* frag reass.q timeout routine */
{
register struct ip *q;
ip_timeo() /* frag reass.q timeout routine */
{
register struct ip *q;