home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1999 February / MACPOWER-1999-02.ISO.7z / MACPOWER-1999-02.ISO / 9902⁄AMUG / UTILITY / mac06-0.95.sit / mac06-0.95 / usr / include / netinet / netinet_ip.h < prev    next >
Text File  |  1998-11-15  |  872b  |  48 lines

  1. /* mac06ゥ1998 by HNS/DSITRI hns@computer.org
  2. ** netinet/ip.h
  3. ** 01.05.1998    HNS        pulled out from ping.c
  4. */
  5.  
  6. #pragma once
  7.  
  8. #include "netinet/in_systm.h"
  9.  
  10. /* socket options for IP level */
  11.  
  12. #define IP_MULTICAST_TTL    0
  13. #define IP_MULTICAST_IF        1
  14. #define IP_MULTICAST_LOOP    2
  15. #define IP_OPTIONS            3
  16.  
  17. /* array offset for IP_OPTIONS */
  18.  
  19. #define IPOPT_OPTVAL        0        
  20. #define IPOPT_OLEN            1
  21. #define IPOPT_OFFSET        2
  22.  
  23. /* IP_OPTIONS */
  24.  
  25. #define IPOPT_RR            0        /* record route */
  26. #define IPOPT_MINOFF        0        /* minimum offset */
  27.  
  28. struct ip
  29.     {
  30.     u_char    ip_type;        /* packe type */
  31.     u_char    ip_v;            /* version */
  32.     u_char    ip_hl;            /* header length */
  33.     u_short    ip_tos;
  34.     u_short    ip_len;
  35.     u_short    ip_id;
  36.     u_short    ip_off;
  37.     u_char    ip_ttl;            /* time to live */
  38.     u_char    ip_p;            /* protocol 6=TCP, 17=UDP */
  39.     u_short    ip_sum;            /* checksum */
  40.     struct in_addr    ip_src;
  41.     struct in_addr    ip_dst;
  42.     };
  43.  
  44. /* EOF */
  45.  
  46.  
  47.  
  48.