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

wlan.h (4974B)


      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  */
      9 
     10 #ifndef __BCM_WLAN_H__
     11 #define __BCM_WLAN_H__
     12 
     13 #if defined(INCLUDE_L3)
     14 
     15 #include <bcm/types.h>
     16 #include <bcm/multicast.h>
     17 #include <bcm/l3.h>
     18 #include <bcm/tunnel.h>
     19 
     20 /* WLAN Port Flags. */
     21 #define BCM_WLAN_PORT_WITH_ID               0x00000001 
     22 #define BCM_WLAN_PORT_REPLACE               0x00000002 
     23 #define BCM_WLAN_PORT_DROP                  0x00000004 
     24 #define BCM_WLAN_PORT_NETWORK               0x00000008 
     25 #define BCM_WLAN_PORT_BSSID                 0x00000010 
     26 #define BCM_WLAN_PORT_BSSID_RADIO           0x00000020 
     27 #define BCM_WLAN_PORT_MATCH_TUNNEL          0x00000040 
     28 #define BCM_WLAN_PORT_EGRESS_CLIENT_MULTICAST 0x00000080 
     29 #define BCM_WLAN_PORT_EGRESS_BSSID          0x00000100 
     30 #define BCM_WLAN_PORT_EGRESS_TUNNEL_REMOTE  0x00000200 
     31 #define BCM_WLAN_PORT_ROAM_ENABLE           0x00000400 
     32 
     33 /* WLAN Port structure. */
     34 typedef struct bcm_wlan_port_s {
     35     uint32 flags;               /* Configuration flags */
     36     bcm_gport_t wlan_port_id;   /* WLAN port number */
     37     bcm_gport_t port;           /* Physical port / trunk. */
     38     int if_class;               /* Interface class ID. */
     39     bcm_mac_t bssid;            /* BSSID */
     40     int radio;                  /* Radio ID */
     41     bcm_gport_t match_tunnel;   /* Ingress Tunnel ID */
     42     bcm_gport_t egress_tunnel;  /* Egress Tunnel ID */
     43     uint16 client_multicast;    /* Client multicast bitmap */
     44     bcm_if_t encap_id;          /* Encap identifier. */
     45 } bcm_wlan_port_t;
     46 
     47 /* WLAN Client Database Flags. */
     48 #define BCM_WLAN_CLIENT_REPLACE     0x00000001 
     49 #define BCM_WLAN_CLIENT_ROAMED_IN   0x00000002 
     50 #define BCM_WLAN_CLIENT_ROAMED_OUT  0x00000004 
     51 #define BCM_WLAN_CLIENT_AUTHORIZED  0x00000008 
     52 #define BCM_WLAN_CLIENT_CAPTIVE     0x00000010 
     53 
     54 /* WLAN Client structure. */
     55 typedef struct bcm_wlan_client_s {
     56     uint32 flags;               /* Configuration flags */
     57     bcm_gport_t wlan_port_id;   /* WLAN port number */
     58     bcm_mac_t mac;              /* Client MAC Address */
     59     bcm_gport_t home_agent;     /* The home agent */
     60     bcm_gport_t wtp;            /* The access point */
     61 } bcm_wlan_client_t;
     62 
     63 /* Initialize the WLAN port structure. */
     64 extern void bcm_wlan_port_t_init(
     65     bcm_wlan_port_t *wlan_port);
     66 
     67 /* Initialize the WLAN client structure. */
     68 extern void bcm_wlan_client_t_init(
     69     bcm_wlan_client_t *wlan_client);
     70 
     71 #ifndef BCM_HIDE_DISPATCHABLE
     72 
     73 /* Initialize the BCM WLAN subsystem. */
     74 extern int bcm_wlan_init(
     75     int unit);
     76 
     77 /* Detach the WLAN software module. */
     78 extern int bcm_wlan_detach(
     79     int unit);
     80 
     81 /* Add a new WLAN port or update an existing one. */
     82 extern int bcm_wlan_port_add(
     83     int unit, 
     84     bcm_wlan_port_t *info);
     85 
     86 /* Delete a WLAN port or all WLAN ports. */
     87 extern int bcm_wlan_port_delete(
     88     int unit, 
     89     bcm_gport_t wlan_port_id);
     90 
     91 /* Delete a WLAN port or all WLAN ports. */
     92 extern int bcm_wlan_port_delete_all(
     93     int unit);
     94 
     95 /* Get a WLAN port. */
     96 extern int bcm_wlan_port_get(
     97     int unit, 
     98     bcm_gport_t wlan_port_id, 
     99     bcm_wlan_port_t *info);
    100 
    101 #endif /* BCM_HIDE_DISPATCHABLE */
    102 
    103 /* WLAN port callback function prototype. */
    104 typedef int (*bcm_wlan_port_traverse_cb)(
    105     int unit, 
    106     bcm_wlan_port_t *info, 
    107     void *user_data);
    108 
    109 #ifndef BCM_HIDE_DISPATCHABLE
    110 
    111 /* Traverse all WLAN ports. */
    112 extern int bcm_wlan_port_traverse(
    113     int unit, 
    114     bcm_wlan_port_traverse_cb cb, 
    115     void *user_data);
    116 
    117 /* Add a wireless client to the database. */
    118 extern int bcm_wlan_client_add(
    119     int unit, 
    120     bcm_wlan_client_t *info);
    121 
    122 /* Delete a client or all clients from the database. */
    123 extern int bcm_wlan_client_delete(
    124     int unit, 
    125     bcm_mac_t mac);
    126 
    127 /* Delete a client or all clients from the database. */
    128 extern int bcm_wlan_client_delete_all(
    129     int unit);
    130 
    131 /* Get information about a WLAN client. */
    132 extern int bcm_wlan_client_get(
    133     int unit, 
    134     bcm_mac_t mac, 
    135     bcm_wlan_client_t *info);
    136 
    137 #endif /* BCM_HIDE_DISPATCHABLE */
    138 
    139 /* WLAN client callback function prototype. */
    140 typedef int (*bcm_wlan_client_traverse_cb)(
    141     int unit, 
    142     bcm_wlan_client_t *info, 
    143     void *user_data);
    144 
    145 #ifndef BCM_HIDE_DISPATCHABLE
    146 
    147 /* Traverse all WLAN clients. */
    148 extern int bcm_wlan_client_traverse(
    149     int unit, 
    150     bcm_wlan_client_traverse_cb cb, 
    151     void *user_data);
    152 
    153 /* Set the tunneling initiator parameters for a WLAN tunnel. */
    154 extern int bcm_wlan_tunnel_initiator_create(
    155     int unit, 
    156     bcm_tunnel_initiator_t *info);
    157 
    158 /* Delete an outgoing WLAN tunnel. */
    159 extern int bcm_wlan_tunnel_initiator_destroy(
    160     int unit, 
    161     bcm_gport_t wlan_tunnel_id);
    162 
    163 /* Get the tunnel properties for an outgoing WLAN tunnel. */
    164 extern int bcm_wlan_tunnel_initiator_get(
    165     int unit, 
    166     bcm_tunnel_initiator_t *info);
    167 
    168 #endif /* defined(INCLUDE_L3) */
    169 
    170 #endif /* BCM_HIDE_DISPATCHABLE */
    171 
    172 #endif /* __BCM_WLAN_H__ */