Ignore:
Timestamp:
May 19, 2003, 4:41:00 AM (22 years ago)
Author:
bird
Message:

#434: Initial tcpip header merges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/netinet/ip.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r182 r183  
    11/* Modified for emx by hv 1994,1996
     2 * Modified for gcc/os2 by bird 2003
    23 *
    34 * Copyright (c) 1982, 1986 Regents of the University of California.
     
    3940#define _NETINET_IP_H_
    4041
    41 #ifdef __EMX__
    4242#include <machine/endian.h>
    43 #endif /* __EMX__ */
    4443
    4544/*
     
    5655 * against negative integers quite easily, and fail in subtle ways.
    5756 */
     57#pragma pack(1)
    5858struct ip {
    5959#if BYTE_ORDER == LITTLE_ENDIAN
     
    7171#define IP_DF 0x4000                    /* dont fragment flag */
    7272#define IP_MF 0x2000                    /* more fragments flag */
     73#ifndef TCPV40HDRS
     74#define IP_OFFMASK 0x1fff               /* mask for fragmenting bits */
     75#endif
    7376        u_char  ip_ttl;                 /* time to live */
    7477        u_char  ip_p;                   /* protocol */
     
    7679        struct  in_addr ip_src,ip_dst;  /* source and dest address */
    7780};
    78 
     81#pragma pack()
     82
     83#ifdef TCPV40HDRS
    7984#define IP_MAXPACKET    32767           /* OS2 maximum packet size */
     85#else
     86#define IP_MAXPACKET    65535           /* maximum packet size */
     87#endif
    8088
    8189/*
     
    96104#define IPTOS_PREC_IMMEDIATE            0x40
    97105#define IPTOS_PREC_PRIORITY             0x20
     106#ifdef TCPV40HDRS
    98107#define IPTOS_PREC_ROUTINE              0x10
     108#else
     109#define IPTOS_PREC_ROUTINE              0x00
     110#endif
    99111
    100112/*
    101113 * Definitions for options.
    102114 */
     115#ifndef TCPV40HDRS
     116#define IPOPT_COPY              0x80
     117#endif
    103118#define IPOPT_COPIED(o)         ((o)&0x80)
    104119#define IPOPT_CLASS(o)          ((o)&0x60)
     
    119134#define IPOPT_SATID             136             /* satnet id */
    120135#define IPOPT_SSRR              137             /* strict source route */
     136#ifndef TCPV40HDRS
     137#define IPOPT_RALERT            148             /* router alert */
     138#endif
    121139
    122140/*
     
    131149 * Time stamp option structure.
    132150 */
     151#pragma pack(1)
    133152struct  ip_timestamp {
    134153        u_char  ipt_code;               /* IPOPT_TS */
     
    151170        } ipt_timestamp;
    152171};
     172#pragma pack()
    153173
    154174/* flag bits for ipt_flg */
    155175#define IPOPT_TS_TSONLY         0               /* timestamps only */
    156176#define IPOPT_TS_TSANDADDR      1               /* timestamps and addresses */
     177#ifdef TCPV40HDRS
     178#define IPOPT_TS_PRESPEC        2               /* specified modules only */
     179#else
    157180#define IPOPT_TS_PRESPEC        3               /* specified modules only */
     181#endif
     182
    158183
    159184/* bits for security (not byte swapped) */
     
    170195 */
    171196#define MAXTTL          255             /* maximum time to live (seconds) */
     197/* This is being defined as TCP_TTL, UDP_TTL etc in tcp_time.h
     198   #define IPDEFTTL        64
     199*/
    172200#define IPFRAGTTL       60              /* time to live for frags, slowhz */
    173201#define IPTTLDEC        1               /* subtracted when forwarding */
     
    175203#define IP_MSS          576             /* default maximum segment size */
    176204
    177 /* hv: this is a new data structure in TCPIPV4; consult IBM's doc for
    178  * details (provided they tell anything about it at all)
    179  */
    180 #ifdef TCPIPV4
     205#ifdef TCPV40HDRS
    181206struct  ipstat {
    182207        long    ips_total;
     
    204229        long    ips_ipInUnknownProtos;
    205230};
    206 #endif
     231#endif /* TCPV40HDRS */
     232
    207233
    208234#endif /* !_NETINET_IP_H_ */
Note: See TracChangeset for help on using the changeset viewer.