Changeset 74c402a2 in rtems


Ignore:
Timestamp:
07/17/02 17:08:48 (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
4f0b287
Parents:
2b947a4
Message:

2002-07-17 Jay Monkman <jtm@…>

  • netinet/in.h, netinet/ip.h, netinet/ip_var.h, netinet/tcp.h: Modified to added packed attribute.o
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libnetworking/ChangeLog

    r2b947a4 r74c402a2  
     12002-07-17      Jay Monkman <jtm@smoothsmoothie.com>
     2
     3        * netinet/in.h, netinet/ip.h, netinet/ip_var.h, netinet/tcp.h:
     4        Modified to added packed attribute.o
    152002-07-05      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    26
  • c/src/exec/libnetworking/netinet/in.h

    r2b947a4 r74c402a2  
    205205 */
    206206#define IPPORT_RESERVEDSTART    600
    207 
     207#define BYTE_PACK __attribute__((packed))
    208208/*
    209209 * Internet address (a structure for historical reasons)
    210210 */
    211211struct in_addr {
    212         u_long s_addr;
     212        u_long s_addr BYTE_PACK;
    213213};
    214214
  • c/src/exec/libnetworking/netinet/ip.h

    r2b947a4 r74c402a2  
    6565#endif /* not _IP_VHL */
    6666        u_char  ip_tos;                 /* type of service */
    67         u_short ip_len;                 /* total length */
    68         u_short ip_id;                  /* identification */
    69         u_short ip_off;                 /* fragment offset field */
     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 */
    7070#define IP_RF 0x8000                    /* reserved fragment flag */
    7171#define IP_DF 0x4000                    /* dont fragment flag */
     
    7474        u_char  ip_ttl;                 /* time to live */
    7575        u_char  ip_p;                   /* protocol */
    76         u_short ip_sum;                 /* checksum */
    77         struct  in_addr ip_src,ip_dst;  /* source and dest address */
     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 */
    7879};
    7980
  • c/src/exec/libnetworking/netinet/ip_var.h

    r2b947a4 r74c402a2  
    4242 */
    4343struct ipovly {
    44         caddr_t ih_next, ih_prev;       /* for protocol sequence q's */
     44        caddr_t ih_next BYTE_PACK;
     45        caddr_t ih_prev BYTE_PACK;      /* for protocol sequence q's */
    4546        u_char  ih_x1;                  /* (unused) */
    4647        u_char  ih_pr;                  /* protocol */
    47         u_short ih_len;                 /* protocol length */
     48        u_short ih_len BYTE_PACK;               /* protocol length */
    4849        struct  in_addr ih_src;         /* source internet address */
    4950        struct  in_addr ih_dst;         /* destination internet address */
     
    6061        u_char  ipq_ttl;                /* time for reass q to live */
    6162        u_char  ipq_p;                  /* protocol of this fragment */
    62         u_short ipq_id;                 /* sequence id for reassembly */
     63        u_short ipq_id BYTE_PACK;       /* sequence id for reassembly */
    6364        struct  ipasfrag *ipq_next,*ipq_prev;
    6465                                        /* to ip headers of fragments */
    6566        struct  in_addr ipq_src,ipq_dst;
    6667#ifdef IPDIVERT
    67         u_short ipq_divert;             /* divert protocol port */
     68        u_short ipq_divert BYTE_PACK;   /* divert protocol port */
    6869#endif
    6970};
     
    8687                                         * to avoid destroying tos;
    8788                                         * copied from (ip_off&IP_MF) */
    88         u_short ip_len;
    89         u_short ip_id;
    90         u_short ip_off;
     89        u_short ip_len BYTE_PACK;
     90        u_short ip_id BYTE_PACK;
     91        u_short ip_off BYTE_PACK;
    9192        u_char  ip_ttl;
    9293        u_char  ip_p;
    93         u_short ip_sum;
     94        u_short ip_sum BYTE_PACK;
    9495        struct  ipasfrag *ipf_next;     /* next fragment */
    9596        struct  ipasfrag *ipf_prev;     /* previous fragment */
  • c/src/exec/libnetworking/netinet/tcp.h

    r2b947a4 r74c402a2  
    4646 */
    4747struct tcphdr {
    48         u_short th_sport;               /* source port */
    49         u_short th_dport;               /* destination port */
    50         tcp_seq th_seq;                 /* sequence number */
    51         tcp_seq th_ack;                 /* acknowledgement number */
     48        u_short th_sport BYTE_PACK;     /* source port */
     49        u_short th_dport BYTE_PACK;     /* destination port */
     50        tcp_seq th_seq BYTE_PACK;       /* sequence number */
     51        tcp_seq th_ack BYTE_PACK;       /* acknowledgement number */
    5252#if BYTE_ORDER == LITTLE_ENDIAN
    5353        u_char  th_x2:4,                /* (unused) */
     
    6767#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
    6868
    69         u_short th_win;                 /* window */
    70         u_short th_sum;                 /* checksum */
    71         u_short th_urp;                 /* urgent pointer */
     69        u_short th_win BYTE_PACK;       /* window */
     70        u_short th_sum BYTE_PACK;       /* checksum */
     71        u_short th_urp BYTE_PACK;       /* urgent pointer */
    7272};
    7373
  • cpukit/libnetworking/ChangeLog

    r2b947a4 r74c402a2  
     12002-07-17      Jay Monkman <jtm@smoothsmoothie.com>
     2
     3        * netinet/in.h, netinet/ip.h, netinet/ip_var.h, netinet/tcp.h:
     4        Modified to added packed attribute.o
    152002-07-05      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    26
  • cpukit/libnetworking/netinet/in.h

    r2b947a4 r74c402a2  
    205205 */
    206206#define IPPORT_RESERVEDSTART    600
    207 
     207#define BYTE_PACK __attribute__((packed))
    208208/*
    209209 * Internet address (a structure for historical reasons)
    210210 */
    211211struct in_addr {
    212         u_long s_addr;
     212        u_long s_addr BYTE_PACK;
    213213};
    214214
  • cpukit/libnetworking/netinet/ip.h

    r2b947a4 r74c402a2  
    6565#endif /* not _IP_VHL */
    6666        u_char  ip_tos;                 /* type of service */
    67         u_short ip_len;                 /* total length */
    68         u_short ip_id;                  /* identification */
    69         u_short ip_off;                 /* fragment offset field */
     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 */
    7070#define IP_RF 0x8000                    /* reserved fragment flag */
    7171#define IP_DF 0x4000                    /* dont fragment flag */
     
    7474        u_char  ip_ttl;                 /* time to live */
    7575        u_char  ip_p;                   /* protocol */
    76         u_short ip_sum;                 /* checksum */
    77         struct  in_addr ip_src,ip_dst;  /* source and dest address */
     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 */
    7879};
    7980
  • cpukit/libnetworking/netinet/ip_var.h

    r2b947a4 r74c402a2  
    4242 */
    4343struct ipovly {
    44         caddr_t ih_next, ih_prev;       /* for protocol sequence q's */
     44        caddr_t ih_next BYTE_PACK;
     45        caddr_t ih_prev BYTE_PACK;      /* for protocol sequence q's */
    4546        u_char  ih_x1;                  /* (unused) */
    4647        u_char  ih_pr;                  /* protocol */
    47         u_short ih_len;                 /* protocol length */
     48        u_short ih_len BYTE_PACK;               /* protocol length */
    4849        struct  in_addr ih_src;         /* source internet address */
    4950        struct  in_addr ih_dst;         /* destination internet address */
     
    6061        u_char  ipq_ttl;                /* time for reass q to live */
    6162        u_char  ipq_p;                  /* protocol of this fragment */
    62         u_short ipq_id;                 /* sequence id for reassembly */
     63        u_short ipq_id BYTE_PACK;       /* sequence id for reassembly */
    6364        struct  ipasfrag *ipq_next,*ipq_prev;
    6465                                        /* to ip headers of fragments */
    6566        struct  in_addr ipq_src,ipq_dst;
    6667#ifdef IPDIVERT
    67         u_short ipq_divert;             /* divert protocol port */
     68        u_short ipq_divert BYTE_PACK;   /* divert protocol port */
    6869#endif
    6970};
     
    8687                                         * to avoid destroying tos;
    8788                                         * copied from (ip_off&IP_MF) */
    88         u_short ip_len;
    89         u_short ip_id;
    90         u_short ip_off;
     89        u_short ip_len BYTE_PACK;
     90        u_short ip_id BYTE_PACK;
     91        u_short ip_off BYTE_PACK;
    9192        u_char  ip_ttl;
    9293        u_char  ip_p;
    93         u_short ip_sum;
     94        u_short ip_sum BYTE_PACK;
    9495        struct  ipasfrag *ipf_next;     /* next fragment */
    9596        struct  ipasfrag *ipf_prev;     /* previous fragment */
  • cpukit/libnetworking/netinet/tcp.h

    r2b947a4 r74c402a2  
    4646 */
    4747struct tcphdr {
    48         u_short th_sport;               /* source port */
    49         u_short th_dport;               /* destination port */
    50         tcp_seq th_seq;                 /* sequence number */
    51         tcp_seq th_ack;                 /* acknowledgement number */
     48        u_short th_sport BYTE_PACK;     /* source port */
     49        u_short th_dport BYTE_PACK;     /* destination port */
     50        tcp_seq th_seq BYTE_PACK;       /* sequence number */
     51        tcp_seq th_ack BYTE_PACK;       /* acknowledgement number */
    5252#if BYTE_ORDER == LITTLE_ENDIAN
    5353        u_char  th_x2:4,                /* (unused) */
     
    6767#define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
    6868
    69         u_short th_win;                 /* window */
    70         u_short th_sum;                 /* checksum */
    71         u_short th_urp;                 /* urgent pointer */
     69        u_short th_win BYTE_PACK;       /* window */
     70        u_short th_sum BYTE_PACK;       /* checksum */
     71        u_short th_urp BYTE_PACK;       /* urgent pointer */
    7272};
    7373
Note: See TracChangeset for help on using the changeset viewer.