diff options
author | alfred <alfred@FreeBSD.org> | 2002-09-23 06:25:08 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-09-23 06:25:08 +0000 |
commit | 9bda36d99712c4dcd253f988e696579f3ce3653c (patch) | |
tree | c64473ad2e9302c65a81387cb678dd7c17089662 | |
parent | d5db7184e3f5c8d842f1e4407084d75fc49e953e (diff) | |
download | FreeBSD-src-9bda36d99712c4dcd253f988e696579f3ce3653c.zip FreeBSD-src-9bda36d99712c4dcd253f988e696579f3ce3653c.tar.gz |
s/__attribute__((__packed__))/__packed/g
-rw-r--r-- | sys/dev/ray/if_raymib.h | 8 | ||||
-rw-r--r-- | sys/dev/usb/usb.h | 2 | ||||
-rw-r--r-- | sys/net/if_arc.h | 4 | ||||
-rw-r--r-- | sys/net/if_gre.h | 8 | ||||
-rw-r--r-- | sys/net/if_llc.h | 18 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 6 | ||||
-rw-r--r-- | sys/netinet/icmp6.h | 38 | ||||
-rw-r--r-- | sys/netinet/ip6.h | 14 | ||||
-rw-r--r-- | sys/netinet6/in6_cksum.c | 2 |
9 files changed, 50 insertions, 50 deletions
diff --git a/sys/dev/ray/if_raymib.h b/sys/dev/ray/if_raymib.h index 8657715..c8ce255 100644 --- a/sys/dev/ray/if_raymib.h +++ b/sys/dev/ray/if_raymib.h @@ -74,7 +74,7 @@ struct ray_mib_common_head { /*Offset*/ /*Size*/ u_int8_t mib_country_code; /*48*/ u_int8_t mib_hop_seq; /*49*/ u_int8_t mib_hop_seq_len; /*4a*/ -} __attribute__((__packed__)); +} __packed; struct ray_mib_common_tail { u_int8_t mib_noise_filter_gain; /*00*/ @@ -85,14 +85,14 @@ struct ray_mib_common_tail { u_int8_t mib_test_mode; /*05*/ u_int8_t mib_test_min_chan; /*06*/ u_int8_t mib_test_max_chan; /*07*/ -} __attribute__((__packed__)); +} __packed; struct ray_mib_4 { struct ray_mib_common_head mib_head; /*00*/ u_int8_t mib_cw_max; /*4b*/ u_int8_t mib_cw_min; /*4c*/ struct ray_mib_common_tail mib_tail; /*4d*/ -} __attribute__((__packed__)); +} __packed; struct ray_mib_5 { struct ray_mib_common_head mib_head; /*00*/ @@ -103,7 +103,7 @@ struct ray_mib_5 { u_int8_t mib_privacy_must_start; /*58*/ u_int8_t mib_privacy_can_join; /*59*/ u_int8_t mib_basic_rate_set[8]; /*5a*/ /*08*/ -} __attribute__((__packed__)); +} __packed; #define mib_net_type mib_head.mib_net_type #define mib_ap_status mib_head.mib_ap_status diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 326afaf..2f54628 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -98,7 +98,7 @@ typedef u_int8_t uDWord[4]; #define USETDW(w,v) (*(u_int32_t *)(w) = (v)) #endif -#define UPACKED __attribute__((__packed__)) +#define UPACKED __packed typedef struct { uByte bmRequestType; diff --git a/sys/net/if_arc.h b/sys/net/if_arc.h index b430698..9f2da93 100644 --- a/sys/net/if_arc.h +++ b/sys/net/if_arc.h @@ -46,7 +46,7 @@ */ struct arc_addr { u_int8_t arc_addr_octet[1]; -} __attribute__((__packed__)); +} __packed; /* * Structure of a 2.5MB/s Arcnet header. @@ -69,7 +69,7 @@ struct arc_header { u_int8_t arc_type2; /* same as arc_type */ u_int8_t arc_flag2; /* real flag value */ u_int16_t arc_seqid2; /* real seqid value */ -} __attribute__((__packed__)); +} __packed; #define ARC_ADDR_LEN 1 diff --git a/sys/net/if_gre.h b/sys/net/if_gre.h index 84e2e61..a626ee7 100644 --- a/sys/net/if_gre.h +++ b/sys/net/if_gre.h @@ -84,12 +84,12 @@ struct gre_h { struct gre_sre[] routing Routing fileds (see below) Present if (rt_pres == 1) */ -} __attribute__((__packed__)); +} __packed; struct greip { struct ip gi_i; struct gre_h gi_g; -} __attribute__((__packed__)); +} __packed; #define gi_pr gi_i.ip_p #define gi_len gi_i.ip_len @@ -128,12 +128,12 @@ struct mobile_h { u_int16_t hcrc; /* header checksum */ u_int32_t odst; /* original destination address */ u_int32_t osrc; /* original source addr, if S-bit set */ -} __attribute__((__packed__)); +} __packed; struct mobip_h { struct ip mi; struct mobile_h mh; -} __attribute__((__packed__)); +} __packed; #define MOB_H_SIZ_S (sizeof(struct mobile_h) - sizeof(u_int32_t)) diff --git a/sys/net/if_llc.h b/sys/net/if_llc.h index 3bf5676..368c4e0 100644 --- a/sys/net/if_llc.h +++ b/sys/net/if_llc.h @@ -56,15 +56,15 @@ struct llc { u_int8_t format_id; u_int8_t class; u_int8_t window_x2; - } type_u __attribute__((__packed__)); + } type_u __packed; struct { u_int8_t num_snd_x2; u_int8_t num_rcv_x2; - } type_i __attribute__((__packed__)); + } type_i __packed; struct { u_int8_t control; u_int8_t num_rcv_x2; - } type_s __attribute__((__packed__)); + } type_s __packed; struct { u_int8_t control; /* @@ -76,18 +76,18 @@ struct llc { u_int8_t frmr_control; u_int8_t frmr_control_ext; u_int8_t frmr_cause; - } type_frmr __attribute__((__packed__)); + } type_frmr __packed; struct { u_int8_t control; u_int8_t org_code[3]; u_int16_t ether_type; - } type_snap __attribute__((__packed__)); + } type_snap __packed; struct { u_int8_t control; u_int8_t control_ext; - } type_raw __attribute__((__packed__)); - } llc_un /* XXX __attribute__((__packed__)) ??? */; -} __attribute__((__packed__)); + } type_raw __packed; + } llc_un /* XXX __packed ??? */; +} __packed; struct frmrinfo { u_int8_t frmr_rej_pdu0; @@ -95,7 +95,7 @@ struct frmrinfo { u_int8_t frmr_control; u_int8_t frmr_control_ext; u_int8_t frmr_cause; -} __attribute__((__packed__)); +} __packed; #define llc_control llc_un.type_u.control #define llc_control_ext llc_un.type_raw.control_ext diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 5a9184b..3709f71 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -212,14 +212,14 @@ struct ppp_header { u_char address; u_char control; u_short protocol; -} __attribute__((__packed__)); +} __packed; #define PPP_HEADER_LEN sizeof (struct ppp_header) struct lcp_header { u_char type; u_char ident; u_short len; -} __attribute__((__packed__)); +} __packed; #define LCP_HEADER_LEN sizeof (struct lcp_header) struct cisco_packet { @@ -229,7 +229,7 @@ struct cisco_packet { u_short rel; u_short time0; u_short time1; -} __attribute__((__packed__)); +} __packed; #define CISCO_PACKET_LEN sizeof (struct cisco_packet) /* diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 2b1f529..374c67e 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -80,7 +80,7 @@ struct icmp6_hdr { u_int16_t icmp6_un_data16[2]; /* type-specific field */ u_int8_t icmp6_un_data8[4]; /* type-specific field */ } icmp6_dataun; -} __attribute__((__packed__)); +} __packed; #define icmp6_data32 icmp6_dataun.icmp6_un_data32 #define icmp6_data16 icmp6_dataun.icmp6_un_data16 @@ -179,7 +179,7 @@ struct icmp6_hdr { struct mld_hdr { struct icmp6_hdr mld_icmp6_hdr; struct in6_addr mld_addr; /* multicast address */ -} __attribute__((__packed__)); +} __packed; /* definitions to provide backward compatibility to old KAME applications */ #ifndef _KERNEL @@ -206,7 +206,7 @@ struct mld_hdr { struct nd_router_solicit { /* router solicitation */ struct icmp6_hdr nd_rs_hdr; /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_rs_type nd_rs_hdr.icmp6_type #define nd_rs_code nd_rs_hdr.icmp6_code @@ -218,7 +218,7 @@ struct nd_router_advert { /* router advertisement */ u_int32_t nd_ra_reachable; /* reachable time */ u_int32_t nd_ra_retransmit; /* retransmit timer */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_ra_type nd_ra_hdr.icmp6_type #define nd_ra_code nd_ra_hdr.icmp6_code @@ -246,7 +246,7 @@ struct nd_neighbor_solicit { /* neighbor solicitation */ struct icmp6_hdr nd_ns_hdr; struct in6_addr nd_ns_target; /*target address */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_ns_type nd_ns_hdr.icmp6_type #define nd_ns_code nd_ns_hdr.icmp6_code @@ -257,7 +257,7 @@ struct nd_neighbor_advert { /* neighbor advertisement */ struct icmp6_hdr nd_na_hdr; struct in6_addr nd_na_target; /* target address */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_na_type nd_na_hdr.icmp6_type #define nd_na_code nd_na_hdr.icmp6_code @@ -280,7 +280,7 @@ struct nd_redirect { /* redirect */ struct in6_addr nd_rd_target; /* target address */ struct in6_addr nd_rd_dst; /* destination address */ /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; #define nd_rd_type nd_rd_hdr.icmp6_type #define nd_rd_code nd_rd_hdr.icmp6_code @@ -291,7 +291,7 @@ struct nd_opt_hdr { /* Neighbor discovery option header */ u_int8_t nd_opt_type; u_int8_t nd_opt_len; /* followed by option specific data*/ -} __attribute__((__packed__)); +} __packed; #define ND_OPT_SOURCE_LINKADDR 1 #define ND_OPT_TARGET_LINKADDR 2 @@ -310,7 +310,7 @@ struct nd_opt_prefix_info { /* prefix information */ u_int32_t nd_opt_pi_preferred_time; u_int32_t nd_opt_pi_reserved2; struct in6_addr nd_opt_pi_prefix; -} __attribute__((__packed__)); +} __packed; #define ND_OPT_PI_FLAG_ONLINK 0x80 #define ND_OPT_PI_FLAG_AUTO 0x40 @@ -321,14 +321,14 @@ struct nd_opt_rd_hdr { /* redirected header */ u_int16_t nd_opt_rh_reserved1; u_int32_t nd_opt_rh_reserved2; /* followed by IP header and data */ -} __attribute__((__packed__)); +} __packed; struct nd_opt_mtu { /* MTU option */ u_int8_t nd_opt_mtu_type; u_int8_t nd_opt_mtu_len; u_int16_t nd_opt_mtu_reserved; u_int32_t nd_opt_mtu_mtu; -} __attribute__((__packed__)); +} __packed; struct nd_opt_route_info { /* route info */ u_int8_t nd_opt_rti_type; @@ -337,7 +337,7 @@ struct nd_opt_route_info { /* route info */ u_int8_t nd_opt_rti_flags; u_int32_t nd_opt_rti_lifetime; /* prefix follows */ -} __attribute__((__packed__)); +} __packed; /* * icmp6 namelookup @@ -352,7 +352,7 @@ struct icmp6_namelookup { u_int8_t icmp6_nl_name[3]; #endif /* could be followed by options */ -} __attribute__((__packed__)); +} __packed; /* * icmp6 node information @@ -361,7 +361,7 @@ struct icmp6_nodeinfo { struct icmp6_hdr icmp6_ni_hdr; u_int8_t icmp6_ni_nonce[8]; /* could be followed by reply data */ -} __attribute__((__packed__)); +} __packed; #define ni_type icmp6_ni_hdr.icmp6_type #define ni_code icmp6_ni_hdr.icmp6_code @@ -424,7 +424,7 @@ struct ni_reply_fqdn { u_int32_t ni_fqdn_ttl; /* TTL */ u_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */ u_int8_t ni_fqdn_name[3]; /* XXX: alignment */ -} __attribute__((__packed__)); +} __packed; /* * Router Renumbering. as router-renum-08.txt @@ -435,7 +435,7 @@ struct icmp6_router_renum { /* router renumbering header */ u_int8_t rr_flags; u_int16_t rr_maxdelay; u_int32_t rr_reserved; -} __attribute__((__packed__)); +} __packed; #define ICMP6_RR_FLAGS_TEST 0x80 #define ICMP6_RR_FLAGS_REQRESULT 0x40 @@ -457,7 +457,7 @@ struct rr_pco_match { /* match prefix part */ u_int8_t rpm_maxlen; u_int16_t rpm_reserved; struct in6_addr rpm_prefix; -} __attribute__((__packed__)); +} __packed; #define RPM_PCO_ADD 1 #define RPM_PCO_CHANGE 2 @@ -473,7 +473,7 @@ struct rr_pco_use { /* use prefix part */ u_int32_t rpu_pltime; u_int32_t rpu_flags; struct in6_addr rpu_prefix; -} __attribute__((__packed__)); +} __packed; #define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80 #define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40 @@ -491,7 +491,7 @@ struct rr_result { /* router renumbering result message */ u_int8_t rrr_matchedlen; u_int32_t rrr_ifid; struct in6_addr rrr_prefix; -} __attribute__((__packed__)); +} __packed; #if BYTE_ORDER == BIG_ENDIAN #define ICMP6_RR_RESULT_FLAGS_OOB 0x0002 #define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001 diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index ec2c216..fe441d8 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -85,7 +85,7 @@ struct ip6_hdr { } ip6_ctlun; struct in6_addr ip6_src; /* source address */ struct in6_addr ip6_dst; /* destination address */ -} __attribute__((__packed__)); +} __packed; #define ip6_vfc ip6_ctlun.ip6_un2_vfc #define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow @@ -119,7 +119,7 @@ struct ip6_hdr { struct ip6_ext { u_int8_t ip6e_nxt; u_int8_t ip6e_len; -} __attribute__((__packed__)); +} __packed; /* Hop-by-Hop options header */ /* XXX should we pad it to force alignment on an 8-byte boundary? */ @@ -127,7 +127,7 @@ struct ip6_hbh { u_int8_t ip6h_nxt; /* next header */ u_int8_t ip6h_len; /* length in units of 8 octets */ /* followed by options */ -} __attribute__((__packed__)); +} __packed; /* Destination options header */ /* XXX should we pad it to force alignment on an 8-byte boundary? */ @@ -135,7 +135,7 @@ struct ip6_dest { u_int8_t ip6d_nxt; /* next header */ u_int8_t ip6d_len; /* length in units of 8 octets */ /* followed by options */ -} __attribute__((__packed__)); +} __packed; /* Option types and related macros */ #define IP6OPT_PAD1 0x00 /* 00 0 00000 */ @@ -174,7 +174,7 @@ struct ip6_rthdr { u_int8_t ip6r_type; /* routing type */ u_int8_t ip6r_segleft; /* segments left */ /* followed by routing type specific data */ -} __attribute__((__packed__)); +} __packed; /* Type 0 Routing header */ struct ip6_rthdr0 { @@ -185,7 +185,7 @@ struct ip6_rthdr0 { u_int8_t ip6r0_reserved; /* reserved field */ u_int8_t ip6r0_slmap[3]; /* strict/loose bit map */ struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */ -} __attribute__((__packed__)); +} __packed; /* Fragment header */ struct ip6_frag { @@ -193,7 +193,7 @@ struct ip6_frag { u_int8_t ip6f_reserved; /* reserved field */ u_int16_t ip6f_offlg; /* offset, reserved, and flag */ u_int32_t ip6f_ident; /* identification */ -} __attribute__((__packed__)); +} __packed; #if BYTE_ORDER == BIG_ENDIAN #define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */ diff --git a/sys/netinet6/in6_cksum.c b/sys/netinet6/in6_cksum.c index fbd95cb..cd49b88 100644 --- a/sys/netinet6/in6_cksum.c +++ b/sys/netinet6/in6_cksum.c @@ -110,7 +110,7 @@ in6_cksum(m, nxt, off, len) u_int32_t ph_len; u_int8_t ph_zero[3]; u_int8_t ph_nxt; - } ph __attribute__((__packed__)); + } ph __packed; } uph; union { u_int8_t c[2]; |