/**************************************************************************** 
** File: ip.h
**
** Author: Mike Borella
**
** Comments: Generic IP header structure - an attempt at OS independence
**
** $Log: ip.h,v $
** Revision 1.2  1998/06/12 20:49:43  mborella
** Added log tag
**
**
*****************************************************************************/

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

typedef struct _IPHdr
{
#if defined(WORDS_BIGENDIAN)
  u_int8_t    ip_v:4, 
              ip_hl:4;
#else
  u_int8_t    ip_hl:4, 
              ip_v:4;
#endif
  u_int8_t    ip_tos;
  u_int16_t   ip_len;
  u_int16_t   ip_id;
  u_int16_t   ip_off;
  u_int8_t    ip_ttl;
  u_int8_t    ip_p;
  u_int16_t   ip_csum;
  struct in_addr   ip_src;
  struct in_addr   ip_dst;
} IPHdr;

