ip_var.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1997-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
/*
* Overlay for ip header used by other protocols (tcp, udp).
*/
#ifndef _NETINET_IP_VAR_H
#define _NETINET_IP_VAR_H
#pragma ident "%Z%%M% %I% %E% SMI"
/* ip_var.h 1.11 88/08/19 SMI; from UCB 7.1 6/5/86 */
#include <sys/isa_defs.h>
#ifdef __cplusplus
extern "C" {
#endif
struct ipovly {
#ifdef _LP64
#else
#endif
short ih_len; /* protocol length */
};
/*
* Ip reassembly queue structure. Each fragment
* being reassembled is attached to one of these structures.
* They are timed out after ipq_ttl drops to 0, and may also
* be reclaimed if memory becomes tight.
*/
struct ipq {
/* to ip headers of fragments */
};
/*
* Ip header, when holding a fragment.
*
* Note: ipf_next must be at same offset as ipq_next above
*/
struct ipasfrag {
#ifdef _BIT_FIELDS_LTOH
ip_v:4;
#else
ip_hl:4;
#endif
short ip_len;
short ip_off;
};
/*
* Structure stored in mbuf in inpcb.ip_options
* and passed to ip_output when ip options are in use.
* The actual length of the options (including ipopt_dst)
* is in m_len.
*/
#define MAX_IPOPTLEN 40
struct ipoption {
};
struct ipstat {
long ips_total; /* total packets received */
long ips_badsum; /* checksum bad */
long ips_tooshort; /* packet too short */
long ips_toosmall; /* not enough data */
long ips_badhlen; /* ip header length < data size */
long ips_badlen; /* ip length < ip header length */
long ips_fragments; /* fragments received */
long ips_fragdropped; /* frags dropped (dups, out of space) */
long ips_fragtimeout; /* fragments timed out */
long ips_forward; /* packets forwarded */
long ips_cantforward; /* packets rcvd for unreachable dest */
long ips_redirectsent; /* packets forwarded on same net */
};
#ifdef _KERNEL
/* flags passed to ip_output as last parameter */
#endif
#ifdef __cplusplus
}
#endif
#endif /* _NETINET_IP_VAR_H */