35 #ifndef __WANPIPE_API_LEGACY__
36 #define __WANPIPE_API_LEGACY__
46 #define WAN_API_MAX_DATA 4096
48 unsigned char pktType;
49 unsigned short length;
54 unsigned short time_stamp;
58 unsigned short time_stamp;
67 unsigned char station;
69 unsigned short poll_interval;
70 unsigned char general_mailbox_byte;
73 unsigned char exception;
76 #define wan_apihdr_chdlc_error_flag wan_protocol.chdlc.arg1
77 #define wan_apihdr_chdlc_attr wan_protocol.chdlc.arg1
78 #define wan_apihdr_chdlc_time_stamp wan_protocol.chdlc.time_stamp
79 #define wan_apihdr_fr_attr wan_protocol.fr.attr
80 #define wan_apihdr_fr_time_stamp wan_protocol.fr.time_stamp
81 #define wan_apihdr_x25_qdm wan_protocol.x25.qdm
82 #define wan_apihdr_x25_cause wan_protocol.x25.cause
83 #define wan_apihdr_x25_diagn wan_protocol.x25.diagn
84 #define wan_apihdr_x25_lcn wan_protocol.x25.lcn
86 #define wan_apihdr_sdlc_station wan_protocol.sdlc.station
87 #define wan_apihdr_sdlc_pf wan_protocol.sdlc.PF_bit
88 #define wan_apihdr_sdlc_poll_interval wan_protocol.sdlc.poll_interval
89 #define wan_apihdr_sdlc_general_mb_byte wan_protocol.sdlc.general_mailbox_byte
91 #define wan_apihdr_xdlc_exception wan_protocol.xdlc.exception
97 #define wan_api_pktType api_hdr.pktType
98 #define wan_api_length api_hdr.length
99 #define wan_api_result api_hdr.result
100 #define wan_api_chdlc_error_flag api_hdr.wan_apihdr_chdlc_error_flag
101 #define wan_api_chdlc_time_stamp api_hdr.wan_apihdr_chdlc_time_stamp
102 #define wan_api_chdlc_attr api_hdr.wan_apihdr_chdlc_attr
103 #define wan_api_chdlc_misc_Tx_bits api_hdr.wan_apihdr_chdlc_misc_Tx_bits
104 #define wan_api_fr_attr api_hdr.wan_apihdr_fr_attr
105 #define wan_api_fr_time_stamp api_hdr.wan_apihdr_fr_time_stamp
106 #define wan_api_x25_qdm api_hdr.wan_apihdr_x25_qdm
107 #define wan_api_x25_cause api_hdr.wan_apihdr_x25_cause
108 #define wan_api_x25_diagn api_hdr.wan_apihdr_x25_diagn
109 #define wan_api_x25_lcn api_hdr.wan_apihdr_x25_lcn
110 #define wan_api_sdlc_station api_hdr.wan_apihdr_sdlc_station
111 #define wan_api_sdlc_pf api_hdr.wan_apihdr_sdlc_pf
112 #define wan_api_sdlc_poll_interval api_hdr.wan_apihdr_sdlc_poll_interval
113 #define wan_api_sdlc_general_mb_byte api_hdr.wan_apihdr_sdlc_general_mb_byte
114 #define wan_api_xdlc_exception api_hdr.wan_apihdr_xdlc_exception
118 #define WAN_MAX_DATA_SIZE 5000
119 #define MAX_LGTH_UDP_MGNT_PKT WAN_MAX_DATA_SIZE
121 #define WAN_MAILBOX_SIZE 16
122 #define WAN_MAX_POS_DATA_SIZE 1030
123 #define WAN_MAX_MBOX_DATA_SIZE 2032
125 #define WAN_MAX_CMD_DATA_SIZE 990
140 unsigned char data[WAN_MAX_CMD_DATA_SIZE];
164 unsigned char PF_bit;
169 unsigned short rxlost1;
170 unsigned int rxlost2;
178 unsigned char pktType;
181 unsigned char misc_Tx_Rx_bits;
182 unsigned char Rx_error_bits;
183 unsigned short Rx_time_stamp;
187 unsigned char misc_tx_rx_bits;
188 unsigned short heading_length;
189 unsigned short notify;
190 unsigned char station;
191 unsigned char poll_address;
192 unsigned char select_address;
193 unsigned char device_address;
194 unsigned char notify_extended;
197 unsigned char sdlc_address;
198 unsigned char PF_bit;
199 unsigned short poll_interval;
200 unsigned char general_mailbox_byte;
209 unsigned char pos_state;
210 unsigned char async_state;
212 unsigned char mbox[WAN_MAILBOX_SIZE];
214 #define wan_cmd_opp_flag wan_cmd_u.wan_p_cmd.opp_flag
215 #define wan_cmd_command wan_cmd_u.wan_p_cmd.command
216 #define wan_cmd_data_len wan_cmd_u.wan_p_cmd.data_len
217 #define wan_cmd_return_code wan_cmd_u.wan_p_cmd.return_code
218 #define wan_cmd_hdlc_PF_bit wan_cmd_u.wan_p_cmd.wan_protocol.hdlc.PF_bit
219 #define wan_cmd_fe_force wan_cmd_u.wan_p_cmd.wan_protocol.fe.force
220 #define wan_cmd_fr_dlci wan_cmd_u.wan_p_cmd.wan_protocol.fr.dlci
221 #define wan_cmd_fr_attr wan_cmd_u.wan_p_cmd.wan_protocol.fr.attr
222 #define wan_cmd_fr_rxlost1 wan_cmd_u.wan_p_cmd.wan_protocol.fr.rxlost1
223 #define wan_cmd_fr_rxlost2 wan_cmd_u.wan_p_cmd.wan_protocol.fr.rxlost2
224 #define wan_cmd_x25_pf wan_cmd_u.wan_p_cmd.wan_protocol.x25.pf
225 #define wan_cmd_x25_lcn wan_cmd_u.wan_p_cmd.wan_protocol.x25.lcn
226 #define wan_cmd_x25_qdm wan_cmd_u.wan_p_cmd.wan_protocol.x25.qdm
227 #define wan_cmd_x25_cause wan_cmd_u.wan_p_cmd.wan_protocol.x25.cause
228 #define wan_cmd_x25_diagn wan_cmd_u.wan_p_cmd.wan_protocol.x25.diagn
229 #define wan_cmd_x25_pktType wan_cmd_u.wan_p_cmd.wan_protocol.x25.pktType
230 #define wan_cmd_bscstrm_misc_bits wan_cmd_u.wan_p_cmd.wan_protocol.bscstrm.misc_Tx_Rx_bits
231 #define wan_cmd_bscstrm_Rx_err_bits wan_cmd_u.wan_p_cmd.wan_protocol.bscstrm.Rx_error_bits
232 #define wan_cmd_bscstrm_Rx_time_stamp wan_cmd_u.wan_p_cmd.wan_protocol.bscstrm.Rx_time_stamp
233 #define wan_cmd_bscstrm_port wan_cmd_u.wan_p_cmd.wan_protocol.bscstrm.port
234 #define wan_cmd_bsc_misc_bits wan_cmd_u.wan_p_cmd.wan_protocol.bsc.misc_tx_rx_bits
235 #define wan_cmd_bsc_heading_len wan_cmd_u.wan_p_cmd.wan_protocol.bsc.heading_length
236 #define wan_cmd_bsc_notify wan_cmd_u.wan_p_cmd.wan_protocol.bsc.notify
237 #define wan_cmd_bsc_station wan_cmd_u.wan_p_cmd.wan_protocol.bsc.station
238 #define wan_cmd_bsc_poll_addr wan_cmd_u.wan_p_cmd.wan_protocol.bsc.poll_address
239 #define wan_cmd_bsc_select_addr wan_cmd_u.wan_p_cmd.wan_protocol.bsc.select_address
240 #define wan_cmd_bsc_device_addr wan_cmd_u.wan_p_cmd.wan_protocol.bsc.device_address
241 #define wan_cmd_bsc_notify_ext wan_cmd_u.wan_p_cmd.wan_protocol.bsc.notify_extended
242 #define wan_cmd_sdlc_address wan_cmd_u.wan_p_cmd.wan_protocol.sdlc.sdlc_address
243 #define wan_cmd_sdlc_pf wan_cmd_u.wan_p_cmd.wan_protocol.sdlc.PF_bit
244 #define wan_cmd_sdlc_poll_interval wan_cmd_u.wan_p_cmd.wan_protocol.sdlc.poll_interval
245 #define wan_cmd_sdlc_general_mb_byte wan_cmd_u.wan_p_cmd.wan_protocol.sdlc.general_mailbox_byte
247 #define wan_cmd_pos_opp_flag wan_cmd_u.wan_pos_cmd.opp_flag
248 #define wan_cmd_pos_pos_state wan_cmd_u.wan_pos_cmd.pos_state
249 #define wan_cmd_pos_async_state wan_cmd_u.wan_pos_cmd.async_state
257 unsigned char command;
258 unsigned short data_len;
259 unsigned char return_code;
260 unsigned char port_num;
262 unsigned char reserved[10];
263 unsigned char data[WAN_MAX_POS_DATA_SIZE];
265 unsigned char data[WAN_MAX_MBOX_DATA_SIZE];
267 #define wan_opp_flag wan_cmd.wan_cmd_opp_flag
268 #define wan_command wan_cmd.wan_cmd_command
269 #define wan_data_len wan_cmd.wan_cmd_data_len
270 #define wan_return_code wan_cmd.wan_cmd_return_code
271 #define wan_hdlc_PF_bit wan_cmd.wan_cmd_hdlc_PF_bit
272 #define wan_fr_dlci wan_cmd.wan_cmd_fr_dlci
273 #define wan_fr_attr wan_cmd.wan_cmd_fr_attr
274 #define wan_fr_rxlost1 wan_cmd.wan_cmd_fr_rxlost1
275 #define wan_fr_rxlost2 wan_cmd.wan_cmd_fr_rxlost2
276 #define wan_x25_pf wan_cmd.wan_cmd_x25_pf
277 #define wan_x25_lcn wan_cmd.wan_cmd_x25_lcn
278 #define wan_x25_qdm wan_cmd.wan_cmd_x25_qdm
279 #define wan_x25_cause wan_cmd.wan_cmd_x25_cause
280 #define wan_x25_diagn wan_cmd.wan_cmd_x25_diagn
281 #define wan_x25_pktType wan_cmd.wan_cmd_x25_pktType
282 #define wan_bscstrm_misc_bits wan_cmd.wan_cmd_bscstrm_misc_bits
283 #define wan_bscstrm_Rx_err_bits wan_cmd.wan_cmd_bscstrm_Rx_error_bits
284 #define wan_bscstrm_Rx_time_stamp wan_cmd.wan_cmd_bscstrm_Rx_time_stamp
285 #define wan_bscstrm_port wan_cmd.wan_cmd_bscstrm_port
286 #define wan_bsc_misc_bits wan_cmd.wan_cmd_bsc_misc_bits
287 #define wan_bsc_heading_len wan_cmd.wan_cmd_bsc_heading_length
288 #define wan_bsc_notify wan_cmd.wan_cmd_bsc_notify
289 #define wan_bsc_station wan_cmd.wan_cmd_bsc_station
290 #define wan_bsc_poll_addr wan_cmd.wan_cmd_bsc_poll_address
291 #define wan_bsc_select_addr wan_cmd.wan_cmd_bsc_select_address
292 #define wan_bsc_device_addr wan_cmd.wan_cmd_bsc_device_address
293 #define wan_bsc_notify_ext wan_cmd.wan_cmd_bsc_notify_extended
294 #define wan_sdlc_address wan_cmd.wan_cmd_sdlc_address
295 #define wan_sdlc_pf wan_cmd.wan_cmd_sdlc_pf
296 #define wan_sdlc_poll_interval wan_cmd.wan_cmd_sdlc_poll_interval
297 #define wan_sdlc_general_mb_byte wan_cmd.wan_cmd_sdlc_general_mb_byte
298 #define wan_data wan_u_data.data
300 #define wan_pos_opp_flag wan_cmd.wan_cmd_pos_opp_flag
301 #define wan_pos_pos_state wan_cmd.wan_cmd_pos_pos_state
302 #define wan_pos_async_state wan_cmd.wan_cmd_pos_async_state
303 #define wan_pos_command wan_u_data.pos_data.command
304 #define wan_pos_data_len wan_u_data.pos_data.data_len
305 #define wan_pos_return_code wan_u_data.pos_data.return_code
306 #define wan_pos_port_num wan_u_data.pos_data.port_num
307 #define wan_pos_attr wan_u_data.pos_data.attr
308 #define wan_pos_data wan_u_data.pos_data.data
311 #define WAN_MBOX_INIT(mbox) memset(mbox, 0, sizeof(wan_cmd_t));
Wanpipe Legacy Command Structure.
unsigned char return_code
Wanpipe UDP CMD Structure.