Changeset 64c67f6 in rtems


Ignore:
Timestamp:
May 12, 2005, 6:20:10 AM (15 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
3eb8b6e8
Parents:
e714a91
Message:

2005-05-12 Ralf Corsepius <ralf.corsepius@…>

  • libnetworking/netinet/tcp.h: Partial update from FreeBSD. Remove BYTE_PACK.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    re714a91 r64c67f6  
    112005-05-12      Ralf Corsepius <ralf.corsepius@rtems.org>
    22
     3        * libnetworking/netinet/tcp.h: Partial update from FreeBSD.
     4        Remove BYTE_PACK.
    35        * libnetworking/netinet/ip_var.h: Partial update from FreeBSD.
    46        Remove some useless BYTE_PACKs.
  • cpukit/libnetworking/netinet/tcp.h

    re714a91 r64c67f6  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)tcp.h       8.1 (Berkeley) 6/10/93
     30 * $FreeBSD: src/sys/netinet/tcp.h,v 1.30 2005/01/07 01:45:45 imp Exp $
     31 */
     32 
     33/*
    3434 * $Id$
    3535 */
     
    3838#define _NETINET_TCP_H_
    3939
    40 #ifndef BYTE_PACK
    41 #define BYTE_PACK __attribute__((packed))
    42 #endif
     40#include <sys/cdefs.h>
    4341
    44 typedef u_long  tcp_seq;
     42#if __BSD_VISIBLE
     43
     44typedef u_int32_t tcp_seq;
     45
     46#define tcp6_seq        tcp_seq /* for KAME src sync over BSD*'s */
     47#define tcp6hdr         tcphdr  /* for KAME src sync over BSD*'s */
     48
    4549typedef u_long  tcp_cc;                 /* connection count per rfc1644 */
    4650
     
    5054 */
    5155struct tcphdr {
    52         u_short th_sport BYTE_PACK;     /* source port */
    53         u_short th_dport BYTE_PACK;     /* destination port */
    54         tcp_seq th_seq BYTE_PACK;       /* sequence number */
    55         tcp_seq th_ack BYTE_PACK;       /* acknowledgement number */
     56        u_short th_sport;               /* source port */
     57        u_short th_dport;               /* destination port */
     58        tcp_seq th_seq;                 /* sequence number */
     59        tcp_seq th_ack;                 /* acknowledgement number */
    5660#if BYTE_ORDER == LITTLE_ENDIAN
    57         u_char  th_x2:4,                /* (unused) */
     61        u_int   th_x2:4,                /* (unused) */
    5862                th_off:4;               /* data offset */
    5963#endif
    6064#if BYTE_ORDER == BIG_ENDIAN
    61         u_char  th_off:4,               /* data offset */
     65        u_int   th_off:4,               /* data offset */
    6266                th_x2:4;                /* (unused) */
    6367#endif
     
    6973#define TH_ACK  0x10
    7074#define TH_URG  0x20
    71 #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
     75#define TH_ECE  0x40
     76#define TH_CWR  0x80
     77#define TH_FLAGS        (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG|TH_ECE|TH_CWR)
    7278
    73         u_short th_win BYTE_PACK;       /* window */
    74         u_short th_sum BYTE_PACK;       /* checksum */
    75         u_short th_urp BYTE_PACK;       /* urgent pointer */
     79        u_short th_win;                 /* window */
     80        u_short th_sum;                 /* checksum */
     81        u_short th_urp;                 /* urgent pointer */
    7682};
    7783
     
    101107/*
    102108 * Default maximum segment size for TCP.
    103  * With an IP MSS of 576, this is 536,
     109 * With an IP MTU of 576, this is 536,
    104110 * but 512 is probably more convenient.
    105111 * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
     
    115121#define TCP_MAXOLEN     (TCP_MAXHLEN - sizeof(struct tcphdr))
    116122                                        /* max space left for options */
     123#endif /* __BSD_VISIBLE */
    117124
    118125/*
     
    120127 */
    121128#define TCP_NODELAY     0x01    /* don't delay send to coalesce packets */
     129#if __BSD_VISIBLE
    122130#define TCP_MAXSEG      0x02    /* set maximum segment size */
    123131#define TCP_NOPUSH      0x04    /* don't push last block of write */
    124132#define TCP_NOOPT       0x08    /* don't use TCP options */
     133#define TCP_MD5SIG      0x10    /* use MD5 digests (RFC2385) */
     134#define TCP_INFO        0x20    /* retrieve tcp_info structure */
     135#endif
    125136
    126 #endif
     137#endif /* !_NETINET_TCP_H_ */
Note: See TracChangeset for help on using the changeset viewer.