]> The Tcpdump Group git mirrors - libpcap/commitdiff
add __attribute__ ((packed)). From [email protected] (Chris G. Demetriou)
authorassar <assar>
Sat, 10 Jun 2000 14:26:40 +0000 (14:26 +0000)
committerassar <assar>
Sat, 10 Jun 2000 14:26:40 +0000 (14:26 +0000)
linux-include/netinet/if_ether.h
linux-include/netinet/ip_var.h

index 4148ab83ea49d621f22c3f95751a0297ad38fa66..dd5044ab0448a2fb488b4b99c789ca09f6431369 100644 (file)
@@ -40,7 +40,7 @@
  */
 struct ether_addr {
        u_char  ether_addr_octet[6];
-};
+} __attribute__ ((packed));
 
 /*
  * Structure of a 10Mb/s Ethernet header.
@@ -49,7 +49,7 @@ struct        ether_header {
        u_char  ether_dhost[6];
        u_char  ether_shost[6];
        u_short ether_type;
-};
+} __attribute__ ((packed));
 
 #define        ETHERTYPE_PUP           0x0200  /* PUP protocol */
 #define        ETHERTYPE_IP            0x0800  /* IP protocol */
@@ -80,7 +80,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 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