Linux 2.6.17.7
[linux/fpc-iii.git] / drivers / net / skfp / h / smt.h
blob1ff589988d10f2aaa1aca9051e9db2864f6de6a5
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"
63 #if 0
65 * MAC FC values
67 #define FC_SMT_INFO 0x41 /* SMT info */
68 #define FC_SMT_NSA 0x4f /* SMT Next Station Addressing */
69 #endif
73 * type codes
75 #define SMT_ANNOUNCE 0x01 /* announcement */
76 #define SMT_REQUEST 0x02 /* request */
77 #define SMT_REPLY 0x03 /* reply */
80 * class codes
82 #define SMT_NIF 0x01 /* neighbor information frames */
83 #define SMT_SIF_CONFIG 0x02 /* station information configuration */
84 #define SMT_SIF_OPER 0x03 /* station information operation */
85 #define SMT_ECF 0x04 /* echo frames */
86 #define SMT_RAF 0x05 /* resource allocation */
87 #define SMT_RDF 0x06 /* request denied */
88 #define SMT_SRF 0x07 /* status report */
89 #define SMT_PMF_GET 0x08 /* parameter management get */
90 #define SMT_PMF_SET 0x09 /* parameter management set */
91 #define SMT_ESF 0xff /* extended service */
93 #define SMT_MAX_ECHO_LEN 4458 /* max length of SMT Echo */
94 #if defined(CONC) || defined(CONC_II)
95 #define SMT_TEST_ECHO_LEN 50 /* test length of SMT Echo */
96 #else
97 #define SMT_TEST_ECHO_LEN SMT_MAX_ECHO_LEN /* test length */
98 #endif
100 #define SMT_MAX_INFO_LEN (4352-20) /* max length for SMT info */
104 * parameter types
107 struct smt_para {
108 u_short p_type ; /* type */
109 u_short p_len ; /* length of parameter */
112 #define PARA_LEN (sizeof(struct smt_para))
114 #define SMTSETPARA(p,t) (p)->para.p_type = (t),\
115 (p)->para.p_len = sizeof(*(p)) - PARA_LEN
118 * P01 : Upstream Neighbor Address, UNA
120 #define SMT_P_UNA 0x0001 /* upstream neighbor address */
121 #define SWAP_SMT_P_UNA "s6"
123 struct smt_p_una {
124 struct smt_para para ; /* generic parameter header */
125 u_short una_pad ;
126 struct fddi_addr una_node ; /* node address, zero if unknown */
130 * P02 : Station Descriptor
132 #define SMT_P_SDE 0x0002 /* station descriptor */
133 #define SWAP_SMT_P_SDE "1111"
135 #define SMT_SDE_STATION 0 /* end node */
136 #define SMT_SDE_CONCENTRATOR 1 /* concentrator */
138 struct smt_p_sde {
139 struct smt_para para ; /* generic parameter header */
140 u_char sde_type ; /* station type */
141 u_char sde_mac_count ; /* number of MACs */
142 u_char sde_non_master ; /* number of A,B or S ports */
143 u_char sde_master ; /* number of S ports on conc. */
147 * P03 : Station State
149 #define SMT_P_STATE 0x0003 /* station state */
150 #define SWAP_SMT_P_STATE "scc"
152 struct smt_p_state {
153 struct smt_para para ; /* generic parameter header */
154 u_short st_pad ;
155 u_char st_topology ; /* topology */
156 u_char st_dupl_addr ; /* duplicate address detected */
158 #define SMT_ST_WRAPPED (1<<0) /* station wrapped */
159 #define SMT_ST_UNATTACHED (1<<1) /* unattached concentrator */
160 #define SMT_ST_TWISTED_A (1<<2) /* A-A connection, twisted ring */
161 #define SMT_ST_TWISTED_B (1<<3) /* B-B connection, twisted ring */
162 #define SMT_ST_ROOTED_S (1<<4) /* rooted station */
163 #define SMT_ST_SRF (1<<5) /* SRF protocol supported */
164 #define SMT_ST_SYNC_SERVICE (1<<6) /* use synchronous bandwidth */
166 #define SMT_ST_MY_DUPA (1<<0) /* my station detected dupl. */
167 #define SMT_ST_UNA_DUPA (1<<1) /* my UNA detected duplicate */
170 * P04 : timestamp
172 #define SMT_P_TIMESTAMP 0x0004 /* time stamp */
173 #define SWAP_SMT_P_TIMESTAMP "8"
174 struct smt_p_timestamp {
175 struct smt_para para ; /* generic parameter header */
176 u_char ts_time[8] ; /* time, resolution 80nS, unique */
180 * P05 : station policies
182 #define SMT_P_POLICY 0x0005 /* station policies */
183 #define SWAP_SMT_P_POLICY "ss"
185 struct smt_p_policy {
186 struct smt_para para ; /* generic parameter header */
187 u_short pl_config ;
188 u_short pl_connect ; /* bit string POLICY_AA ... */
190 #define SMT_PL_HOLD 1 /* hold policy supported (Dual MAC) */
193 * P06 : latency equivalent
195 #define SMT_P_LATENCY 0x0006 /* latency */
196 #define SWAP_SMT_P_LATENCY "ssss"
199 * note: latency has two phy entries by definition
200 * for a SAS, the 2nd one is null
202 struct smt_p_latency {
203 struct smt_para para ; /* generic parameter header */
204 u_short lt_phyout_idx1 ; /* index */
205 u_short lt_latency1 ; /* latency , unit : byte clock */
206 u_short lt_phyout_idx2 ; /* 0 if SAS */
207 u_short lt_latency2 ; /* 0 if SAS */
211 * P07 : MAC neighbors
213 #define SMT_P_NEIGHBORS 0x0007 /* MAC neighbor description */
214 #define SWAP_SMT_P_NEIGHBORS "ss66"
216 struct smt_p_neighbor {
217 struct smt_para para ; /* generic parameter header */
218 u_short nb_mib_index ; /* MIB index */
219 u_short nb_mac_index ; /* n+1 .. n+m, m = #MACs, n = #PHYs */
220 struct fddi_addr nb_una ; /* UNA , 0 for unknown */
221 struct fddi_addr nb_dna ; /* DNA , 0 for unknown */
225 * PHY record
227 #define SMT_PHY_A 0 /* A port */
228 #define SMT_PHY_B 1 /* B port */
229 #define SMT_PHY_S 2 /* slave port */
230 #define SMT_PHY_M 3 /* master port */
232 #define SMT_CS_DISABLED 0 /* connect state : disabled */
233 #define SMT_CS_CONNECTING 1 /* connect state : connecting */
234 #define SMT_CS_STANDBY 2 /* connect state : stand by */
235 #define SMT_CS_ACTIVE 3 /* connect state : active */
237 #define SMT_RM_NONE 0
238 #define SMT_RM_MAC 1
240 struct smt_phy_rec {
241 u_short phy_mib_index ; /* MIB index */
242 u_char phy_type ; /* A/B/S/M */
243 u_char phy_connect_state ; /* disabled/connecting/active */
244 u_char phy_remote_type ; /* A/B/S/M */
245 u_char phy_remote_mac ; /* none/remote */
246 u_short phy_resource_idx ; /* 1 .. n */
250 * MAC record
252 struct smt_mac_rec {
253 struct fddi_addr mac_addr ; /* MAC address */
254 u_short mac_resource_idx ; /* n+1 .. n+m */
258 * P08 : path descriptors
259 * should be really an array ; however our environment has a fixed number of
260 * PHYs and MACs
262 #define SMT_P_PATH 0x0008 /* path descriptor */
263 #define SWAP_SMT_P_PATH "[6s]"
265 struct smt_p_path {
266 struct smt_para para ; /* generic parameter header */
267 struct smt_phy_rec pd_phy[2] ; /* PHY A */
268 struct smt_mac_rec pd_mac ; /* MAC record */
272 * P09 : MAC status
274 #define SMT_P_MAC_STATUS 0x0009 /* MAC status */
275 #define SWAP_SMT_P_MAC_STATUS "sslllllllll"
277 struct smt_p_mac_status {
278 struct smt_para para ; /* generic parameter header */
279 u_short st_mib_index ; /* MIB index */
280 u_short st_mac_index ; /* n+1 .. n+m */
281 u_int st_t_req ; /* T_Req */
282 u_int st_t_neg ; /* T_Neg */
283 u_int st_t_max ; /* T_Max */
284 u_int st_tvx_value ; /* TVX_Value */
285 u_int st_t_min ; /* T_Min */
286 u_int st_sba ; /* synchr. bandwidth alloc */
287 u_int st_frame_ct ; /* frame counter */
288 u_int st_error_ct ; /* error counter */
289 u_int st_lost_ct ; /* lost frames counter */
293 * P0A : PHY link error rate monitoring
295 #define SMT_P_LEM 0x000a /* link error monitor */
296 #define SWAP_SMT_P_LEM "ssccccll"
298 * units of lem_cutoff,lem_alarm,lem_estimate : 10**-x
300 struct smt_p_lem {
301 struct smt_para para ; /* generic parameter header */
302 u_short lem_mib_index ; /* MIB index */
303 u_short lem_phy_index ; /* 1 .. n */
304 u_char lem_pad2 ; /* be nice and make it even . */
305 u_char lem_cutoff ; /* 0x4 .. 0xf, default 0x7 */
306 u_char lem_alarm ; /* 0x4 .. 0xf, default 0x8 */
307 u_char lem_estimate ; /* 0x0 .. 0xff */
308 u_int lem_reject_ct ; /* 0x00000000 .. 0xffffffff */
309 u_int lem_ct ; /* 0x00000000 .. 0xffffffff */
313 * P0B : MAC frame counters
315 #define SMT_P_MAC_COUNTER 0x000b /* MAC frame counters */
316 #define SWAP_SMT_P_MAC_COUNTER "ssll"
318 struct smt_p_mac_counter {
319 struct smt_para para ; /* generic parameter header */
320 u_short mc_mib_index ; /* MIB index */
321 u_short mc_index ; /* mac index */
322 u_int mc_receive_ct ; /* receive counter */
323 u_int mc_transmit_ct ; /* transmit counter */
327 * P0C : MAC frame not copied counter
329 #define SMT_P_MAC_FNC 0x000c /* MAC frame not copied counter */
330 #define SWAP_SMT_P_MAC_FNC "ssl"
332 struct smt_p_mac_fnc {
333 struct smt_para para ; /* generic parameter header */
334 u_short nc_mib_index ; /* MIB index */
335 u_short nc_index ; /* mac index */
336 u_int nc_counter ; /* not copied counter */
341 * P0D : MAC priority values
343 #define SMT_P_PRIORITY 0x000d /* MAC priority values */
344 #define SWAP_SMT_P_PRIORITY "ssl"
346 struct smt_p_priority {
347 struct smt_para para ; /* generic parameter header */
348 u_short pr_mib_index ; /* MIB index */
349 u_short pr_index ; /* mac index */
350 u_int pr_priority[7] ; /* priority values */
354 * P0E : PHY elasticity buffer status
356 #define SMT_P_EB 0x000e /* PHY EB status */
357 #define SWAP_SMT_P_EB "ssl"
359 struct smt_p_eb {
360 struct smt_para para ; /* generic parameter header */
361 u_short eb_mib_index ; /* MIB index */
362 u_short eb_index ; /* phy index */
363 u_int eb_error_ct ; /* # of eb overflows */
367 * P0F : manufacturer field
369 #define SMT_P_MANUFACTURER 0x000f /* manufacturer field */
370 #define SWAP_SMT_P_MANUFACTURER ""
372 struct smp_p_manufacturer {
373 struct smt_para para ; /* generic parameter header */
374 u_char mf_data[32] ; /* OUI + arbitrary data */
378 * P10 : user field
380 #define SMT_P_USER 0x0010 /* manufacturer field */
381 #define SWAP_SMT_P_USER ""
383 struct smp_p_user {
384 struct smt_para para ; /* generic parameter header */
385 u_char us_data[32] ; /* arbitrary data */
391 * P11 : echo data
393 #define SMT_P_ECHODATA 0x0011 /* echo data */
394 #define SWAP_SMT_P_ECHODATA ""
396 struct smt_p_echo {
397 struct smt_para para ; /* generic parameter header */
398 u_char ec_data[SMT_MAX_ECHO_LEN-4] ; /* echo data */
402 * P12 : reason code
404 #define SMT_P_REASON 0x0012 /* reason code */
405 #define SWAP_SMT_P_REASON "l"
407 struct smt_p_reason {
408 struct smt_para para ; /* generic parameter header */
409 u_int rdf_reason ; /* CLASS/VERSION */
411 #define SMT_RDF_CLASS 0x00000001 /* class not supported */
412 #define SMT_RDF_VERSION 0x00000002 /* version not supported */
413 #define SMT_RDF_SUCCESS 0x00000003 /* success (PMF) */
414 #define SMT_RDF_BADSET 0x00000004 /* bad set count (PMF) */
415 #define SMT_RDF_ILLEGAL 0x00000005 /* read only (PMF) */
416 #define SMT_RDF_NOPARAM 0x6 /* paramter not supported (PMF) */
417 #define SMT_RDF_RANGE 0x8 /* out of range */
418 #define SMT_RDF_AUTHOR 0x9 /* not autohorized */
419 #define SMT_RDF_LENGTH 0x0a /* length error */
420 #define SMT_RDF_TOOLONG 0x0b /* length error */
421 #define SMT_RDF_SBA 0x0d /* SBA denied */
424 * P13 : refused frame beginning
426 #define SMT_P_REFUSED 0x0013 /* refused frame beginning */
427 #define SWAP_SMT_P_REFUSED "l"
429 struct smt_p_refused {
430 struct smt_para para ; /* generic parameter header */
431 u_int ref_fc ; /* 3 bytes 0 + FC */
432 struct smt_header ref_header ; /* refused header */
436 * P14 : supported SMT versions
438 #define SMT_P_VERSION 0x0014 /* SMT supported versions */
439 #define SWAP_SMT_P_VERSION "sccss"
441 struct smt_p_version {
442 struct smt_para para ; /* generic parameter header */
443 u_short v_pad ;
444 u_char v_n ; /* 1 .. 0xff, #versions */
445 u_char v_index ; /* 1 .. 0xff, index of op. v. */
446 u_short v_version[1] ; /* list of min. 1 version */
447 u_short v_pad2 ; /* pad if necessary */
451 * P15 : Resource Type
453 #define SWAP_SMT_P0015 "l"
455 struct smt_p_0015 {
456 struct smt_para para ; /* generic parameter header */
457 u_int res_type ; /* recsource type */
460 #define SYNC_BW 0x00000001L /* Synchronous Bandwidth */
463 * P16 : SBA Command
465 #define SWAP_SMT_P0016 "l"
467 struct smt_p_0016 {
468 struct smt_para para ; /* generic parameter header */
469 u_int sba_cmd ; /* command for the SBA */
472 #define REQUEST_ALLOCATION 0x1 /* req allocation of sync bandwidth */
473 #define REPORT_ALLOCATION 0x2 /* rep of sync bandwidth allocation */
474 #define CHANGE_ALLOCATION 0x3 /* forces a station using sync band-*/
475 /* width to change its current allo-*/
476 /* cation */
479 * P17 : SBA Payload Request
481 #define SWAP_SMT_P0017 "l"
483 struct smt_p_0017 {
484 struct smt_para para ; /* generic parameter header */
485 int sba_pl_req ; /* total sync bandwidth measured in */
486 } ; /* bytes per 125 us */
489 * P18 : SBA Overhead Request
491 #define SWAP_SMT_P0018 "l"
493 struct smt_p_0018 {
494 struct smt_para para ; /* generic parameter header */
495 int sba_ov_req ; /* total sync bandwidth req for overhead*/
496 } ; /* measuered in bytes per T_Neg */
499 * P19 : SBA Allocation Address
501 #define SWAP_SMT_P0019 "s6"
503 struct smt_p_0019 {
504 struct smt_para para ; /* generic parameter header */
505 u_short sba_pad ;
506 struct fddi_addr alloc_addr ; /* Allocation Address */
510 * P1A : SBA Category
512 #define SWAP_SMT_P001A "l"
514 struct smt_p_001a {
515 struct smt_para para ; /* generic parameter header */
516 u_int category ; /* Allocator defined classification */
520 * P1B : Maximum T_Neg
522 #define SWAP_SMT_P001B "l"
524 struct smt_p_001b {
525 struct smt_para para ; /* generic parameter header */
526 u_int max_t_neg ; /* longest T_NEG for the sync service*/
530 * P1C : Minimum SBA Segment Size
532 #define SWAP_SMT_P001C "l"
534 struct smt_p_001c {
535 struct smt_para para ; /* generic parameter header */
536 u_int min_seg_siz ; /* smallest number of bytes per frame*/
540 * P1D : SBA Allocatable
542 #define SWAP_SMT_P001D "l"
544 struct smt_p_001d {
545 struct smt_para para ; /* generic parameter header */
546 u_int allocatable ; /* total sync bw available for alloc */
550 * P20 0B : frame status capabilities
551 * NOTE: not in swap table, is used by smt.c AND PMF table
553 #define SMT_P_FSC 0x200b
554 /* #define SWAP_SMT_P_FSC "ssss" */
556 struct smt_p_fsc {
557 struct smt_para para ; /* generic parameter header */
558 u_short fsc_pad0 ;
559 u_short fsc_mac_index ; /* mac index 1 .. ff */
560 u_short fsc_pad1 ;
561 u_short fsc_value ; /* FSC_TYPE[0-2] */
564 #define FSC_TYPE0 0 /* "normal" node (A/C handling) */
565 #define FSC_TYPE1 1 /* Special A/C indicator forwarding */
566 #define FSC_TYPE2 2 /* Special A/C indicator forwarding */
569 * P00 21 : user defined authoriziation (see pmf.c)
571 #define SMT_P_AUTHOR 0x0021
574 * notification parameters
576 #define SWAP_SMT_P1048 "ll"
577 struct smt_p_1048 {
578 u_int p1048_flag ;
579 u_int p1048_cf_state ;
583 * NOTE: all 2xxx 3xxx and 4xxx must include the INDEX in the swap string,
584 * even so the INDEX is NOT part of the struct.
585 * INDEX is already swapped in pmf.c, format in string is '4'
587 #define SWAP_SMT_P208C "4lss66"
588 struct smt_p_208c {
589 u_int p208c_flag ;
590 u_short p208c_pad ;
591 u_short p208c_dupcondition ;
592 struct fddi_addr p208c_fddilong ;
593 struct fddi_addr p208c_fddiunalong ;
596 #define SWAP_SMT_P208D "4lllll"
597 struct smt_p_208d {
598 u_int p208d_flag ;
599 u_int p208d_frame_ct ;
600 u_int p208d_error_ct ;
601 u_int p208d_lost_ct ;
602 u_int p208d_ratio ;
605 #define SWAP_SMT_P208E "4llll"
606 struct smt_p_208e {
607 u_int p208e_flag ;
608 u_int p208e_not_copied ;
609 u_int p208e_copied ;
610 u_int p208e_not_copied_ratio ;
613 #define SWAP_SMT_P208F "4ll6666s6"
615 struct smt_p_208f {
616 u_int p208f_multiple ;
617 u_int p208f_nacondition ;
618 struct fddi_addr p208f_old_una ;
619 struct fddi_addr p208f_new_una ;
620 struct fddi_addr p208f_old_dna ;
621 struct fddi_addr p208f_new_dna ;
622 u_short p208f_curren_path ;
623 struct fddi_addr p208f_smt_address ;
626 #define SWAP_SMT_P2090 "4lssl"
628 struct smt_p_2090 {
629 u_int p2090_multiple ;
630 u_short p2090_availablepaths ;
631 u_short p2090_currentpath ;
632 u_int p2090_requestedpaths ;
636 * NOTE:
637 * special kludge for parameters 320b,320f,3210
638 * these parameters are part of RAF frames
639 * RAF frames are parsed in SBA.C and must be swapped
640 * PMF.C has special code to avoid double swapping
642 #ifdef LITTLE_ENDIAN
643 #define SBAPATHINDEX (0x01000000L)
644 #else
645 #define SBAPATHINDEX (0x01L)
646 #endif
648 #define SWAP_SMT_P320B "42s"
650 struct smt_p_320b {
651 struct smt_para para ; /* generic parameter header */
652 u_int mib_index ;
653 u_short path_pad ;
654 u_short path_index ;
657 #define SWAP_SMT_P320F "4l"
659 struct smt_p_320f {
660 struct smt_para para ; /* generic parameter header */
661 u_int mib_index ;
662 u_int mib_payload ;
665 #define SWAP_SMT_P3210 "4l"
667 struct smt_p_3210 {
668 struct smt_para para ; /* generic parameter header */
669 u_int mib_index ;
670 u_int mib_overhead ;
673 #define SWAP_SMT_P4050 "4l1111ll"
675 struct smt_p_4050 {
676 u_int p4050_flag ;
677 u_char p4050_pad ;
678 u_char p4050_cutoff ;
679 u_char p4050_alarm ;
680 u_char p4050_estimate ;
681 u_int p4050_reject_ct ;
682 u_int p4050_ct ;
685 #define SWAP_SMT_P4051 "4lssss"
686 struct smt_p_4051 {
687 u_int p4051_multiple ;
688 u_short p4051_porttype ;
689 u_short p4051_connectstate ;
690 u_short p4051_pc_neighbor ;
691 u_short p4051_pc_withhold ;
694 #define SWAP_SMT_P4052 "4ll"
695 struct smt_p_4052 {
696 u_int p4052_flag ;
697 u_int p4052_eberrorcount ;
700 #define SWAP_SMT_P4053 "4lsslss"
702 struct smt_p_4053 {
703 u_int p4053_multiple ;
704 u_short p4053_availablepaths ;
705 u_short p4053_currentpath ;
706 u_int p4053_requestedpaths ;
707 u_short p4053_mytype ;
708 u_short p4053_neighbortype ;
712 #define SMT_P_SETCOUNT 0x1035
713 #define SWAP_SMT_P_SETCOUNT "l8"
715 struct smt_p_setcount {
716 struct smt_para para ; /* generic parameter header */
717 u_int count ;
718 u_char timestamp[8] ;
722 * SMT FRAMES
726 * NIF : neighbor information frames
728 struct smt_nif {
729 struct smt_header smt ; /* generic header */
730 struct smt_p_una una ; /* UNA */
731 struct smt_p_sde sde ; /* station descriptor */
732 struct smt_p_state state ; /* station state */
733 #ifdef SMT6_10
734 struct smt_p_fsc fsc ; /* frame status cap. */
735 #endif
739 * SIF : station information frames
741 struct smt_sif_config {
742 struct smt_header smt ; /* generic header */
743 struct smt_p_timestamp ts ; /* time stamp */
744 struct smt_p_sde sde ; /* station descriptor */
745 struct smt_p_version version ; /* supported versions */
746 struct smt_p_state state ; /* station state */
747 struct smt_p_policy policy ; /* station policy */
748 struct smt_p_latency latency ; /* path latency */
749 struct smt_p_neighbor neighbor ; /* neighbors, we have only one*/
750 #ifdef OPT_PMF
751 struct smt_p_setcount setcount ; /* Set Count mandatory */
752 #endif
753 /* WARNING : path MUST BE LAST FIELD !!! (see smt.c:smt_fill_path) */
754 struct smt_p_path path ; /* path descriptor */
756 #define SIZEOF_SMT_SIF_CONFIG (sizeof(struct smt_sif_config)- \
757 sizeof(struct smt_p_path))
759 struct smt_sif_operation {
760 struct smt_header smt ; /* generic header */
761 struct smt_p_timestamp ts ; /* time stamp */
762 struct smt_p_mac_status status ; /* mac status */
763 struct smt_p_mac_counter mc ; /* MAC counter */
764 struct smt_p_mac_fnc fnc ; /* MAC frame not copied */
765 struct smp_p_manufacturer man ; /* manufacturer field */
766 struct smp_p_user user ; /* user field */
767 #ifdef OPT_PMF
768 struct smt_p_setcount setcount ; /* Set Count mandatory */
769 #endif
770 /* must be last */
771 struct smt_p_lem lem[1] ; /* phy lem status */
773 #define SIZEOF_SMT_SIF_OPERATION (sizeof(struct smt_sif_operation)- \
774 sizeof(struct smt_p_lem))
777 * ECF : echo frame
779 struct smt_ecf {
780 struct smt_header smt ; /* generic header */
781 struct smt_p_echo ec_echo ; /* echo parameter */
783 #define SMT_ECF_LEN (sizeof(struct smt_header)+sizeof(struct smt_para))
786 * RDF : request denied frame
788 struct smt_rdf {
789 struct smt_header smt ; /* generic header */
790 struct smt_p_reason reason ; /* reason code */
791 struct smt_p_version version ; /* supported versions */
792 struct smt_p_refused refused ; /* refused frame fragment */
796 * SBA Request Allocation Responce Frame
798 struct smt_sba_alc_res {
799 struct smt_header smt ; /* generic header */
800 struct smt_p_0015 s_type ; /* resource type */
801 struct smt_p_0016 cmd ; /* SBA command */
802 struct smt_p_reason reason ; /* reason code */
803 struct smt_p_320b path ; /* path type */
804 struct smt_p_320f payload ; /* current SBA payload */
805 struct smt_p_3210 overhead ; /* current SBA overhead */
806 struct smt_p_0019 a_addr ; /* Allocation Address */
807 struct smt_p_001a cat ; /* Category - from the request */
808 struct smt_p_001d alloc ; /* SBA Allocatable */
812 * SBA Request Allocation Request Frame
814 struct smt_sba_alc_req {
815 struct smt_header smt ; /* generic header */
816 struct smt_p_0015 s_type ; /* resource type */
817 struct smt_p_0016 cmd ; /* SBA command */
818 struct smt_p_320b path ; /* path type */
819 struct smt_p_0017 pl_req ; /* requested payload */
820 struct smt_p_0018 ov_req ; /* requested SBA overhead */
821 struct smt_p_320f payload ; /* current SBA payload */
822 struct smt_p_3210 overhead ; /* current SBA overhead */
823 struct smt_p_0019 a_addr ; /* Allocation Address */
824 struct smt_p_001a cat ; /* Category - from the request */
825 struct smt_p_001b tneg ; /* max T-NEG */
826 struct smt_p_001c segm ; /* minimum segment size */
830 * SBA Change Allocation Request Frame
832 struct smt_sba_chg {
833 struct smt_header smt ; /* generic header */
834 struct smt_p_0015 s_type ; /* resource type */
835 struct smt_p_0016 cmd ; /* SBA command */
836 struct smt_p_320b path ; /* path type */
837 struct smt_p_320f payload ; /* current SBA payload */
838 struct smt_p_3210 overhead ; /* current SBA overhead */
839 struct smt_p_001a cat ; /* Category - from the request */
843 * SBA Report Allocation Request Frame
845 struct smt_sba_rep_req {
846 struct smt_header smt ; /* generic header */
847 struct smt_p_0015 s_type ; /* resource type */
848 struct smt_p_0016 cmd ; /* SBA command */
852 * SBA Report Allocation Response Frame
854 struct smt_sba_rep_res {
855 struct smt_header smt ; /* generic header */
856 struct smt_p_0015 s_type ; /* resource type */
857 struct smt_p_0016 cmd ; /* SBA command */
858 struct smt_p_320b path ; /* path type */
859 struct smt_p_320f payload ; /* current SBA payload */
860 struct smt_p_3210 overhead ; /* current SBA overhead */
864 * actions
866 #define SMT_STATION_ACTION 1
867 #define SMT_STATION_ACTION_CONNECT 0
868 #define SMT_STATION_ACTION_DISCONNECT 1
869 #define SMT_STATION_ACTION_PATHTEST 2
870 #define SMT_STATION_ACTION_SELFTEST 3
871 #define SMT_STATION_ACTION_DISABLE_A 4
872 #define SMT_STATION_ACTION_DISABLE_B 5
873 #define SMT_STATION_ACTION_DISABLE_M 6
875 #define SMT_PORT_ACTION 2
876 #define SMT_PORT_ACTION_MAINT 0
877 #define SMT_PORT_ACTION_ENABLE 1
878 #define SMT_PORT_ACTION_DISABLE 2
879 #define SMT_PORT_ACTION_START 3
880 #define SMT_PORT_ACTION_STOP 4
882 #endif /* _SMT_ */