if_tr.h
001: 
002: 
003: 
004: 
005: 
006: 
007: 
008: 
009: 
010: 
011: 
012: 
013: 
014: 
015: 
016: 
017: 
018: 
019: #ifndef _NETINET_IF_TR_H
020: #define _NETINET_IF_TR_H 1
021: 
022: #include <sys/cdefs.h>
023: #include <sys/types.h>
024: 
025: 
026: 
027: #define TR_ALEN         6               
028: #define TR_HLEN         (sizeof (struct trh_hdr) + sizeof (struct trllc))
029: #define AC              0x10
030: #define LLC_FRAME       0x40
031: 
032: 
033: #define EXTENDED_SAP    0xAA
034: #define UI_CMD          0x03
035: 
036: 
037: struct trh_hdr
038: {
039:   u_int8_t  ac;                 
040:   u_int8_t  fc;                 
041:   u_int8_t  daddr[TR_ALEN];     
042:   u_int8_t  saddr[TR_ALEN];     
043:   u_int16_t rcf;                
044:   u_int16_t rseg[8];            
045: };
046: 
047: 
048: struct trllc
049: {
050:   u_int8_t  dsap;               
051:   u_int8_t  ssap;               
052:   u_int8_t  llc;                
053:   u_int8_t  protid[3];          
054:   u_int16_t ethertype;          
055: };
056: 
057: 
058: struct tr_statistics
059: {
060:   unsigned long rx_packets;     
061:   unsigned long tx_packets;     
062:   unsigned long rx_bytes;       
063:   unsigned long tx_bytes;       
064:   unsigned long rx_errors;      
065:   unsigned long tx_errors;      
066:   unsigned long rx_dropped;     
067:   unsigned long tx_dropped;     
068:   unsigned long multicast;      
069:   unsigned long transmit_collision;
070: 
071:   
072: 
073: 
074:   unsigned long line_errors;
075:   unsigned long internal_errors;
076:   unsigned long burst_errors;
077:   unsigned long A_C_errors;
078:   unsigned long abort_delimiters;
079:   unsigned long lost_frames;
080:   unsigned long recv_congest_count;
081:   unsigned long frame_copied_errors;
082:   unsigned long frequency_errors;
083:   unsigned long token_errors;
084:   unsigned long dummy1;
085: };
086: 
087: 
088: #define TR_RII                  0x80
089: #define TR_RCF_DIR_BIT          0x80
090: #define TR_RCF_LEN_MASK         0x1f00
091: #define TR_RCF_BROADCAST        0x8000  
092: #define TR_RCF_LIMITED_BROADCAST 0xC000 
093: #define TR_RCF_FRAME2K          0x20
094: #define TR_RCF_BROADCAST_MASK   0xC000
095: #define TR_MAXRIFLEN            18
096: 
097: #ifdef __USE_BSD
098: 
099: struct trn_hdr
100: {
101:   u_int8_t trn_ac;                
102:   u_int8_t trn_fc;                
103:   u_int8_t trn_dhost[TR_ALEN];    
104:   u_int8_t trn_shost[TR_ALEN];    
105:   u_int16_t trn_rcf;              
106:   u_int16_t trn_rseg[8];          
107: };
108: 
109: #endif
110: 
111: #endif  
112: 
      
      
      
      
   
      
      
         
            
            © Andrew Scott 2006 -
            2025, 
            All Rights Reserved