GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / net / skfp / h / smt.h
blob0de38237c22694b07b8edb26b30f8047d1e06826
1 /******************************************************************************
3 * (C)Copyright 1998,1999 SysKonnect,
4 * a business unit of Schneider & Koch & Co. Datensysteme GmbH.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * The information in this file is provided "AS IS" without warranty.
13 ******************************************************************************/
16 * SMT 7.2 frame definitions
19 #ifndef _SMT_
20 #define _SMT_
22 /* #define SMT5_10 */
23 #define SMT6_10
24 #define SMT7_20
26 #define OPT_PMF /* if parameter management is supported */
27 #define OPT_SRF /* if status report is supported */
30 * SMT frame version 5.1
33 #define SMT_VID 0x0001 /* V 5.1 .. 6.1 */
34 #define SMT_VID_2 0x0002 /* V 7.2 */
36 struct smt_sid {
37 u_char sid_oem[2] ; /* implementation spec. */
38 struct fddi_addr sid_node ; /* node address */
39 } ;
41 typedef u_char t_station_id[8] ;
44 * note on alignment :
45 * sizeof(struct smt_header) = 32
46 * all parameters are long aligned
47 * if struct smt_header starts at offset 0, all longs are aligned correctly
48 * (FC starts at offset 3)
50 _packed struct smt_header {
51 struct fddi_addr smt_dest ; /* destination address */
52 struct fddi_addr smt_source ; /* source address */
53 u_char smt_class ; /* NIF, SIF ... */
54 u_char smt_type ; /* req., response .. */
55 u_short smt_version ; /* version id */
56 u_int smt_tid ; /* transaction ID */
57 struct smt_sid smt_sid ; /* station ID */
58 u_short smt_pad ; /* pad with 0 */
59 u_short smt_len ; /* length of info field */
60 } ;
61 #define SWAP_SMTHEADER "662sl8ss"
66 * type codes
68 #define SMT_ANNOUNCE 0x01 /* announcement */
69 #define SMT_REQUEST 0x02 /* request */
70 #define SMT_REPLY 0x03 /* reply */
73 * class codes
75 #define SMT_NIF 0x01 /* neighbor information frames */
76 #define SMT_SIF_CONFIG 0x02 /* station information configuration */
77 #define SMT_SIF_OPER 0x03 /* station information operation */
78 #define SMT_ECF 0x04 /* echo frames */
79 #define SMT_RAF 0x05 /* resource allocation */
80 #define SMT_RDF 0x06 /* request denied */
81 #define SMT_SRF 0x07 /* status report */
82 #define SMT_PMF_GET 0x08 /* parameter management get */
83 #define SMT_PMF_SET 0x09 /* parameter management set */
84 #define SMT_ESF 0xff /* extended service */
86 #define SMT_MAX_ECHO_LEN 4458 /* max length of SMT Echo */
87 #if defined(CONC) || defined(CONC_II)
88 #define SMT_TEST_ECHO_LEN 50 /* test length of SMT Echo */
89 #else
90 #define SMT_TEST_ECHO_LEN SMT_MAX_ECHO_LEN /* test length */
91 #endif
93 #define SMT_MAX_INFO_LEN (4352-20) /* max length for SMT info */
97 * parameter types
100 struct smt_para {
101 u_short p_type ; /* type */
102 u_short p_len ; /* length of parameter */
105 #define PARA_LEN (sizeof(struct smt_para))
107 #define SMTSETPARA(p,t) (p)->para.p_type = (t),\
108 (p)->para.p_len = sizeof(*(p)) - PARA_LEN
111 * P01 : Upstream Neighbor Address, UNA
113 #define SMT_P_UNA 0x0001 /* upstream neighbor address */
114 #define SWAP_SMT_P_UNA "s6"
116 struct smt_p_una {
117 struct smt_para para ; /* generic parameter header */
118 u_short una_pad ;
119 struct fddi_addr una_node ; /* node address, zero if unknown */
123 * P02 : Station Descriptor
125 #define SMT_P_SDE 0x0002 /* station descriptor */
126 #define SWAP_SMT_P_SDE "1111"
128 #define SMT_SDE_STATION 0 /* end node */
129 #define SMT_SDE_CONCENTRATOR 1 /* concentrator */
131 struct smt_p_sde {
132 struct smt_para para ; /* generic parameter header */
133 u_char sde_type ; /* station type */
134 u_char sde_mac_count ; /* number of MACs */
135 u_char sde_non_master ; /* number of A,B or S ports */
136 u_char sde_master ; /* number of S ports on conc. */
140 * P03 : Station State
142 #define SMT_P_STATE 0x0003 /* station state */
143 #define SWAP_SMT_P_STATE "scc"
145 struct smt_p_state {
146 struct smt_para para ; /* generic parameter header */
147 u_short st_pad ;
148 u_char st_topology ; /* topology */
149 u_char st_dupl_addr ; /* duplicate address detected */
151 #define SMT_ST_WRAPPED (1<<0) /* station wrapped */
152 #define SMT_ST_UNATTACHED (1<<1) /* unattached concentrator */
153 #define SMT_ST_TWISTED_A (1<<2) /* A-A connection, twisted ring */
154 #define SMT_ST_TWISTED_B (1<<3) /* B-B connection, twisted ring */
155 #define SMT_ST_ROOTED_S (1<<4) /* rooted station */
156 #define SMT_ST_SRF (1<<5) /* SRF protocol supported */
157 #define SMT_ST_SYNC_SERVICE (1<<6) /* use synchronous bandwidth */
159 #define SMT_ST_MY_DUPA (1<<0) /* my station detected dupl. */
160 #define SMT_ST_UNA_DUPA (1<<1) /* my UNA detected duplicate */
163 * P04 : timestamp
165 #define SMT_P_TIMESTAMP 0x0004 /* time stamp */
166 #define SWAP_SMT_P_TIMESTAMP "8"
167 struct smt_p_timestamp {
168 struct smt_para para ; /* generic parameter header */
169 u_char ts_time[8] ; /* time, resolution 80nS, unique */
173 * P05 : station policies
175 #define SMT_P_POLICY 0x0005 /* station policies */
176 #define SWAP_SMT_P_POLICY "ss"
178 struct smt_p_policy {
179 struct smt_para para ; /* generic parameter header */
180 u_short pl_config ;
181 u_short pl_connect ; /* bit string POLICY_AA ... */
183 #define SMT_PL_HOLD 1 /* hold policy supported (Dual MAC) */
186 * P06 : latency equivalent
188 #define SMT_P_LATENCY 0x0006 /* latency */
189 #define SWAP_SMT_P_LATENCY "ssss"
192 * note: latency has two phy entries by definition
193 * for a SAS, the 2nd one is null
195 struct smt_p_latency {
196 struct smt_para para ; /* generic parameter header */
197 u_short lt_phyout_idx1 ; /* index */
198 u_short lt_latency1 ; /* latency , unit : byte clock */
199 u_short lt_phyout_idx2 ; /* 0 if SAS */
200 u_short lt_latency2 ; /* 0 if SAS */
204 * P07 : MAC neighbors
206 #define SMT_P_NEIGHBORS 0x0007 /* MAC neighbor description */
207 #define SWAP_SMT_P_NEIGHBORS "ss66"
209 struct smt_p_neighbor {
210 struct smt_para para ; /* generic parameter header */
211 u_short nb_mib_index ; /* MIB index */
212 u_short nb_mac_index ; /* n+1 .. n+m, m = #MACs, n = #PHYs */
213 struct fddi_addr nb_una ; /* UNA , 0 for unknown */
214 struct fddi_addr nb_dna ; /* DNA , 0 for unknown */
218 * PHY record
220 #define SMT_PHY_A 0 /* A port */
221 #define SMT_PHY_B 1 /* B port */
222 #define SMT_PHY_S 2 /* slave port */
223 #define SMT_PHY_M 3 /* master port */
225 #define SMT_CS_DISABLED 0 /* connect state : disabled */
226 #define SMT_CS_CONNECTING 1 /* connect state : connecting */
227 #define SMT_CS_STANDBY 2 /* connect state : stand by */
228 #define SMT_CS_ACTIVE 3 /* connect state : active */
230 #define SMT_RM_NONE 0
231 #define SMT_RM_MAC 1
233 struct smt_phy_rec {
234 u_short phy_mib_index ; /* MIB index */
235 u_char phy_type ; /* A/B/S/M */
236 u_char phy_connect_state ; /* disabled/connecting/active */
237 u_char phy_remote_type ; /* A/B/S/M */
238 u_char phy_remote_mac ; /* none/remote */
239 u_short phy_resource_idx ; /* 1 .. n */
243 * MAC record
245 struct smt_mac_rec {
246 struct fddi_addr mac_addr ; /* MAC address */
247 u_short mac_resource_idx ; /* n+1 .. n+m */
251 * P08 : path descriptors
252 * should be really an array ; however our environment has a fixed number of
253 * PHYs and MACs
255 #define SMT_P_PATH 0x0008 /* path descriptor */
256 #define SWAP_SMT_P_PATH "[6s]"
258 struct smt_p_path {
259 struct smt_para para ; /* generic parameter header */
260 struct smt_phy_rec pd_phy[2] ; /* PHY A */
261 struct smt_mac_rec pd_mac ; /* MAC record */
265 * P09 : MAC status
267 #define SMT_P_MAC_STATUS 0x0009 /* MAC status */
268 #define SWAP_SMT_P_MAC_STATUS "sslllllllll"
270 struct smt_p_mac_status {
271 struct smt_para para ; /* generic parameter header */
272 u_short st_mib_index ; /* MIB index */
273 u_short st_mac_index ; /* n+1 .. n+m */
274 u_int st_t_req ; /* T_Req */
275 u_int st_t_neg ; /* T_Neg */
276 u_int st_t_max ; /* T_Max */
277 u_int st_tvx_value ; /* TVX_Value */
278 u_int st_t_min ; /* T_Min */
279 u_int st_sba ; /* synchr. bandwidth alloc */
280 u_int st_frame_ct ; /* frame counter */
281 u_int st_error_ct ; /* error counter */
282 u_int st_lost_ct ; /* lost frames counter */
286 * P0A : PHY link error rate monitoring
288 #define SMT_P_LEM 0x000a /* link error monitor */
289 #define SWAP_SMT_P_LEM "ssccccll"
291 * units of lem_cutoff,lem_alarm,lem_estimate : 10**-x
293 struct smt_p_lem {
294 struct smt_para para ; /* generic parameter header */
295 u_short lem_mib_index ; /* MIB index */
296 u_short lem_phy_index ; /* 1 .. n */
297 u_char lem_pad2 ; /* be nice and make it even . */
298 u_char lem_cutoff ; /* 0x4 .. 0xf, default 0x7 */
299 u_char lem_alarm ; /* 0x4 .. 0xf, default 0x8 */
300 u_char lem_estimate ; /* 0x0 .. 0xff */
301 u_int lem_reject_ct ; /* 0x00000000 .. 0xffffffff */
302 u_int lem_ct ; /* 0x00000000 .. 0xffffffff */
306 * P0B : MAC frame counters
308 #define SMT_P_MAC_COUNTER 0x000b /* MAC frame counters */
309 #define SWAP_SMT_P_MAC_COUNTER "ssll"
311 struct smt_p_mac_counter {
312 struct smt_para para ; /* generic parameter header */
313 u_short mc_mib_index ; /* MIB index */
314 u_short mc_index ; /* mac index */
315 u_int mc_receive_ct ; /* receive counter */
316 u_int mc_transmit_ct ; /* transmit counter */
320 * P0C : MAC frame not copied counter
322 #define SMT_P_MAC_FNC 0x000c /* MAC frame not copied counter */
323 #define SWAP_SMT_P_MAC_FNC "ssl"
325 struct smt_p_mac_fnc {
326 struct smt_para para ; /* generic parameter header */
327 u_short nc_mib_index ; /* MIB index */
328 u_short nc_index ; /* mac index */
329 u_int nc_counter ; /* not copied counter */
334 * P0D : MAC priority values
336 #define SMT_P_PRIORITY 0x000d /* MAC priority values */
337 #define SWAP_SMT_P_PRIORITY "ssl"
339 struct smt_p_priority {
340 struct smt_para para ; /* generic parameter header */
341 u_short pr_mib_index ; /* MIB index */
342 u_short pr_index ; /* mac index */
343 u_int pr_priority[7] ; /* priority values */
347 * P0E : PHY elasticity buffer status
349 #define SMT_P_EB 0x000e /* PHY EB status */
350 #define SWAP_SMT_P_EB "ssl"
352 struct smt_p_eb {
353 struct smt_para para ; /* generic parameter header */
354 u_short eb_mib_index ; /* MIB index */
355 u_short eb_index ; /* phy index */
356 u_int eb_error_ct ; /* # of eb overflows */
360 * P0F : manufacturer field
362 #define SMT_P_MANUFACTURER 0x000f /* manufacturer field */
363 #define SWAP_SMT_P_MANUFACTURER ""
365 struct smp_p_manufacturer {
366 struct smt_para para ; /* generic parameter header */
367 u_char mf_data[32] ; /* OUI + arbitrary data */
371 * P10 : user field
373 #define SMT_P_USER 0x0010 /* manufacturer field */
374 #define SWAP_SMT_P_USER ""
376 struct smp_p_user {
377 struct smt_para para ; /* generic parameter header */
378 u_char us_data[32] ; /* arbitrary data */
384 * P11 : echo data
386 #define SMT_P_ECHODATA 0x0011 /* echo data */
387 #define SWAP_SMT_P_ECHODATA ""
389 struct smt_p_echo {
390 struct smt_para para ; /* generic parameter header */
391 u_char ec_data[SMT_MAX_ECHO_LEN-4] ; /* echo data */
395 * P12 : reason code
397 #define SMT_P_REASON 0x0012 /* reason code */
398 #define SWAP_SMT_P_REASON "l"
400 struct smt_p_reason {
401 struct smt_para para ; /* generic parameter header */
402 u_int rdf_reason ; /* CLASS/VERSION */
404 #define SMT_RDF_CLASS 0x00000001 /* class not supported */
405 #define SMT_RDF_VERSION 0x00000002 /* version not supported */
406 #define SMT_RDF_SUCCESS 0x00000003 /* success (PMF) */
407 #define SMT_RDF_BADSET 0x00000004 /* bad set count (PMF) */
408 #define SMT_RDF_ILLEGAL 0x00000005 /* read only (PMF) */
409 #define SMT_RDF_NOPARAM 0x6 /* parameter not supported (PMF) */
410 #define SMT_RDF_RANGE 0x8 /* out of range */
411 #define SMT_RDF_AUTHOR 0x9 /* not autohorized */
412 #define SMT_RDF_LENGTH 0x0a /* length error */
413 #define SMT_RDF_TOOLONG 0x0b /* length error */
414 #define SMT_RDF_SBA 0x0d /* SBA denied */
417 * P13 : refused frame beginning
419 #define SMT_P_REFUSED 0x0013 /* refused frame beginning */
420 #define SWAP_SMT_P_REFUSED "l"
422 struct smt_p_refused {
423 struct smt_para para ; /* generic parameter header */
424 u_int ref_fc ; /* 3 bytes 0 + FC */
425 struct smt_header ref_header ; /* refused header */
429 * P14 : supported SMT versions
431 #define SMT_P_VERSION 0x0014 /* SMT supported versions */
432 #define SWAP_SMT_P_VERSION "sccss"
434 struct smt_p_version {
435 struct smt_para para ; /* generic parameter header */
436 u_short v_pad ;
437 u_char v_n ; /* 1 .. 0xff, #versions */
438 u_char v_index ; /* 1 .. 0xff, index of op. v. */
439 u_short v_version[1] ; /* list of min. 1 version */
440 u_short v_pad2 ; /* pad if necessary */
444 * P15 : Resource Type
446 #define SWAP_SMT_P0015 "l"
448 struct smt_p_0015 {
449 struct smt_para para ; /* generic parameter header */
450 u_int res_type ; /* recsource type */
453 #define SYNC_BW 0x00000001L /* Synchronous Bandwidth */
456 * P16 : SBA Command
458 #define SWAP_SMT_P0016 "l"
460 struct smt_p_0016 {
461 struct smt_para para ; /* generic parameter header */
462 u_int sba_cmd ; /* command for the SBA */
465 #define REQUEST_ALLOCATION 0x1 /* req allocation of sync bandwidth */
466 #define REPORT_ALLOCATION 0x2 /* rep of sync bandwidth allocation */
467 #define CHANGE_ALLOCATION 0x3 /* forces a station using sync band-*/
468 /* width to change its current allo-*/
469 /* cation */
472 * P17 : SBA Payload Request
474 #define SWAP_SMT_P0017 "l"
476 struct smt_p_0017 {
477 struct smt_para para ; /* generic parameter header */
478 int sba_pl_req ; /* total sync bandwidth measured in */
479 } ; /* bytes per 125 us */
482 * P18 : SBA Overhead Request
484 #define SWAP_SMT_P0018 "l"
486 struct smt_p_0018 {
487 struct smt_para para ; /* generic parameter header */
488 int sba_ov_req ; /* total sync bandwidth req for overhead*/
489 } ; /* measuered in bytes per T_Neg */
492 * P19 : SBA Allocation Address
494 #define SWAP_SMT_P0019 "s6"
496 struct smt_p_0019 {
497 struct smt_para para ; /* generic parameter header */
498 u_short sba_pad ;
499 struct fddi_addr alloc_addr ; /* Allocation Address */
503 * P1A : SBA Category
505 #define SWAP_SMT_P001A "l"
507 struct smt_p_001a {
508 struct smt_para para ; /* generic parameter header */
509 u_int category ; /* Allocator defined classification */
513 * P1B : Maximum T_Neg
515 #define SWAP_SMT_P001B "l"
517 struct smt_p_001b {
518 struct smt_para para ; /* generic parameter header */
519 u_int max_t_neg ; /* longest T_NEG for the sync service*/
523 * P1C : Minimum SBA Segment Size
525 #define SWAP_SMT_P001C "l"
527 struct smt_p_001c {
528 struct smt_para para ; /* generic parameter header */
529 u_int min_seg_siz ; /* smallest number of bytes per frame*/
533 * P1D : SBA Allocatable
535 #define SWAP_SMT_P001D "l"
537 struct smt_p_001d {
538 struct smt_para para ; /* generic parameter header */
539 u_int allocatable ; /* total sync bw available for alloc */
543 * P20 0B : frame status capabilities
544 * NOTE: not in swap table, is used by smt.c AND PMF table
546 #define SMT_P_FSC 0x200b
547 /* #define SWAP_SMT_P_FSC "ssss" */
549 struct smt_p_fsc {
550 struct smt_para para ; /* generic parameter header */
551 u_short fsc_pad0 ;
552 u_short fsc_mac_index ; /* mac index 1 .. ff */
553 u_short fsc_pad1 ;
554 u_short fsc_value ; /* FSC_TYPE[0-2] */
557 #define FSC_TYPE0 0 /* "normal" node (A/C handling) */
558 #define FSC_TYPE1 1 /* Special A/C indicator forwarding */
559 #define FSC_TYPE2 2 /* Special A/C indicator forwarding */
562 * P00 21 : user defined authoriziation (see pmf.c)
564 #define SMT_P_AUTHOR 0x0021
567 * notification parameters
569 #define SWAP_SMT_P1048 "ll"
570 struct smt_p_1048 {
571 u_int p1048_flag ;
572 u_int p1048_cf_state ;
576 * NOTE: all 2xxx 3xxx and 4xxx must include the INDEX in the swap string,
577 * even so the INDEX is NOT part of the struct.
578 * INDEX is already swapped in pmf.c, format in string is '4'
580 #define SWAP_SMT_P208C "4lss66"
581 struct smt_p_208c {
582 u_int p208c_flag ;
583 u_short p208c_pad ;
584 u_short p208c_dupcondition ;
585 struct fddi_addr p208c_fddilong ;
586 struct fddi_addr p208c_fddiunalong ;
589 #define SWAP_SMT_P208D "4lllll"
590 struct smt_p_208d {
591 u_int p208d_flag ;
592 u_int p208d_frame_ct ;
593 u_int p208d_error_ct ;
594 u_int p208d_lost_ct ;
595 u_int p208d_ratio ;
598 #define SWAP_SMT_P208E "4llll"
599 struct smt_p_208e {
600 u_int p208e_flag ;
601 u_int p208e_not_copied ;
602 u_int p208e_copied ;
603 u_int p208e_not_copied_ratio ;
606 #define SWAP_SMT_P208F "4ll6666s6"
608 struct smt_p_208f {
609 u_int p208f_multiple ;
610 u_int p208f_nacondition ;
611 struct fddi_addr p208f_old_una ;
612 struct fddi_addr p208f_new_una ;
613 struct fddi_addr p208f_old_dna ;
614 struct fddi_addr p208f_new_dna ;
615 u_short p208f_curren_path ;
616 struct fddi_addr p208f_smt_address ;
619 #define SWAP_SMT_P2090 "4lssl"
621 struct smt_p_2090 {
622 u_int p2090_multiple ;
623 u_short p2090_availablepaths ;
624 u_short p2090_currentpath ;
625 u_int p2090_requestedpaths ;
629 * NOTE:
630 * special kludge for parameters 320b,320f,3210
631 * these parameters are part of RAF frames
632 * RAF frames are parsed in SBA.C and must be swapped
633 * PMF.C has special code to avoid double swapping
635 #ifdef LITTLE_ENDIAN
636 #define SBAPATHINDEX (0x01000000L)
637 #else
638 #define SBAPATHINDEX (0x01L)
639 #endif
641 #define SWAP_SMT_P320B "42s"
643 struct smt_p_320b {
644 struct smt_para para ; /* generic parameter header */
645 u_int mib_index ;
646 u_short path_pad ;
647 u_short path_index ;
650 #define SWAP_SMT_P320F "4l"
652 struct smt_p_320f {
653 struct smt_para para ; /* generic parameter header */
654 u_int mib_index ;
655 u_int mib_payload ;
658 #define SWAP_SMT_P3210 "4l"
660 struct smt_p_3210 {
661 struct smt_para para ; /* generic parameter header */
662 u_int mib_index ;
663 u_int mib_overhead ;
666 #define SWAP_SMT_P4050 "4l1111ll"
668 struct smt_p_4050 {
669 u_int p4050_flag ;
670 u_char p4050_pad ;
671 u_char p4050_cutoff ;
672 u_char p4050_alarm ;
673 u_char p4050_estimate ;
674 u_int p4050_reject_ct ;
675 u_int p4050_ct ;
678 #define SWAP_SMT_P4051 "4lssss"
679 struct smt_p_4051 {
680 u_int p4051_multiple ;
681 u_short p4051_porttype ;
682 u_short p4051_connectstate ;
683 u_short p4051_pc_neighbor ;
684 u_short p4051_pc_withhold ;
687 #define SWAP_SMT_P4052 "4ll"
688 struct smt_p_4052 {
689 u_int p4052_flag ;
690 u_int p4052_eberrorcount ;
693 #define SWAP_SMT_P4053 "4lsslss"
695 struct smt_p_4053 {
696 u_int p4053_multiple ;
697 u_short p4053_availablepaths ;
698 u_short p4053_currentpath ;
699 u_int p4053_requestedpaths ;
700 u_short p4053_mytype ;
701 u_short p4053_neighbortype ;
705 #define SMT_P_SETCOUNT 0x1035
706 #define SWAP_SMT_P_SETCOUNT "l8"
708 struct smt_p_setcount {
709 struct smt_para para ; /* generic parameter header */
710 u_int count ;
711 u_char timestamp[8] ;
715 * SMT FRAMES
719 * NIF : neighbor information frames
721 struct smt_nif {
722 struct smt_header smt ; /* generic header */
723 struct smt_p_una una ; /* UNA */
724 struct smt_p_sde sde ; /* station descriptor */
725 struct smt_p_state state ; /* station state */
726 #ifdef SMT6_10
727 struct smt_p_fsc fsc ; /* frame status cap. */
728 #endif
732 * SIF : station information frames
734 struct smt_sif_config {
735 struct smt_header smt ; /* generic header */
736 struct smt_p_timestamp ts ; /* time stamp */
737 struct smt_p_sde sde ; /* station descriptor */
738 struct smt_p_version version ; /* supported versions */
739 struct smt_p_state state ; /* station state */
740 struct smt_p_policy policy ; /* station policy */
741 struct smt_p_latency latency ; /* path latency */
742 struct smt_p_neighbor neighbor ; /* neighbors, we have only one*/
743 #ifdef OPT_PMF
744 struct smt_p_setcount setcount ; /* Set Count mandatory */
745 #endif
746 /* WARNING : path MUST BE LAST FIELD !!! (see smt.c:smt_fill_path) */
747 struct smt_p_path path ; /* path descriptor */
749 #define SIZEOF_SMT_SIF_CONFIG (sizeof(struct smt_sif_config)- \
750 sizeof(struct smt_p_path))
752 struct smt_sif_operation {
753 struct smt_header smt ; /* generic header */
754 struct smt_p_timestamp ts ; /* time stamp */
755 struct smt_p_mac_status status ; /* mac status */
756 struct smt_p_mac_counter mc ; /* MAC counter */
757 struct smt_p_mac_fnc fnc ; /* MAC frame not copied */
758 struct smp_p_manufacturer man ; /* manufacturer field */
759 struct smp_p_user user ; /* user field */
760 #ifdef OPT_PMF
761 struct smt_p_setcount setcount ; /* Set Count mandatory */
762 #endif
763 /* must be last */
764 struct smt_p_lem lem[1] ; /* phy lem status */
766 #define SIZEOF_SMT_SIF_OPERATION (sizeof(struct smt_sif_operation)- \
767 sizeof(struct smt_p_lem))
770 * ECF : echo frame
772 struct smt_ecf {
773 struct smt_header smt ; /* generic header */
774 struct smt_p_echo ec_echo ; /* echo parameter */
776 #define SMT_ECF_LEN (sizeof(struct smt_header)+sizeof(struct smt_para))
779 * RDF : request denied frame
781 struct smt_rdf {
782 struct smt_header smt ; /* generic header */
783 struct smt_p_reason reason ; /* reason code */
784 struct smt_p_version version ; /* supported versions */
785 struct smt_p_refused refused ; /* refused frame fragment */
789 * SBA Request Allocation Responce Frame
791 struct smt_sba_alc_res {
792 struct smt_header smt ; /* generic header */
793 struct smt_p_0015 s_type ; /* resource type */
794 struct smt_p_0016 cmd ; /* SBA command */
795 struct smt_p_reason reason ; /* reason code */
796 struct smt_p_320b path ; /* path type */
797 struct smt_p_320f payload ; /* current SBA payload */
798 struct smt_p_3210 overhead ; /* current SBA overhead */
799 struct smt_p_0019 a_addr ; /* Allocation Address */
800 struct smt_p_001a cat ; /* Category - from the request */
801 struct smt_p_001d alloc ; /* SBA Allocatable */
805 * SBA Request Allocation Request Frame
807 struct smt_sba_alc_req {
808 struct smt_header smt ; /* generic header */
809 struct smt_p_0015 s_type ; /* resource type */
810 struct smt_p_0016 cmd ; /* SBA command */
811 struct smt_p_320b path ; /* path type */
812 struct smt_p_0017 pl_req ; /* requested payload */
813 struct smt_p_0018 ov_req ; /* requested SBA overhead */
814 struct smt_p_320f payload ; /* current SBA payload */
815 struct smt_p_3210 overhead ; /* current SBA overhead */
816 struct smt_p_0019 a_addr ; /* Allocation Address */
817 struct smt_p_001a cat ; /* Category - from the request */
818 struct smt_p_001b tneg ; /* max T-NEG */
819 struct smt_p_001c segm ; /* minimum segment size */
823 * SBA Change Allocation Request Frame
825 struct smt_sba_chg {
826 struct smt_header smt ; /* generic header */
827 struct smt_p_0015 s_type ; /* resource type */
828 struct smt_p_0016 cmd ; /* SBA command */
829 struct smt_p_320b path ; /* path type */
830 struct smt_p_320f payload ; /* current SBA payload */
831 struct smt_p_3210 overhead ; /* current SBA overhead */
832 struct smt_p_001a cat ; /* Category - from the request */
836 * SBA Report Allocation Request Frame
838 struct smt_sba_rep_req {
839 struct smt_header smt ; /* generic header */
840 struct smt_p_0015 s_type ; /* resource type */
841 struct smt_p_0016 cmd ; /* SBA command */
845 * SBA Report Allocation Response Frame
847 struct smt_sba_rep_res {
848 struct smt_header smt ; /* generic header */
849 struct smt_p_0015 s_type ; /* resource type */
850 struct smt_p_0016 cmd ; /* SBA command */
851 struct smt_p_320b path ; /* path type */
852 struct smt_p_320f payload ; /* current SBA payload */
853 struct smt_p_3210 overhead ; /* current SBA overhead */
857 * actions
859 #define SMT_STATION_ACTION 1
860 #define SMT_STATION_ACTION_CONNECT 0
861 #define SMT_STATION_ACTION_DISCONNECT 1
862 #define SMT_STATION_ACTION_PATHTEST 2
863 #define SMT_STATION_ACTION_SELFTEST 3
864 #define SMT_STATION_ACTION_DISABLE_A 4
865 #define SMT_STATION_ACTION_DISABLE_B 5
866 #define SMT_STATION_ACTION_DISABLE_M 6
868 #define SMT_PORT_ACTION 2
869 #define SMT_PORT_ACTION_MAINT 0
870 #define SMT_PORT_ACTION_ENABLE 1
871 #define SMT_PORT_ACTION_DISABLE 2
872 #define SMT_PORT_ACTION_START 3
873 #define SMT_PORT_ACTION_STOP 4
875 #endif /* _SMT_ */