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

#434: Initial tcpip header merges.

File:
1 edited

Legend:

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

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r182 r183  
    11/* Modified for emx by hv 1996
    2  *
     2 * Modified for gcc/os2 by bird 2003
     3 *
    34 * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
    45 * All rights reserved.
     
    3940#define _NETINET_UDP_VAR_H_
    4041
    41 #ifdef TCPIPV4
    42 struct  udpstat {
    43                                 /* input statistics: */
    44 #ifndef __EMX__
    45         u_long  udps_ipackets;          /* total input packets */
    46 #endif
    47         u_long  udps_hdrops;            /* packet shorter than header */
    48         u_long  udps_badsum;            /* checksum error */
    49         u_long  udps_badlen;            /* data length larger than packet */
    50 #ifndef __EMX__
    51         u_long  udps_noport;            /* no socket on port */
    52         u_long  udps_noportbcast;       /* of above, arrived as broadcast */
    53         u_long  udps_fullsock;          /* not delivered, input socket full */
    54         u_long  udpps_pcbcachemiss;     /* input packets missing pcb cache */
    55                                         /* output statistics: */
    56         u_long  udps_opackets;          /* total output packets */
    57 #else /* __EMX__ */
     42#ifdef TCPV40HDRS
     43struct  udpstat {
     44        u_long  udps_hdrops;
     45        u_long  udps_badsum;
     46        u_long  udps_badlen;
    5847        u_long  udps_udpInDatagrams;
    5948        u_long  udps_udpNoPorts;
    6049        u_long  udps_udpOutDatagrams;
    61 #endif /* __EMX__ */
    6250};
    63 #endif /* TCPIPV4 */
    6451
    65 #define UDP_TTL         30      /* default time to live for UDP packets */
     52#else
     53
     54/*
     55 * UDP kernel structures and variables.
     56 */
     57#pragma pack(1)
     58struct  udpiphdr {
     59        struct  ipovly ui_i;            /* overlaid ip structure */
     60        struct  udphdr ui_u;            /* udp header */
     61};
     62#pragma pack()
     63#define ui_next         ui_i.ih_next
     64#define ui_prev         ui_i.ih_prev
     65#define ui_x1           ui_i.ih_x1
     66#define ui_pr           ui_i.ih_pr
     67#define ui_len          ui_i.ih_len
     68#define ui_src          ui_i.ih_src
     69#define ui_dst          ui_i.ih_dst
     70#define ui_sport        ui_u.uh_sport
     71#define ui_dport        ui_u.uh_dport
     72#define ui_ulen         ui_u.uh_ulen
     73#define ui_sum          ui_u.uh_sum
     74
     75struct  udpstat {
     76                                /* input statistics: */
     77        u_long  udps_ipackets;          /* total input packets */
     78        u_long  udps_hdrops;            /* packet shorter than header */
     79        u_long  udps_badsum;            /* checksum error */
     80        u_long  udps_badlen;            /* data length larger than packet */
     81        u_long  udps_noport;            /* no socket on port */
     82        u_long  udps_noportbcast;       /* of above, arrived as broadcast */
     83        u_long  udps_fullsock;          /* not delivered, input socket full */
     84        u_long  udpps_pcbcachemiss;     /* input packets missing pcb cache */
     85                                /* output statistics: */
     86        u_long  udps_opackets;          /* total output packets */
     87};
     88
     89/*
     90 * Names for UDP sysctl objects
     91 */
     92#define UDPCTL_CHECKSUM         1       /* checksum UDP packets */
     93#define UDPCTL_STATS            2       /* statistics (read-only) */
     94#define UDPCTL_INETCFG          31      /* sysctl code-Generic UDP Inetcfg switching */
     95#define UDPCTL_TTL              32      /* sysctl code-TTL for UDP  packets */
     96#define UDPCTL_UDPSWIN          33      /* sysctl code-UDP really MAX datagram Size */
     97#define UDPCTL_UDPRWIN          34      /* sysctl code-UDP recieve window size */
     98
     99#define UDPCTL_NAMES { \
     100        { 0, 0 }, \
     101        { "stats", CTLTYPE_STRUCT }, \
     102        { "inetcfg",CTLTYPE_INETCFG},\
     103}
     104
     105#endif /* TCPV40HDRS */
    66106
    67107#endif /* !_NETINET_UDP_VAR_H_ */
Note: See TracChangeset for help on using the changeset viewer.