openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

txbeacon.h (2592B)


      1 /*
      2  * 
      3  * 
      4  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      5  * 
      6  * Copyright 2007-2020 Broadcom Inc. All rights reserved.
      7  * 
      8  * DO NOT EDIT THIS FILE!
      9  * This file is auto-generated.
     10  * Edits to this file will be lost when it is regenerated.
     11  */
     12 
     13 #ifndef __BCM_TXBEACON_H__
     14 #define __BCM_TXBEACON_H__
     15 
     16 #include <bcm/types.h>
     17 #include <bcm/pkt.h>
     18 
     19 /* bcm_txbeacon_t flags definitions */
     20 #define BCM_TXBEACON_WITH_ID    (1 << 0)   /* Set if TX Beacon structure has ID */
     21 #define BCM_TXBEACON_AUTOSTART  (1 << 1)   /* Set if uCs should start beacon on
     22                                               loss of keepalive */
     23 
     24 /* Unique packet ID shared with uCs. */
     25 typedef uint32 bcm_txbeacon_pkt_id_t;
     26 
     27 /* Tx Beacon basic data structure. */
     28 typedef struct bcm_txbeacon_s {
     29     uint32 flags;                   /* Flags indicating action of API */
     30     uint16 len;                     /* length of packet in bytes. NOTE: IN/OUT */
     31     uint16 maxlen;                  /* maximum length in case of modification.
     32                                        NOTE: IN/OUT */
     33     bcm_txbeacon_pkt_id_t pkt_id;   /* Packet ID from the uC.  NOTE: IN/OUT */
     34     uint16 port;                    /* port to send packet to */
     35     uint16 interval;                /* interval to send packet in mSeconds */
     36     uint16 count;                   /* Number of packets to send or 0 (forever) */
     37     uint8 *pkt_data;                /* Pointer to packet NOTE: IN/OUT */
     38 } bcm_txbeacon_t;
     39 
     40 /* tx beacon traverse callback */
     41 typedef int (*bcm_txbeacon_traverse_cb_t)(
     42     int unit, 
     43     bcm_txbeacon_t *tx, 
     44     void *user_data);
     45 
     46 #ifndef BCM_HIDE_DISPATCHABLE
     47 
     48 /* Traverse tx beacon objects */
     49 extern int bcm_txbeacon_traverse(
     50     int unit, 
     51     bcm_txbeacon_traverse_cb_t trav_fn, 
     52     void *user_data);
     53 
     54 /* Initialize tx beacon. */
     55 extern int bcm_txbeacon_init(
     56     int unit, 
     57     int uC);
     58 
     59 /* Set up or modify a packet to beacon. */
     60 extern int bcm_txbeacon_pkt_setup(
     61     int unit, 
     62     bcm_txbeacon_t *txbeacon);
     63 
     64 /* Remove a packet from the beacon */
     65 extern int bcm_txbeacon_destroy(
     66     int unit, 
     67     bcm_txbeacon_pkt_id_t pkt_id);
     68 
     69 /* Get info on packet. */
     70 extern int bcm_txbeacon_pkt_get(
     71     int unit, 
     72     bcm_txbeacon_t *txbeacon);
     73 
     74 /* Start beacon of packet(s). */
     75 extern int bcm_txbeacon_start(
     76     int unit, 
     77     bcm_txbeacon_pkt_id_t pkt_id);
     78 
     79 /* Stop beacon of packet(s). */
     80 extern int bcm_txbeacon_stop(
     81     int unit, 
     82     bcm_txbeacon_pkt_id_t pkt_id);
     83 
     84 #endif /* BCM_HIDE_DISPATCHABLE */
     85 
     86 #endif /* __BCM_TXBEACON_H__ */