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