]> The Tcpdump Group git mirrors - tcpdump/commitdiff
add __attribute__ ((packed)). From [email protected] (Chris G. Demetriou)
authorassar <assar>
Sat, 10 Jun 2000 14:27:21 +0000 (14:27 +0000)
committerassar <assar>
Sat, 10 Jun 2000 14:27:21 +0000 (14:27 +0000)
linux-include/netinet/if_ether.h
linux-include/netinet/ip.h
linux-include/netinet/ip_icmp.h
linux-include/netinet/ip_var.h
linux-include/netinet/tcp.h
linux-include/netinet/tcpip.h
linux-include/netinet/udp.h
linux-include/netinet/udp_var.h

index f99e9ccda3c3e14e173f651209926db6c2258964..7374c72599f1c77c2e4295190a80a9fbfad51954 100644 (file)
@@ -45,7 +45,7 @@
  */
 struct ether_addr {
        u_char  ether_addr_octet[ETHER_ADDR_LEN];
-};
+} __attribute__ ((packed));
 
 /*
  * Structure of a 10Mb/s Ethernet header.
@@ -54,7 +54,7 @@ struct        ether_header {
        u_char  ether_dhost[ETHER_ADDR_LEN];
        u_char  ether_shost[ETHER_ADDR_LEN];
        u_short ether_type;
-};
+} __attribute__ ((packed));
 
 #define        ETHERTYPE_PUP           0x0200  /* PUP protocol */
 #define        ETHERTYPE_IP            0x0800  /* IP protocol */
@@ -86,7 +86,7 @@ struct        ether_arp {
        u_char  arp_spa[4];     /* sender protocol address */
        u_char  arp_tha[6];     /* target hardware address */
        u_char  arp_tpa[4];     /* target protocol address */
-};
+} __attribute__ ((packed));
 #define        arp_hrd ea_hdr.ar_hrd
 #define        arp_pro ea_hdr.ar_pro
 #define        arp_hln ea_hdr.ar_hln
index 93f98cdbc930c9674486c1ec1e9822b651e73dc1..9f00b22924efd8a7c75158caeb21980ea895648c 100644 (file)
@@ -68,7 +68,7 @@ struct ip {
        u_char  ip_p;                   /* protocol */
        u_short ip_sum;                 /* checksum */
        struct  in_addr ip_src,ip_dst;  /* source and dest address */
-};
+} __attribute__ ((packed));
 
 #define        IP_MAXPACKET    65535           /* maximum packet size */
 
@@ -143,7 +143,7 @@ struct      ip_timestamp {
                        n_long ipt_time;
                } ipt_ta[1];
        } ipt_timestamp;
-};
+} __attribute__ ((packed));
 
 /* flag bits for ipt_flg */
 #define        IPOPT_TS_TSONLY         0               /* timestamps only */
index c3fdc453904d6b181285d29efc6532ff2d4b4046..59944423303c4da5cb808b1ee3e67a641ad90479 100644 (file)
@@ -86,7 +86,7 @@ struct icmp {
 #define        icmp_ip         icmp_dun.id_ip.idi_ip
 #define        icmp_mask       icmp_dun.id_mask
 #define        icmp_data       icmp_dun.id_data
-};
+} __attribute__ ((packed));
 
 /*
  * Lower bounds on packet lengths for various types.
index c528b62fa98b60feede240524ce3c57d0933d3bb..ce116518ba89eacaa8c49caa9be0f91263b37536 100644 (file)
@@ -45,7 +45,7 @@ struct ipovly {
        short   ih_len;                 /* protocol length */
        struct  in_addr ih_src;         /* source internet address */
        struct  in_addr ih_dst;         /* destination internet address */
-};
+} __attribute__ ((packed));
 
 /*
  * Ip reassembly queue structure.  Each fragment
@@ -61,7 +61,7 @@ struct ipq {
        struct  ipasfrag *ipq_next,*ipq_prev;
                                        /* to ip headers of fragments */
        struct  in_addr ipq_src,ipq_dst;
-};
+} __attribute__ ((packed));
 
 /*
  * Ip header, when holding a fragment.
@@ -88,7 +88,7 @@ struct        ipasfrag {
        u_short ip_sum;
        struct  ipasfrag *ipf_next;     /* next fragment */
        struct  ipasfrag *ipf_prev;     /* previous fragment */
-};
+} __attribute__ ((packed));
 
 /*
  * Structure stored in mbuf in inpcb.ip_options
index 92654c6fb002bcedf5e98326db52a691845fa764..24f51c05b651f02b4e135b9abc88820c491c3f6f 100644 (file)
@@ -61,7 +61,7 @@ struct tcphdr {
        u_short th_win;                 /* window */
        u_short th_sum;                 /* checksum */
        u_short th_urp;                 /* urgent pointer */
-};
+} __attribute__ ((packed));
 
 #define        TCPOPT_EOL              0
 #define        TCPOPT_NOP              1
index 5000ae303ce31e00113981e9520ab268d2c97560..9b2d18ab2a22731e30ab4a3b3a4ce4e7fac996a4 100644 (file)
@@ -39,7 +39,7 @@
 struct tcpiphdr {
        struct  ipovly ti_i;            /* overlaid ip structure */
        struct  tcphdr ti_t;            /* tcp header */
-};
+} __attribute__ ((packed));
 #define        ti_next         ti_i.ih_next
 #define        ti_prev         ti_i.ih_prev
 #define        ti_x1           ti_i.ih_x1
index 354a213cbc2a0dcf96d7c7f8414da30e8481f141..8cb6f562a8314940da80f796167723d6610ed826 100644 (file)
@@ -42,4 +42,4 @@ struct udphdr {
        u_short uh_dport;               /* destination port */
        short   uh_ulen;                /* udp length */
        u_short uh_sum;                 /* udp checksum */
-};
+} __attribute__ ((packed));
index f36d832baea0bb888cf497e0b7c6dd500d9068d6..83b76646a3f4add85a54569b9b1940daf695331c 100644 (file)
@@ -39,7 +39,7 @@
 struct udpiphdr {
        struct  ipovly ui_i;            /* overlaid ip structure */
        struct  udphdr ui_u;            /* udp header */
-};
+} __attribute__ ((packed));
 #define        ui_next         ui_i.ih_next
 #define        ui_prev         ui_i.ih_prev
 #define        ui_x1           ui_i.ih_x1