The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/ncsw/Peripherals/FM/Port/fm_port_dsar.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Copyright 2008-2012 Freescale Semiconductor Inc.
    3  *
    4  * Redistribution and use in source and binary forms, with or without
    5  * modification, are permitted provided that the following conditions are met:
    6  *     * Redistributions of source code must retain the above copyright
    7  *       notice, this list of conditions and the following disclaimer.
    8  *     * Redistributions in binary form must reproduce the above copyright
    9  *       notice, this list of conditions and the following disclaimer in the
   10  *       documentation and/or other materials provided with the distribution.
   11  *     * Neither the name of Freescale Semiconductor nor the
   12  *       names of its contributors may be used to endorse or promote products
   13  *       derived from this software without specific prior written permission.
   14  *
   15  *
   16  * ALTERNATIVELY, this software may be distributed under the terms of the
   17  * GNU General Public License ("GPL") as published by the Free Software
   18  * Foundation, either version 2 of that License or (at your option) any
   19  * later version.
   20  *
   21  * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
   22  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   23  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   24  * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
   25  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   26  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   27  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   28  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   31  */
   32 
   33 /**************************************************************************//**
   34  @File          fm_port_dsar.h
   35 
   36  @Description   Deep Sleep Auto Response project - common module header file.               
   37 
   38                 Author - Eyal Harari
   39                 
   40  @Cautions      See the FMan Controller spec and design document for more information.
   41 *//***************************************************************************/
   42 
   43 #ifndef __FM_PORT_DSAR_H_
   44 #define __FM_PORT_DSAR_H_
   45 
   46 #define DSAR_GETSER_MASK 0xFF0000FF
   47 
   48 #if defined(__MWERKS__) && !defined(__GNUC__)
   49 #pragma pack(push,1)
   50 #endif /* defined(__MWERKS__) && ... */ 
   51 
   52 /**************************************************************************//**
   53  @Description   Deep Sleep Auto Response VLAN-IPv4 Binding Table (for ARP/ICMPv4)
   54                 Refer to the FMan Controller spec for more details.
   55 *//***************************************************************************/
   56 typedef _Packed struct
   57 {
   58         uint32_t ipv4Addr; /*!< 32 bit IPv4 Address. */
   59         uint16_t vlanId;   /*!< 12 bits VLAN ID. The 4 left-most bits should be cleared                      */
   60                                            /*!< This field should be 0x0000 for an entry with no VLAN tag or a null VLAN ID. */
   61         uint16_t reserved;
   62 } _PackedType t_DsarArpBindingEntry;
   63 
   64 /**************************************************************************//**
   65  @Description   Deep Sleep Auto Response Address Resolution Protocol Statistics Descriptor
   66                 Refer to the FMan Controller spec for more details.
   67                     0x00 INVAL_CNT Invalid ARP IPv4-Ethernet counter
   68                     0x04 ECHO_CNT Echo counter
   69                     0x08 CD_CNT Conflict Detection counter
   70                     0x0C AR_CNT Auto-Response counter
   71                     0x10 RATM_CNT Replies Addressed To Me counter
   72                     0x14 UKOP_CNT Unknown Operation counter
   73                     0x18 NMTP_CNT Not my TPA counter
   74                     0x1C NMVLAN_CNT Not My VLAN counter
   75 *//***************************************************************************/
   76 typedef _Packed struct
   77 {
   78     uint32_t invalCnt;  /**< Invalid ARP IPv4-Ethernet counter. */
   79     uint32_t echoCnt;   /**< Echo counter.                                              */
   80     uint32_t cdCnt;             /**< Conflict Detection counter.                */
   81     uint32_t arCnt;             /**< Auto-Response counter.                             */
   82     uint32_t ratmCnt;   /**< Replies Addressed To Me counter.   */
   83     uint32_t ukopCnt;   /**< Unknown Operation counter.                 */
   84     uint32_t nmtpCnt;   /**< Not my TPA counter.                                */
   85     uint32_t nmVlanCnt; /**< Not My VLAN counter                                */
   86 } _PackedType t_DsarArpStatistics;
   87 
   88 
   89 /**************************************************************************//**
   90  @Description   Deep Sleep Auto Response Address Resolution Protocol Descriptor
   91                 0x0 0-15 Control bits [0-15]. Bit 15  = CDEN.
   92                 0x2 0-15 NumOfBindings Number of entries in the binding list.
   93                 0x4 0-15 BindingsPointer Bindings Pointer. This points to an IPv4-MAC Addresses Bindings list.
   94                 0x6 0-15
   95                 0x8 0-15 StatisticsPointer Statistics Pointer. This field points to the ARP Descriptors statistics data structure.
   96                 0xA 0-15
   97                 0xC 0-15 Reserved Reserved. Must be cleared.
   98                 0xE 015
   99 
  100 *//***************************************************************************/
  101 typedef _Packed struct
  102 {
  103     uint16_t control;                       /** Control bits [0-15]. Bit 15  = CDEN */
  104     uint16_t numOfBindings;                 /**< Number of VLAN-IPv4 */
  105     uint32_t p_Bindings;        /**< VLAN-IPv4 Bindings table pointer. */
  106     uint32_t p_Statistics;   /**< Statistics Data Structure pointer. */
  107     uint32_t reserved1;                     /**< Reserved. */
  108 } _PackedType t_DsarArpDescriptor;
  109 
  110 
  111 /**************************************************************************//**
  112  @Description   Deep Sleep Auto Response VLAN-IPv4 Binding Table (for ARP/ICMPv4)
  113                 Refer to the FMan Controller spec for more details.
  114 *//***************************************************************************/
  115 typedef _Packed struct 
  116 {
  117     uint32_t ipv4Addr; /*!< 32 bit IPv4 Address. */
  118         uint16_t vlanId;   /*!< 12 bits VLAN ID. The 4 left-most bits should be cleared                      */
  119                                            /*!< This field should be 0x0000 for an entry with no VLAN tag or a null VLAN ID. */
  120         uint16_t reserved;
  121 } _PackedType t_DsarIcmpV4BindingEntry;
  122 
  123 /**************************************************************************//**
  124  @Description   Deep Sleep Auto Response ICMPv4 Statistics Descriptor
  125                 Refer to the FMan Controller spec for more details.
  126                 0x00 INVAL_CNT Invalid ICMPv4 header counter
  127                 0x04 NMVLAN_CNT Not My VLAN counter
  128                 0x08 NMIP_CNT Not My IP counter
  129                 0x0C AR_CNT Auto-Response counter
  130                 0x10 CSERR_CNT Checksum Error counter
  131                 0x14 Reserved Reserved
  132                 0x18 Reserved Reserved
  133                 0x1C Reserved Reserved
  134 
  135 *//***************************************************************************/
  136 typedef _Packed struct
  137 {
  138     uint32_t invalCnt;  /**< Invalid ICMPv4 Echo counter. */
  139     uint32_t nmVlanCnt; /**< Not My VLAN counter          */
  140     uint32_t nmIpCnt;   /**< Not My IP counter                */
  141     uint32_t arCnt;             /**< Auto-Response counter        */
  142     uint32_t cserrCnt;  /**< Checksum Error counter       */
  143     uint32_t reserved0; /**< Reserved                     */
  144     uint32_t reserved1; /**< Reserved                     */
  145     uint32_t reserved2; /**< Reserved                     */
  146 } _PackedType t_DsarIcmpV4Statistics;
  147 
  148 
  149 
  150 /**************************************************************************//**
  151  @Description   Deep Sleep Auto Response ICMPv4 Descriptor
  152                 0x0 0-15 Control bits [0-15]
  153                 0x2 0-15 NumOfBindings Number of entries in the binding list.
  154                 0x4 0-15 BindingsPointer Bindings Pointer. This points to an VLAN-IPv4 Addresses Bindings list.
  155                 0x6 0-15
  156                 0x8 0-15 StatisticsPointer Statistics Pointer. This field points to the ICMPv4 statistics data structure.
  157                 0xA 0-15
  158                 0xC 0-15 Reserved Reserved. Must be cleared.
  159                 0xE 015
  160 
  161 *//***************************************************************************/
  162 typedef _Packed struct
  163 {
  164     uint16_t control;                       /** Control bits [0-15].                */
  165     uint16_t numOfBindings;                 /**< Number of VLAN-IPv4                */
  166     uint32_t p_Bindings;        /**< VLAN-IPv4 Bindings table pointer.  */
  167     uint32_t p_Statistics;   /**< Statistics Data Structure pointer. */
  168     uint32_t reserved1;                     /**< Reserved.                          */
  169 } _PackedType t_DsarIcmpV4Descriptor;
  170 
  171 /**************************************************************************//**
  172  @Description   Deep Sleep Auto Response VLAN-IPv4 Binding Table (for ARP/ICMPv4)
  173                 The 4 left-most bits (15:12) of the VlanId parameter are control flags.
  174                 Flags[3:1] (VlanId[15:13]): Reserved, should be cleared.
  175                 Flags[0] (VlanId[12]): Temporary address.
  176                 • 0 - Assigned IP address.
  177                 • 1- Temporary (tentative) IP address.
  178                 Refer to the FMan Controller spec for more details.
  179 *//***************************************************************************/
  180 typedef _Packed struct 
  181 {
  182     uint32_t ipv6Addr[4];  /*!< 3 * 32 bit IPv4 Address.                                                    */
  183         uint16_t resFlags:4;   /*!< reserved flags. should be cleared                                           */
  184         uint16_t vlanId:12;    /*!< 12 bits VLAN ID.                                                            */
  185                                                /*!< This field should be 0x000 for an entry with no VLAN tag or a null VLAN ID. */
  186         uint16_t reserved;
  187 } _PackedType t_DsarIcmpV6BindingEntry;
  188 
  189 /**************************************************************************//**
  190  @Description   Deep Sleep Auto Response ICMPv4 Statistics Descriptor
  191                 Refer to the FMan Controller spec for more details.
  192                 0x00 INVAL_CNT Invalid ICMPv4 header counter
  193                 0x04 NMVLAN_CNT Not My VLAN counter
  194                 0x08 NMIP_CNT Not My IP counter
  195                 0x0C AR_CNT Auto-Response counter
  196                 0x10 CSERR_CNT Checksum Error counter
  197                 0x14 MCAST_CNT Multicast counter
  198                 0x18 Reserved Reserved
  199                 0x1C Reserved Reserved
  200 
  201 *//***************************************************************************/
  202 typedef _Packed struct
  203 {
  204     uint32_t invalCnt;  /**< Invalid ICMPv4 Echo counter. */
  205     uint32_t nmVlanCnt; /**< Not My VLAN counter          */
  206     uint32_t nmIpCnt;   /**< Not My IP counter                */
  207     uint32_t arCnt;             /**< Auto-Response counter        */
  208     uint32_t reserved1; /**< Reserved                     */
  209     uint32_t reserved2; /**< Reserved                     */
  210     uint32_t reserved3; /**< Reserved                     */
  211     uint32_t reserved4; /**< Reserved                     */
  212 } _PackedType t_DsarIcmpV6Statistics;
  213 
  214 /**************************************************************************//**
  215  @Description   Deep Sleep Auto Response Neighbor Discovery Statistics Descriptor
  216                 0x00 INVAL_CNT Invalid Neighbor Discovery message counter
  217                 0x04 NMVLAN_CNT Not My VLAN counter
  218                 0x08 NMIP_CNT Not My IP counter
  219                 0x0C AR_CNT Auto-Response counter
  220                 0x10 CSERR_CNT Checksum Error counter
  221                 0x14 USADVERT_CNT Unsolicited Neighbor Advertisements counter
  222                 0x18 NMMCAST_CNT Not My Multicast group counter
  223                 0x1C NSLLA_CNT No Source Link-Layer Address counter. Indicates that there was a match on a Target
  224                      Address of a packet that its source IP address is a unicast address, but the ICMPv6
  225                      Source Link-layer Address option is omitted
  226 *//***************************************************************************/
  227 typedef _Packed struct
  228 {
  229     uint32_t invalCnt;    /**< Invalid ICMPv4 Echo counter.                */
  230     uint32_t nmVlanCnt;   /**< Not My VLAN counter                         */
  231     uint32_t nmIpCnt;     /**< Not My IP counter                                   */
  232     uint32_t arCnt;               /**< Auto-Response counter                       */
  233     uint32_t reserved1;   /**< Reserved                                    */
  234     uint32_t usadvertCnt; /**< Unsolicited Neighbor Advertisements counter */
  235     uint32_t nmmcastCnt;  /**< Not My Multicast group counter              */
  236     uint32_t nsllaCnt;    /**< No Source Link-Layer Address counter        */
  237 } _PackedType t_NdStatistics;
  238 
  239 /**************************************************************************//**
  240  @Description   Deep Sleep Auto Response ICMPv6 Descriptor
  241                 0x0 0-15 Control bits [0-15]
  242                 0x2 0-15 NumOfBindings Number of entries in the binding list.
  243                 0x4 0-15 BindingsPointer Bindings Pointer. This points to an VLAN-IPv4 Addresses Bindings list.
  244                 0x6 0-15
  245                 0x8 0-15 StatisticsPointer Statistics Pointer. This field points to the ICMPv4 statistics data structure.
  246                 0xA 0-15
  247                 0xC 0-15 Reserved Reserved. Must be cleared.
  248                 0xE 015
  249 
  250 *//***************************************************************************/
  251 typedef _Packed struct
  252 {
  253     uint16_t control;                       /** Control bits [0-15].                */
  254     uint16_t numOfBindings;                 /**< Number of VLAN-IPv6                */
  255     uint32_t p_Bindings;        /**< VLAN-IPv4 Bindings table pointer.  */
  256     uint32_t p_Statistics;   /**< Statistics Data Structure pointer. */
  257         uint32_t reserved1;                     /**< Reserved.                          */
  258 } _PackedType t_DsarIcmpV6Descriptor;
  259 
  260 
  261 /**************************************************************************//**
  262  @Description   Internet Control Message Protocol (ICMPv6) Echo message header
  263                 The fields names are taken from RFC 4443.
  264 *//***************************************************************************/
  265 /* 0                   1                   2                   3     */
  266 /* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1   */
  267 /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
  268 /* |     Type      |     Code      |          Checksum             | */
  269 /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
  270 /* |           Identifier          |        Sequence Number        | */
  271 /* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */
  272 /* |     Data ...                                                    */
  273 /* +-+-+-+-+-                                                        */
  274 typedef _Packed struct
  275 {
  276         uint8_t  type;
  277         uint8_t  code;
  278         uint16_t checksum;
  279         uint16_t identifier;
  280         uint16_t sequenceNumber;
  281 } _PackedType t_IcmpV6EchoHdr;
  282 
  283 /**************************************************************************//**
  284  @Description   Internet Control Message Protocol (ICMPv6) 
  285                 Neighbor Solicitation/Advertisement header
  286                 The fields names are taken from RFC 4861.
  287                 The R/S/O fields are valid for Neighbor Advertisement only
  288 *//***************************************************************************/
  289 /* 0                   1                   2                   3
  290  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  291  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  292  * |     Type      |     Code      |          Checksum             |
  293  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  294  * |R|S|O|                     Reserved                            |
  295  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  296  * |                                                               |
  297  * +                                                               +
  298  * |                                                               |
  299  * +                       Target Address                          +
  300  * |                                                               |
  301  * +                                                               +
  302  * |                                                               |
  303  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  304  * |   Options ...
  305  * +-+-+-+-+-+-+-+-+-+-+-+-
  306  *
  307  * Options Format:
  308  * 0                   1                   2                   3
  309  * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  310  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  311  * |     Type      |    Length     |   Link-Layer Address ...      |
  312  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  313  * |                  Link-Layer Address                           |
  314  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  315 */
  316 typedef _Packed struct
  317 {
  318         uint8_t  type;
  319         uint8_t  code;
  320         uint16_t checksum;
  321         uint32_t router:1;
  322         uint32_t solicited:1;
  323         uint32_t override:1;
  324         uint32_t reserved:29;
  325         uint32_t targetAddr[4];
  326         uint8_t  optionType;
  327         uint8_t  optionLength;
  328         uint8_t  linkLayerAddr[6];
  329 } _PackedType t_IcmpV6NdHdr;
  330 
  331 /**************************************************************************//**
  332  @Description   Deep Sleep Auto Response ICMPv6 Descriptor
  333                 0x0 0-15 Control bits [0-15]
  334                 0x2 0-15 NumOfBindings Number of entries in the binding list.
  335                 0x4 0-15 BindingsPointer Bindings Pointer. This points to an VLAN-IPv4 Addresses Bindings list.
  336                 0x6 0-15
  337                 0x8 0-15 StatisticsPointer Statistics Pointer. This field points to the ICMPv4 statistics data structure.
  338                 0xA 0-15
  339                 0xC 0-15 Reserved Reserved. Must be cleared.
  340                 0xE 015
  341 
  342 *//***************************************************************************/
  343 typedef _Packed struct
  344 {
  345     uint16_t control;                       /** Control bits [0-15].                    */
  346     uint16_t numOfBindings;                 /**< Number of VLAN-IPv6                    */
  347     uint32_t p_Bindings;        /**< VLAN-IPv4 Bindings table pointer.      */
  348     uint32_t p_Statistics;   /**< Statistics Data Structure pointer.     */
  349         uint32_t solicitedAddr;                 /**< Solicited Node Multicast Group Address */
  350 } _PackedType t_DsarNdDescriptor;
  351 
  352 /**************************************************************************//**
  353 @Description    Deep Sleep Auto Response SNMP OIDs table entry
  354                  
  355 *//***************************************************************************/
  356 typedef struct {
  357     uint16_t oidSize;     /**< Size in octets of the OID. */
  358     uint16_t resSize;     /**< Size in octets of the value that is attached to the OID. */
  359     uint32_t p_Oid;       /**< Pointer to the OID. OID is encoded in BER but type and length are excluded. */
  360     uint32_t resValOrPtr; /**< Value (for up to 4 octets) or pointer to the Value. Encoded in BER. */
  361     uint32_t reserved;
  362 } t_OidsTblEntry;
  363 
  364 /**************************************************************************//**
  365  @Description   Deep Sleep Auto Response SNMP IPv4 Addresses Table Entry
  366                 Refer to the FMan Controller spec for more details.
  367 *//***************************************************************************/
  368 typedef struct
  369 {
  370     uint32_t ipv4Addr; /*!< 32 bit IPv4 Address. */
  371     uint16_t vlanId;   /*!< 12 bits VLAN ID. The 4 left-most bits should be cleared                      */
  372                        /*!< This field should be 0x0000 for an entry with no VLAN tag or a null VLAN ID. */
  373     uint16_t reserved;
  374 } t_DsarSnmpIpv4AddrTblEntry;
  375 
  376 /**************************************************************************//**
  377  @Description   Deep Sleep Auto Response SNMP IPv6 Addresses Table Entry
  378                 Refer to the FMan Controller spec for more details.
  379 *//***************************************************************************/
  380 #pragma pack(push,1)
  381 typedef struct
  382 {
  383     uint32_t ipv6Addr[4];  /*!< 4 * 32 bit IPv6 Address.                                                     */
  384     uint16_t vlanId;       /*!< 12 bits VLAN ID. The 4 left-most bits should be cleared                      */
  385                            /*!< This field should be 0x0000 for an entry with no VLAN tag or a null VLAN ID. */
  386     uint16_t reserved;
  387 } t_DsarSnmpIpv6AddrTblEntry;
  388 #pragma pack(pop)
  389 
  390 /**************************************************************************//**
  391 @Description    Deep Sleep Auto Response SNMP statistics table
  392                  
  393 *//***************************************************************************/
  394 typedef struct {
  395     uint32_t snmpErrCnt;  /**< Counts SNMP errors (wrong version, BER encoding, format). */
  396     uint32_t snmpCommunityErrCnt; /**< Counts messages that were dropped due to insufficient permission. */
  397     uint32_t snmpTotalDiscardCnt; /**< Counts any message that was dropped. */
  398     uint32_t snmpGetReqCnt; /**< Counts the number of get-request messages */
  399     uint32_t snmpGetNextReqCnt; /**< Counts the number of get-next-request messages */
  400 } t_DsarSnmpStatistics;
  401 
  402 /**************************************************************************//**
  403  @Description   Deep Sleep Auto Response SNMP Descriptor
  404 
  405 *//***************************************************************************/
  406 typedef struct
  407 {
  408     uint16_t control;                          /**< Control bits [0-15]. */
  409     uint16_t maxSnmpMsgLength;                 /**< Maximal allowed SNMP message length. */
  410     uint16_t numOfIpv4Addresses;               /**< Number of entries in IPv4 addresses table. */
  411     uint16_t numOfIpv6Addresses;               /**< Number of entries in IPv6 addresses table. */
  412     uint32_t p_Ipv4AddrTbl; /**< Pointer to IPv4 addresses table. */
  413     uint32_t p_Ipv6AddrTbl; /**< Pointer to IPv6 addresses table. */
  414     uint32_t p_RdOnlyCommunityStr;             /**< Pointer to the Read Only Community String. */
  415     uint32_t p_RdWrCommunityStr;               /**< Pointer to the Read Write Community String. */
  416     uint32_t p_OidsTbl;                 /**< Pointer to OIDs table. */
  417     uint32_t oidsTblSize;                      /**< Number of entries in OIDs table. */
  418     uint32_t p_Statistics;                 /**< Pointer to SNMP statistics table. */
  419 } t_DsarSnmpDescriptor;
  420 
  421 /**************************************************************************//**
  422 @Description    Deep Sleep Auto Response (Common) Statistics
  423                  
  424 *//***************************************************************************/
  425 typedef _Packed struct {
  426         uint32_t dsarDiscarded;
  427         uint32_t dsarErrDiscarded;
  428         uint32_t dsarFragDiscarded;
  429         uint32_t dsarTunnelDiscarded;
  430         uint32_t dsarArpDiscarded;
  431         uint32_t dsarIpDiscarded;
  432         uint32_t dsarTcpDiscarded;
  433         uint32_t dsarUdpDiscarded;
  434         uint32_t dsarIcmpV6ChecksumErr; /* ICMPv6 Checksum Error counter */
  435         uint32_t dsarIcmpV6OtherType;   /* ICMPv6 'Other' type (not Echo or Neighbor Solicitaion/Advertisement counter */
  436         uint32_t dsarIcmpV4OtherType;   /* ICMPv4 'Other' type (not Echo) counter */
  437 } _PackedType t_ArStatistics;
  438 
  439 
  440 /**************************************************************************//**
  441 @Description    Deep Sleep Auto Response TCP/UDP port filter table entry
  442                  
  443 *//***************************************************************************/
  444 typedef _Packed struct {
  445         uint32_t        Ports;
  446         uint32_t        PortsMask;
  447 } _PackedType t_PortTblEntry;
  448 
  449 
  450                                         
  451 /**************************************************************************//**
  452 @Description    Deep Sleep Auto Response Common Parameters Descriptor
  453                  
  454 *//***************************************************************************/
  455 typedef _Packed struct {
  456         uint8_t   arTxPort;            /* 0x00 0-7 Auto Response Transmit Port number            */
  457         uint8_t   controlBits;         /* 0x00 8-15 Auto Response control bits                   */
  458         uint16_t  res1;                /* 0x00 16-31 Reserved                                    */
  459         uint32_t  activeHPNIA;         /* 0x04 0-31 Active mode Hardware Parser NIA              */
  460         uint16_t  snmpPort;            /* 0x08 0-15 SNMP Port.                                   */
  461         uint8_t   macStationAddr[6];   /* 0x08 16-31 and 0x0C 0-31 MAC Station Address           */
  462         uint8_t   res2;                            /* 0x10 0-7 Reserved                                                                  */
  463         uint8_t   filterControl;       /* 0x10 8-15 Filtering Control Bits.                      */
  464         uint16_t   tcpControlPass;         /* 0x10 16-31 TCP control pass flags                                      */
  465         uint8_t   ipProtocolTblSize;   /* 0x14 0-7 IP Protocol Table Size.                       */
  466         uint8_t   udpPortTblSize;      /* 0x14 8-15 UDP Port Table Size.                         */
  467         uint8_t   tcpPortTblSize;      /* 0x14 16-23 TCP Port Table Size.                        */
  468         uint8_t   res3;                /* 0x14 24-31 Reserved                                    */
  469         uint32_t  p_IpProtocolFiltTbl; /* 0x18 0-31 Pointer to IP Protocol Filter Table          */
  470         uint32_t p_UdpPortFiltTbl; /* 0x1C 0-31 Pointer to UDP Port Filter Table          */
  471         uint32_t p_TcpPortFiltTbl; /* 0x20 0-31 Pointer to TCP Port Filter Table          */
  472         uint32_t res4;                 /* 0x24 Reserved                                          */
  473         uint32_t p_ArpDescriptor;     /* 0x28 0-31 ARP Descriptor Pointer.                      */
  474         uint32_t p_NdDescriptor;      /* 0x2C 0-31 Neighbor Discovery Descriptor.               */
  475         uint32_t p_IcmpV4Descriptor;  /* 0x30 0-31 ICMPv4 Descriptor pointer.                   */
  476         uint32_t p_IcmpV6Descriptor;  /* 0x34 0-31 ICMPv6 Descriptor pointer.                   */
  477         uint32_t p_SnmpDescriptor;    /* 0x38 0-31 SNMP Descriptor pointer.                     */
  478         uint32_t p_ArStats;     /* 0x3C 0-31 Pointer to Auto Response Statistics          */
  479 } _PackedType t_ArCommonDesc;
  480 
  481 #if defined(__MWERKS__) && !defined(__GNUC__)
  482 #pragma pack(pop)
  483 #endif /* defined(__MWERKS__) && ... */ 
  484 
  485 /* t_ArCommonDesc.filterControl bits */
  486 #define IP_PROT_TBL_PASS_MASK   0x08
  487 #define UDP_PORT_TBL_PASS_MASK  0x04
  488 #define TCP_PORT_TBL_PASS_MASK  0x02
  489 
  490 /* Offset of TCF flags within TCP packet */
  491 #define TCP_FLAGS_OFFSET 12
  492 
  493 
  494 #endif /* __FM_PORT_DSAR_H_ */

Cache object: b61e2e7e662c3847cafc75743db8597e


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.