Changeset 7adcf03 in rtems


Ignore:
Timestamp:
05/24/05 04:24:59 (19 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
23bf0865
Parents:
5d25da9
Message:

Remove BYTE_PACK.
Add packed.
Partial update from FreeBSD.

File:
1 edited

Legend:

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

    r5d25da9 r7adcf03  
    3838#define _NETINET_IP_H_
    3939
     40#include <sys/cdefs.h>
     41
    4042/*
    4143 * Definitions for internet protocol version 4.
     
    4446#define IPVERSION       4
    4547
    46 #ifndef BYTE_PACK
    47 #define BYTE_PACK __attribute__((packed))
     48#ifndef __packed
     49#if defined(__GNUC__)
     50#define __packed __attribute__((packed))
     51#else
     52#define __packed
     53#endif
    4854#endif
    4955
     
    6571#endif /* not _IP_VHL */
    6672        u_char  ip_tos;                 /* type of service */
    67         u_short ip_len BYTE_PACK;       /* total length */
    68         u_short ip_id BYTE_PACK;        /* identification */
    69         u_short ip_off BYTE_PACK;       /* fragment offset field */
     73        u_short ip_len;                 /* total length */
     74        u_short ip_id;                  /* identification */
     75        u_short ip_off;                 /* fragment offset field */
    7076#define IP_RF 0x8000                    /* reserved fragment flag */
    7177#define IP_DF 0x4000                    /* dont fragment flag */
     
    7480        u_char  ip_ttl;                 /* time to live */
    7581        u_char  ip_p;                   /* protocol */
    76         u_short ip_sum BYTE_PACK;                       /* checksum */
    77         struct  in_addr ip_src BYTE_PACK; /* source address */
    78         struct  in_addr ip_dst BYTE_PACK; /* dest address */
    79 };
     82        u_short ip_sum;                 /* checksum */
     83        struct  in_addr ip_src,ip_dst;  /* source and dest address */
     84} __packed;
    8085
    8186#ifdef _IP_VHL
Note: See TracChangeset for help on using the changeset viewer.