From 3b45b03a9c17874d9514ad66a0cd9a7b4a8cc609 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 13 Aug 2006 15:18:33 +0200 Subject: [GCC4] fix warnings in sdla_x25.c and sdla_x25.h Removes most of these warnings with gcc 4 : In file included from sdla_x25.c:107: /usr/src/git/linux-2.4/include/linux/sdla_x25.h:59: warning: 'packed' attribute ignored for field of type 'unsigned char' /usr/src/git/linux-2.4/include/linux/sdla_x25.h:61: warning: 'packed' attribute ignored for field of type 'unsigned char' (...) /usr/src/git/linux-2.4/include/linux/sdla_chdlc.h:65: warning: 'packed' attribute ignored for field of type 'unsigned char' /usr/src/git/linux-2.4/include/linux/sdla_chdlc.h:67: warning: 'packed' attribute ignored for field of type 'unsigned char' (...) sdla_x25.c:321: warning: 'packed' attribute ignored for field of type 'char[15u]' sdla_x25.c:322: warning: 'packed' attribute ignored for field of type 'char[15u]' (...) --- drivers/net/wan/sdla_x25.c | 26 +++-- include/linux/sdla_chdlc.h | 126 ++++++++++++------------- include/linux/sdla_x25.h | 222 ++++++++++++++++++++++---------------------- 3 files changed, 187 insertions(+), 187 deletions(-) diff --git a/drivers/net/wan/sdla_x25.c b/drivers/net/wan/sdla_x25.c index 0cfc8a4..3915c37 100644 --- a/drivers/net/wan/sdla_x25.c +++ b/drivers/net/wan/sdla_x25.c @@ -304,26 +304,26 @@ #endif #ifdef NEX_OLD_CALL_INFO typedef struct x25_call_info { - char dest[17]; PACKED;/* ASCIIZ destination address */ - char src[17]; PACKED;/* ASCIIZ source address */ - char nuser; PACKED;/* number of user data bytes */ - unsigned char user[127]; PACKED;/* user data */ - char nfacil; PACKED;/* number of facilities */ + char dest[17]; /* ASCIIZ destination address */ + char src[17]; /* ASCIIZ source address */ + char nuser; /* number of user data bytes */ + unsigned char user[127]; /* user data */ + char nfacil; /* number of facilities */ struct { - unsigned char code; PACKED; - unsigned char parm; PACKED; + unsigned char code; + unsigned char parm; } facil[64]; /* facilities */ } x25_call_info_t; #else typedef struct x25_call_info { - char dest[MAX_X25_ADDR_SIZE] PACKED;/* ASCIIZ destination address */ - char src[MAX_X25_ADDR_SIZE] PACKED;/* ASCIIZ source address */ - unsigned char nuser PACKED; - unsigned char user[MAX_X25_DATA_SIZE] PACKED;/* user data */ - unsigned char nfacil PACKED; - unsigned char facil[MAX_X25_FACL_SIZE] PACKED; + char dest[MAX_X25_ADDR_SIZE]; /* ASCIIZ destination address */ + char src[MAX_X25_ADDR_SIZE]; /* ASCIIZ source address */ + unsigned char nuser; + unsigned char user[MAX_X25_DATA_SIZE];/* user data */ + unsigned char nfacil; + unsigned char facil[MAX_X25_FACL_SIZE]; unsigned short lcn PACKED; } x25_call_info_t; #endif diff --git a/include/linux/sdla_chdlc.h b/include/linux/sdla_chdlc.h index d2e35a2..d6090b9 100644 --- a/include/linux/sdla_chdlc.h +++ b/include/linux/sdla_chdlc.h @@ -61,12 +61,12 @@ #define MIN_LGTH_CHDLC_DATA_CFG 300 / #define PRI_MAX_NO_DATA_BYTES_IN_FRAME 15354 /* PRIMARY - max length of the CHDLC data field */ typedef struct { - unsigned char opp_flag PACKED; /* the opp flag */ - unsigned char command PACKED; /* the user command */ + unsigned char opp_flag; /* the opp flag */ + unsigned char command; /* the user command */ unsigned short buffer_length PACKED; /* the data length */ - unsigned char return_code PACKED; /* the return code */ - unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; /* reserved for later */ - unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; /* the data area */ + unsigned char return_code; /* the return code */ + unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES]; /* reserved for later */ + unsigned char data[SIZEOF_MB_DATA_BFR]; /* the data area */ } CHDLC_MAILBOX_STRUCT; typedef struct { @@ -248,7 +248,7 @@ typedef struct { /* the trace configuration structure (SET_TRACE_CONFIGURATION/READ_TRACE_CONFIGURATION commands) */ typedef struct { - unsigned char trace_config PACKED; /* trace configuration */ + unsigned char trace_config; /* trace configuration */ unsigned short trace_deactivation_timer PACKED; /* trace deactivation timer */ unsigned long ptr_trace_stat_el_cfg_struct PACKED; /* a pointer to the line trace element configuration structure */ } LINE_TRACE_CONFIG_STRUCT; @@ -272,9 +272,9 @@ typedef struct { /* the line trace status element structure */ typedef struct { - unsigned char opp_flag PACKED; /* opp flag */ + unsigned char opp_flag; /* opp flag */ unsigned short trace_length PACKED; /* trace length */ - unsigned char trace_type PACKED; /* trace type */ + unsigned char trace_type; /* trace type */ unsigned short trace_time_stamp PACKED; /* time stamp */ unsigned short trace_reserved_1 PACKED; /* reserved for later use */ unsigned long trace_reserved_2 PACKED; /* reserved for later use */ @@ -415,10 +415,10 @@ #define DEFAULT_SLARP_REQ_TIMER 0 /* d /* the CHDLC status structure */ typedef struct { - unsigned char CHDLC_link_status PACKED; /* CHDLC link status */ - unsigned char no_Data_frms_for_app PACKED; /* number of Data frames available for the application */ - unsigned char receiver_status PACKED; /* enabled/disabled */ - unsigned char SLARP_state PACKED; /* internal SLARP state */ + unsigned char CHDLC_link_status; /* CHDLC link status */ + unsigned char no_Data_frms_for_app; /* number of Data frames available for the application */ + unsigned char receiver_status; /* enabled/disabled */ + unsigned char SLARP_state; /* internal SLARP state */ } CHDLC_LINK_STATUS_STRUCT; /* settings for the 'CHDLC_link_status' variable */ @@ -519,8 +519,8 @@ typedef struct { /* the structure used for the SET_CHDLC_INTERRUPT_TRIGGERS/READ_CHDLC_INTERRUPT_TRIGGERS command */ typedef struct { - unsigned char CHDLC_interrupt_triggers PACKED; /* CHDLC interrupt trigger configuration */ - unsigned char IRQ PACKED; /* IRQ to be used */ + unsigned char CHDLC_interrupt_triggers; /* CHDLC interrupt trigger configuration */ + unsigned char IRQ; /* IRQ to be used */ unsigned short interrupt_timer PACKED; /* interrupt timer */ unsigned short misc_interrupt_bits PACKED; /* miscellaneous bits */ } CHDLC_INT_TRIGGERS_STRUCT; @@ -563,9 +563,9 @@ typedef struct { /* the Data frame transmit status element structure */ typedef struct { - unsigned char opp_flag PACKED; /* opp flag */ + unsigned char opp_flag; /* opp flag */ unsigned short frame_length PACKED; /* length of the frame to be transmitted */ - unsigned char reserved_1 PACKED; /* reserved for internal use */ + unsigned char reserved_1; /* reserved for internal use */ unsigned long reserved_2 PACKED; /* reserved for internal use */ unsigned long reserved_3 PACKED; /* reserved for internal use */ unsigned long ptr_data_bfr PACKED; /* pointer to the data area */ @@ -588,9 +588,9 @@ typedef struct { /* the Data frame receive status element structure */ typedef struct { - unsigned char opp_flag PACKED; /* opp flag */ + unsigned char opp_flag; /* opp flag */ unsigned short frame_length PACKED; /* length of the received frame */ - unsigned char error_flag PACKED; /* frame errors (HDLC_STREAMING_MODE)*/ + unsigned char error_flag; /* frame errors (HDLC_STREAMING_MODE)*/ unsigned short time_stamp PACKED; /* receive time stamp (HDLC_STREAMING_MODE) */ unsigned long reserved_1 PACKED; /* reserved for internal use */ unsigned short reserved_2 PACKED; /* reserved for internal use */ @@ -605,33 +605,33 @@ typedef struct { /* the global information structure */ typedef struct { - unsigned char global_status PACKED; /* global status */ - unsigned char modem_status PACKED; /* current modem status */ - unsigned char global_excep_conditions PACKED; /* global exception conditions */ - unsigned char glob_info_reserved[5] PACKED; /* reserved */ - unsigned char codename[4] PACKED; /* Firmware name */ - unsigned char codeversion[4] PACKED; /* Firmware version */ + unsigned char global_status; /* global status */ + unsigned char modem_status; /* current modem status */ + unsigned char global_excep_conditions; /* global exception conditions */ + unsigned char glob_info_reserved[5]; /* reserved */ + unsigned char codename[4]; /* Firmware name */ + unsigned char codeversion[4]; /* Firmware version */ } GLOBAL_INFORMATION_STRUCT; /* the CHDLC information structure */ typedef struct { - unsigned char CHDLC_status PACKED; /* CHDLC status */ - unsigned char CHDLC_excep_conditions PACKED; /* CHDLC exception conditions */ - unsigned char CHDLC_info_reserved[14] PACKED; /* reserved */ + unsigned char CHDLC_status; /* CHDLC status */ + unsigned char CHDLC_excep_conditions; /* CHDLC exception conditions */ + unsigned char CHDLC_info_reserved[14]; /* reserved */ } CHDLC_INFORMATION_STRUCT; /* the interrupt information structure */ typedef struct { - unsigned char interrupt_type PACKED; /* type of interrupt triggered */ - unsigned char interrupt_permission PACKED; /* interrupt permission mask */ - unsigned char int_info_reserved[14] PACKED; /* reserved */ + unsigned char interrupt_type; /* type of interrupt triggered */ + unsigned char interrupt_permission; /* interrupt permission mask */ + unsigned char int_info_reserved[14]; /* reserved */ } INTERRUPT_INFORMATION_STRUCT; /* the S508/FT1 information structure */ typedef struct { - unsigned char parallel_port_A_input PACKED; /* input - parallel port A */ - unsigned char parallel_port_B_input PACKED; /* input - parallel port B */ - unsigned char FT1_info_reserved[14] PACKED; /* reserved */ + unsigned char parallel_port_A_input; /* input - parallel port A */ + unsigned char parallel_port_B_input; /* input - parallel port B */ + unsigned char FT1_info_reserved[14]; /* reserved */ } FT1_INFORMATION_STRUCT; /* the shared memory area information structure */ @@ -650,32 +650,32 @@ typedef struct { This is essentially a mailbox structure, without the large data field */ typedef struct { - unsigned char opp_flag PACKED; /* the opp flag */ - unsigned char command PACKED; /* the user command */ + unsigned char opp_flag; /* the opp flag */ + unsigned char command; /* the user command */ unsigned short buffer_length PACKED; /* the data length */ - unsigned char return_code PACKED; /* the return code */ - unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; /* reserved for later */ + unsigned char return_code; /* the return code */ + unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES]; /* reserved for later */ } cblock_t; /* UDP management packet layout (data area of ip packet) */ /* typedef struct { - unsigned char signature[8] PACKED; - unsigned char request_reply PACKED; - unsigned char id PACKED; - unsigned char reserved[6] PACKED; + unsigned char signature[8]; + unsigned char request_reply; + unsigned char id; + unsigned char reserved[6]; cblock_t cblock PACKED; - unsigned char num_frames PACKED; - unsigned char ismoredata PACKED; - unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; + unsigned char num_frames; + unsigned char ismoredata; + unsigned char data[SIZEOF_MB_DATA_BFR]; } udp_management_packet_t; */ typedef struct { - unsigned char num_frames PACKED; - unsigned char ismoredata PACKED; + unsigned char num_frames; + unsigned char ismoredata; } trace_info_t; typedef struct { @@ -684,20 +684,20 @@ typedef struct { wp_mgmt_t wp_mgmt PACKED; cblock_t cblock PACKED; trace_info_t trace_info PACKED; - unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; + unsigned char data[SIZEOF_MB_DATA_BFR]; } chdlc_udp_pkt_t; typedef struct ft1_exec_cmd{ - unsigned char command PACKED; /* the user command */ + unsigned char command; /* the user command */ unsigned short buffer_length PACKED; /* the data length */ - unsigned char return_code PACKED; /* the return code */ - unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES] PACKED; + unsigned char return_code; /* the return code */ + unsigned char MB_reserved[NUMBER_MB_RESERVED_BYTES]; } ft1_exec_cmd_t; typedef struct { - unsigned char opp_flag PACKED; + unsigned char opp_flag; ft1_exec_cmd_t cmd PACKED; - unsigned char data[SIZEOF_MB_DATA_BFR] PACKED; + unsigned char data[SIZEOF_MB_DATA_BFR]; } ft1_exec_t; #define UDPMGMT_SIGNATURE "CTPIPEAB" @@ -706,11 +706,11 @@ #define UDPMGMT_SIGNATURE "CTPIPEAB" /* UDP/IP packet (for UDP management) layout */ /* typedef struct { - unsigned char reserved[2] PACKED; + unsigned char reserved[2]; unsigned short ip_length PACKED; - unsigned char reserved2[4] PACKED; - unsigned char ip_ttl PACKED; - unsigned char ip_protocol PACKED; + unsigned char reserved2[4]; + unsigned char ip_ttl; + unsigned char ip_protocol; unsigned short ip_checksum PACKED; unsigned long ip_src_address PACKED; unsigned long ip_dst_address PACKED; @@ -727,17 +727,17 @@ #define UDPMGMT_UDP_PROTOCOL 0x11 typedef struct { - unsigned char status PACKED; - unsigned char data_avail PACKED; + unsigned char status; + unsigned char data_avail; unsigned short real_length PACKED; unsigned short time_stamp PACKED; - unsigned char data[1] PACKED; + unsigned char data[1]; } trace_pkt_t; typedef struct { - unsigned char error_flag PACKED; + unsigned char error_flag; unsigned short time_stamp PACKED; - unsigned char reserved[13] PACKED; + unsigned char reserved[13]; } api_rx_hdr_t; typedef struct { @@ -746,8 +746,8 @@ typedef struct { } api_rx_element_t; typedef struct { - unsigned char attr PACKED; - unsigned char reserved[15] PACKED; + unsigned char attr; + unsigned char reserved[15]; } api_tx_hdr_t; typedef struct { diff --git a/include/linux/sdla_x25.h b/include/linux/sdla_x25.h index 9827e74..4dd3647 100644 --- a/include/linux/sdla_x25.h +++ b/include/linux/sdla_x25.h @@ -56,16 +56,16 @@ #define DO_HDLC_LEVEL_ERROR_CHECKING 0x0 */ typedef struct X25Cmd { - unsigned char command PACKED; /* command code */ + unsigned char command; /* command code */ unsigned short length PACKED; /* transfer data length */ - unsigned char result PACKED; /* return code */ - unsigned char pf PACKED; /* P/F bit */ + unsigned char result; /* return code */ + unsigned char pf; /* P/F bit */ unsigned short lcn PACKED; /* logical channel */ - unsigned char qdm PACKED; /* Q/D/M bits */ - unsigned char cause PACKED; /* cause field */ - unsigned char diagn PACKED; /* diagnostics */ - unsigned char pktType PACKED; /* packet type */ - unsigned char resrv[4] PACKED; /* reserved */ + unsigned char qdm; /* Q/D/M bits */ + unsigned char cause; /* cause field */ + unsigned char diagn; /* diagnostics */ + unsigned char pktType; /* packet type */ + unsigned char resrv[4]; /* reserved */ } TX25Cmd; /* @@ -228,9 +228,9 @@ #define TIMER_INTR_PENDING 0x40 */ typedef struct X25Mbox { - unsigned char opflag PACKED; /* 00h: execution flag */ + unsigned char opflag; /* 00h: execution flag */ TX25Cmd cmd PACKED; /* 01h: command block */ - unsigned char data[1] PACKED; /* 10h: data buffer */ + unsigned char data[1]; /* 10h: data buffer */ } TX25Mbox; /*---------------------------------------------------------------------------- @@ -238,11 +238,11 @@ typedef struct X25Mbox */ typedef struct X25TimeStamp { - unsigned char month PACKED; - unsigned char date PACKED; - unsigned char sec PACKED; - unsigned char min PACKED; - unsigned char hour PACKED; + unsigned char month; + unsigned char date; + unsigned char sec; + unsigned char min; + unsigned char hour; } TX25TimeStamp; /*---------------------------------------------------------------------------- @@ -257,11 +257,11 @@ typedef struct X25Status unsigned short twc_map PACKED; /* 04h: Two-way Cnan. map */ unsigned short ogc_map PACKED; /* 06h: Outgoing Chan. map */ TX25TimeStamp tstamp PACKED; /* 08h: timestamp (BCD) */ - unsigned char iflags PACKED; /* 0Dh: interrupt flags */ - unsigned char imask PACKED; /* 0Eh: interrupt mask */ - unsigned char resrv PACKED; /* 0Eh: */ - unsigned char gflags PACKED; /* 10h: misc. HDLC/X25 flags */ - unsigned char cflags[X25_MAX_CHAN] PACKED; /* channel status bytes */ + unsigned char iflags; /* 0Dh: interrupt flags */ + unsigned char imask; /* 0Eh: interrupt mask */ + unsigned char resrv; /* 0Eh: */ + unsigned char gflags; /* 10h: misc. HDLC/X25 flags */ + unsigned char cflags[X25_MAX_CHAN]; /* channel status bytes */ } TX25Status; /* @@ -299,9 +299,9 @@ #define X25_RXBUF_MASK 0x3F /* number of */ typedef struct X25GlobalVars { - unsigned char resrv PACKED; /* 00h: reserved */ - unsigned char dtrCtl PACKED; /* 01h: DTR control code */ - unsigned char resErr PACKED; /* 01h: '1' - reset modem error */ + unsigned char resrv; /* 00h: reserved */ + unsigned char dtrCtl; /* 01h: DTR control code */ + unsigned char resErr; /* 01h: '1' - reset modem error */ } TX25GlobalVars; /* @@ -315,7 +315,7 @@ #define X25_DROP_DTR 0x02 */ typedef struct X25ModemStatus { - unsigned char status PACKED; /* 00h: modem status */ + unsigned char status; /* 00h: modem status */ } TX25ModemStatus; /* @@ -329,11 +329,11 @@ #define X25_DCD_MASK 0x08 */ typedef struct X25LinkStatus { - unsigned char txQueued PACKED; /* 00h: queued Tx I-frames*/ - unsigned char rxQueued PACKED; /* 01h: queued Rx I-frames*/ - unsigned char station PACKED; /* 02h: DTE/DCE config. */ - unsigned char reserved PACKED; /* 03h: reserved */ - unsigned char sfTally PACKED; /* 04h: supervisory frame tally */ + unsigned char txQueued; /* 00h: queued Tx I-frames*/ + unsigned char rxQueued; /* 01h: queued Rx I-frames*/ + unsigned char station; /* 02h: DTE/DCE config. */ + unsigned char reserved; /* 03h: reserved */ + unsigned char sfTally; /* 04h: supervisory frame tally */ } TX25LinkStatus; /* @@ -371,16 +371,16 @@ typedef struct HdlcStats */ typedef struct HdlcCommErr { /* a number of ... */ - unsigned char rxOverrun PACKED; /* 00h: Rx overrun errors */ - unsigned char rxBadCrc PACKED; /* 01h: Rx CRC errors */ - unsigned char rxAborted PACKED; /* 02h: Rx aborted frames */ - unsigned char rxDropped PACKED; /* 03h: frames lost */ - unsigned char txAborted PACKED; /* 04h: Tx aborted frames */ - unsigned char txUnderrun PACKED; /* 05h: Tx underrun errors */ - unsigned char txMissIntr PACKED; /* 06h: missed underrun ints */ - unsigned char reserved PACKED; /* 07h: reserved */ - unsigned char droppedDCD PACKED; /* 08h: times DCD dropped */ - unsigned char droppedCTS PACKED; /* 09h: times CTS dropped */ + unsigned char rxOverrun; /* 00h: Rx overrun errors */ + unsigned char rxBadCrc; /* 01h: Rx CRC errors */ + unsigned char rxAborted; /* 02h: Rx aborted frames */ + unsigned char rxDropped; /* 03h: frames lost */ + unsigned char txAborted; /* 04h: Tx aborted frames */ + unsigned char txUnderrun; /* 05h: Tx underrun errors */ + unsigned char txMissIntr; /* 06h: missed underrun ints */ + unsigned char reserved; /* 07h: reserved */ + unsigned char droppedDCD; /* 08h: times DCD dropped */ + unsigned char droppedCTS; /* 09h: times CTS dropped */ } THdlcCommErr; /* --------------------------------------------------------------------------- @@ -388,18 +388,18 @@ typedef struct HdlcCommErr */ typedef struct X25Config { -unsigned char baudRate PACKED; /* 00h: */ - unsigned char t1 PACKED; /* 01h: */ - unsigned char t2 PACKED; /* 02h: */ - unsigned char n2 PACKED; /* 03h: */ +unsigned char baudRate; /* 00h: */ + unsigned char t1; /* 01h: */ + unsigned char t2; /* 02h: */ + unsigned char n2; /* 03h: */ unsigned short hdlcMTU PACKED; /* 04h: */ - unsigned char hdlcWindow PACKED; /* 06h: */ - unsigned char t4 PACKED; /* 07h: */ - unsigned char autoModem PACKED; /* 08h: */ - unsigned char autoHdlc PACKED; /* 09h: */ - unsigned char hdlcOptions PACKED; /* 0Ah: */ - unsigned char station PACKED; /* 0Bh: */ - unsigned char pktWindow PACKED; /* 0Ch: */ + unsigned char hdlcWindow; /* 06h: */ + unsigned char t4; /* 07h: */ + unsigned char autoModem; /* 08h: */ + unsigned char autoHdlc; /* 09h: */ + unsigned char hdlcOptions; /* 0Ah: */ + unsigned char station; /* 0Bh: */ + unsigned char pktWindow; /* 0Ch: */ unsigned short defPktSize PACKED; /* 0Dh: */ unsigned short pktMTU PACKED; /* 0Fh: */ unsigned short loPVC PACKED; /* 11h: */ @@ -411,21 +411,21 @@ unsigned char baudRate PACKED; /* 00h: unsigned short loOutgoingSVC PACKED; /* 1Dh: */ unsigned short hiOutgoingSVC PACKED; /* 1Fh: */ unsigned short options PACKED; /* 21h: */ - unsigned char responseOpt PACKED; /* 23h: */ + unsigned char responseOpt; /* 23h: */ unsigned short facil1 PACKED; /* 24h: */ unsigned short facil2 PACKED; /* 26h: */ unsigned short ccittFacil PACKED; /* 28h: */ unsigned short otherFacil PACKED; /* 2Ah: */ unsigned short ccittCompat PACKED; /* 2Ch: */ - unsigned char t10t20 PACKED; /* 2Eh: */ - unsigned char t11t21 PACKED; /* 2Fh: */ - unsigned char t12t22 PACKED; /* 30h: */ - unsigned char t13t23 PACKED; /* 31h: */ - unsigned char t16t26 PACKED; /* 32H: */ - unsigned char t28 PACKED; /* 33h: */ - unsigned char r10r20 PACKED; /* 34h: */ - unsigned char r12r22 PACKED; /* 35h: */ - unsigned char r13r23 PACKED; /* 36h: */ + unsigned char t10t20; /* 2Eh: */ + unsigned char t11t21; /* 2Fh: */ + unsigned char t12t22; /* 30h: */ + unsigned char t13t23; /* 31h: */ + unsigned char t16t26; /* 32H: */ + unsigned char t28; /* 33h: */ + unsigned char r10r20; /* 34h: */ + unsigned char r12r22; /* 35h: */ + unsigned char r13r23; /* 36h: */ } TX25Config; /* --------------------------------------------------------------------------- @@ -445,9 +445,9 @@ typedef struct X25ChanAlloc /*----- Ch typedef struct X25ChanCfg /*------ Channel configuration -----*/ { - unsigned char type PACKED; /* 00h: channel type */ - unsigned char txConf PACKED; /* 01h: Tx packet and window sizes */ - unsigned char rxConf PACKED; /* 01h: Rx packet and window sizes */ + unsigned char type; /* 00h: channel type */ + unsigned char txConf; /* 01h: Tx packet and window sizes */ + unsigned char rxConf; /* 01h: Rx packet and window sizes */ } TX25ChanCfg; /* @@ -502,11 +502,11 @@ typedef struct X25Stats */ typedef struct X25EventLog { - unsigned char type PACKED; /* 00h: transaction type */ + unsigned char type; /* 00h: transaction type */ unsigned short lcn PACKED; /* 01h: logical channel num */ - unsigned char packet PACKED; /* 03h: async packet type */ - unsigned char cause PACKED; /* 04h: X.25 cause field */ - unsigned char diag PACKED; /* 05h: X.25 diag field */ + unsigned char packet; /* 03h: async packet type */ + unsigned char cause; /* 04h: X.25 cause field */ + unsigned char diag; /* 05h: X.25 diag field */ TX25TimeStamp ts PACKED; /* 06h: time stamp */ } TX25EventLog; @@ -540,8 +540,8 @@ #define X25LOG_DTE_REG_COMFRM 0xF7 */ typedef struct X25TraceCfg { - unsigned char flags PACKED; /* 00h: trace configuration flags */ - unsigned char timeout PACKED; /* 01h: timeout for trace delay mode*/ + unsigned char flags; /* 00h: trace configuration flags */ + unsigned char timeout; /* 01h: timeout for trace delay mode*/ } TX25TraceCfg; /* @@ -562,11 +562,11 @@ #define X25_TRC_READ 0x80 /* bit7: '1' typedef struct X25Trace /*----- Trace data structure -------*/ { unsigned short length PACKED; /* 00h: trace data length */ - unsigned char type PACKED; /* 02h: trace type */ - unsigned char lost_cnt PACKED; /* 03h: N of traces lost */ + unsigned char type; /* 02h: trace type */ + unsigned char lost_cnt; /* 03h: N of traces lost */ TX25TimeStamp tstamp PACKED; /* 04h: mon/date/sec/min/hour */ unsigned short millisec PACKED; /* 09h: ms time stamp */ - unsigned char data[0] PACKED; /* 0Bh: traced frame */ + unsigned char data[0]; /* 0Bh: traced frame */ } TX25Trace; /* @@ -591,17 +591,17 @@ #define X25_TRCERR_TX_UNDERRUN 0x80 /* t typedef struct HDLCFrame /*----- DHLC Frame Format ----------*/ { - unsigned char addr PACKED; /* address field */ - unsigned char cntl PACKED; /* control field */ - unsigned char data[0] PACKED; + unsigned char addr; /* address field */ + unsigned char cntl; /* control field */ + unsigned char data[0]; } THDLCFrame; typedef struct X25Pkt /*----- X.25 Paket Format ----------*/ { - unsigned char lcn_hi PACKED; /* 4 MSB of Logical Channel Number */ - unsigned char lcn_lo PACKED; /* 8 LSB of Logical Channel Number */ - unsigned char type PACKED; - unsigned char data[0] PACKED; + unsigned char lcn_hi; /* 4 MSB of Logical Channel Number */ + unsigned char lcn_lo; /* 8 LSB of Logical Channel Number */ + unsigned char type; + unsigned char data[0]; } TX25Pkt; /* @@ -636,25 +636,25 @@ #define X25PKT_RNR_MASKED 0x05 /* Receiv typedef struct { TX25Cmd cmd PACKED; - char data[X25_MAX_DATA] PACKED; + char data[X25_MAX_DATA]; } mbox_cmd_t; typedef struct { - unsigned char qdm PACKED; /* Q/D/M bits */ - unsigned char cause PACKED; /* cause field */ - unsigned char diagn PACKED; /* diagnostics */ - unsigned char pktType PACKED; + unsigned char qdm; /* Q/D/M bits */ + unsigned char cause; /* cause field */ + unsigned char diagn; /* diagnostics */ + unsigned char pktType; unsigned short length PACKED; - unsigned char result PACKED; + unsigned char result; unsigned short lcn PACKED; - char reserved[7] PACKED; + char reserved[7]; }x25api_hdr_t; typedef struct { x25api_hdr_t hdr PACKED; - char data[X25_MAX_DATA] PACKED; + char data[X25_MAX_DATA]; }x25api_t; @@ -674,17 +674,17 @@ #define UDP_OFFSET 12 typedef struct { - unsigned char opp_flag PACKED; /* the opp flag */ - unsigned char command PACKED; /* command code */ + unsigned char opp_flag; /* the opp flag */ + unsigned char command; /* command code */ unsigned short length PACKED; /* transfer data length */ - unsigned char result PACKED; /* return code */ - unsigned char pf PACKED; /* P/F bit */ + unsigned char result; /* return code */ + unsigned char pf; /* P/F bit */ unsigned short lcn PACKED; /* logical channel */ - unsigned char qdm PACKED; /* Q/D/M bits */ - unsigned char cause PACKED; /* cause field */ - unsigned char diagn PACKED; /* diagnostics */ - unsigned char pktType PACKED; /* packet type */ - unsigned char resrv[4] PACKED; /* reserved */ + unsigned char qdm; /* Q/D/M bits */ + unsigned char cause; /* cause field */ + unsigned char diagn; /* diagnostics */ + unsigned char pktType; /* packet type */ + unsigned char resrv[4]; /* reserved */ } cblock_t; typedef struct { @@ -692,7 +692,7 @@ typedef struct { udp_pkt_t udp_pkt PACKED; wp_mgmt_t wp_mgmt PACKED; cblock_t cblock PACKED; - unsigned char data[4080] PACKED; + unsigned char data[4080]; } x25_udp_pkt_t; @@ -717,25 +717,25 @@ typedef struct read_hdlc_stat { } read_hdlc_stat_t; typedef struct read_comms_err_stats{ - unsigned char overrun_err_rx PACKED; - unsigned char CRC_err PACKED; - unsigned char abort_frames_rx PACKED; - unsigned char frames_dropped_buf_full PACKED; - unsigned char abort_frames_tx PACKED; - unsigned char transmit_underruns PACKED; - unsigned char missed_tx_underruns_intr PACKED; - unsigned char reserved PACKED; - unsigned char DCD_drop PACKED; - unsigned char CTS_drop PACKED; + unsigned char overrun_err_rx; + unsigned char CRC_err; + unsigned char abort_frames_rx; + unsigned char frames_dropped_buf_full; + unsigned char abort_frames_tx; + unsigned char transmit_underruns; + unsigned char missed_tx_underruns_intr; + unsigned char reserved; + unsigned char DCD_drop; + unsigned char CTS_drop; } read_comms_err_stats_t; typedef struct trace_data { unsigned short length PACKED; - unsigned char type PACKED; - unsigned char trace_dropped PACKED; - unsigned char reserved[5] PACKED; + unsigned char type; + unsigned char trace_dropped; + unsigned char reserved[5]; unsigned short timestamp PACKED; - unsigned char data PACKED; + unsigned char data; } trace_data_t; enum {UDP_XPIPE_TYPE}; -- 1.4.2