Changeset 5fce938 in rtems


Ignore:
Timestamp:
May 8, 2005, 7:30:05 AM (16 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
45717e8
Parents:
55861c3
Message:

Partial update from FreeBSD.
Remove BYTE_PACK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/netinet/in.h

    r55861c3 r5fce938  
    4545#define IPPROTO_TCP             6               /* tcp */
    4646#define IPPROTO_UDP             17              /* user datagram protocol */
     47
     48#define INADDR_ANY              (u_int32_t)0x00000000
     49#define INADDR_BROADCAST        (u_int32_t)0xffffffff   /* must be masked */
     50
     51#ifndef _IN_PORT_T_DECLARED
     52typedef unsigned short          in_port_t;
     53#define _IN_PORT_T_DECLARED
     54#endif
     55
     56#ifndef _SA_FAMILY_T_DECLARED
     57typedef unsigned char           sa_family_t;
     58#define _SA_FAMILY_T_DECLARED
     59#endif
     60
     61/* Internet address (a structure for historical reasons) */
     62#ifndef _STRUCT_IN_ADDR_DECLARED
     63struct in_addr {
     64        u_long s_addr;
     65};
     66#define _STRUCT_IN_ADDR_DECLARED
     67#endif
     68
     69/* Socket address, internet style. */
     70struct sockaddr_in {
     71        uint8_t sin_len;
     72        sa_family_t     sin_family;
     73        in_port_t       sin_port;
     74        struct  in_addr sin_addr;
     75        char    sin_zero[8];
     76};
     77
    4778
    4879/*
     
    152183#define IPPROTO_APES            99              /* any private encr. scheme */
    153184#define IPPROTO_GMTP            100             /* GMTP*/
    154 /* 101-254: Unassigned */
     185#define IPPROTO_IPCOMP          108             /* payload compression (IPComp) */
     186/* 101-254: Partly Unassigned */
     187#define IPPROTO_PIM             103             /* Protocol Independent Mcast */
     188#define IPPROTO_CARP            112             /* CARP */
     189#define IPPROTO_PGM             113             /* PGM */
     190#define IPPROTO_PFSYNC          240             /* PFSYNC */
    155191/* 255: Reserved */
    156192/* BSD Private, local use, namespace incursion */
     
    170206 * When a user does a bind(2) or connect(2) with a port number of zero,
    171207 * a non-conflicting local port address is chosen.
    172  * The default range is IPPORT_RESERVED through
    173  * IPPORT_USERRESERVED, although that is settable by sysctl.
     208 * The default range is IPPORT_HIFIRSTAUTO through
     209 * IPPORT_HILASTAUTO, although that is settable by sysctl.
    174210 *
    175211 * A user may set the IPPROTO_IP option IP_PORTRANGE to change this
     
    192228 *
    193229 * Changing those values has bad security implications if you are
    194  * using a a stateless firewall that is allowing packets outside of that
     230 * using a stateless firewall that is allowing packets outside of that
    195231 * range in order to allow transparent outgoing connections.
    196232 *
     
    222258 */
    223259#define IPPORT_RESERVEDSTART    600
    224 #define BYTE_PACK __attribute__((packed))
    225 /*
    226  * Internet address (a structure for historical reasons)
    227  */
    228 struct in_addr {
    229         u_long s_addr BYTE_PACK;
    230 };
    231 
    232260/*
    233261 * Definitions of bits in internet address integers.
     
    261289#define IN_BADCLASS(i)          (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
    262290
    263 #define INADDR_ANY              (u_long)0x00000000
    264 #define INADDR_BROADCAST        (u_long)0xffffffff      /* must be masked */
    265291#ifndef _KERNEL
    266292#define INADDR_NONE             0xffffffff              /* -1 return */
     
    276302#define INADDR_LOOPBACK         (u_long)0x7F000001      /* 127.0.0.1 */
    277303#endif
    278 
    279 /*
    280  * Socket address, internet style.
    281  */
    282 struct sockaddr_in {
    283         u_char  sin_len;
    284         u_char  sin_family;
    285         u_short sin_port;
    286         struct  in_addr sin_addr;
    287         char    sin_zero[8];
    288 };
    289304
    290305/*
Note: See TracChangeset for help on using the changeset viewer.