root/net80211/ieee80211_proto.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


    1 /*      $OpenBSD: ieee80211_proto.h,v 1.26 2007/08/03 16:51:06 damien Exp $     */
    2 /*      $NetBSD: ieee80211_proto.h,v 1.3 2003/10/13 04:23:56 dyoung Exp $       */
    3 
    4 /*-
    5  * Copyright (c) 2001 Atsushi Onoe
    6  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
    7  * All rights reserved.
    8  *
    9  * Redistribution and use in source and binary forms, with or without
   10  * modification, are permitted provided that the following conditions
   11  * are met:
   12  * 1. Redistributions of source code must retain the above copyright
   13  *    notice, this list of conditions and the following disclaimer.
   14  * 2. Redistributions in binary form must reproduce the above copyright
   15  *    notice, this list of conditions and the following disclaimer in the
   16  *    documentation and/or other materials provided with the distribution.
   17  * 3. The name of the author may not be used to endorse or promote products
   18  *    derived from this software without specific prior written permission.
   19  *
   20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   21  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   22  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   23  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   25  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   26  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   27  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   29  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   30  *
   31  * $FreeBSD: src/sys/net80211/ieee80211_proto.h,v 1.4 2003/08/19 22:17:03 sam Exp $
   32  */
   33 #ifndef _NET80211_IEEE80211_PROTO_H_
   34 #define _NET80211_IEEE80211_PROTO_H_
   35 
   36 /*
   37  * 802.11 protocol implementation definitions.
   38  */
   39 
   40 enum ieee80211_state {
   41         IEEE80211_S_INIT        = 0,    /* default state */
   42         IEEE80211_S_SCAN        = 1,    /* scanning */
   43         IEEE80211_S_AUTH        = 2,    /* try to authenticate */
   44         IEEE80211_S_ASSOC       = 3,    /* try to assoc */
   45         IEEE80211_S_RUN         = 4     /* associated */
   46 };
   47 #define IEEE80211_S_MAX         (IEEE80211_S_RUN+1)
   48 
   49 #define IEEE80211_SEND_MGMT(_ic,_ni,_type,_arg) \
   50         ((*(_ic)->ic_send_mgmt)(_ic, _ni, _type, _arg))
   51 
   52 extern  const char * const ieee80211_mgt_subtype_name[];
   53 extern  const char * const ieee80211_state_name[IEEE80211_S_MAX];
   54 extern  const char * const ieee80211_phymode_name[];
   55 
   56 extern  void ieee80211_proto_attach(struct ifnet *);
   57 extern  void ieee80211_proto_detach(struct ifnet *);
   58 
   59 struct ieee80211_node;
   60 extern  void ieee80211_input(struct ifnet *, struct mbuf *,
   61                 struct ieee80211_node *, int, u_int32_t);
   62 extern  int ieee80211_output(struct ifnet *, struct mbuf *, struct sockaddr *,
   63                 struct rtentry *);
   64 extern  void ieee80211_recv_mgmt(struct ieee80211com *, struct mbuf *,
   65                 struct ieee80211_node *, int, int, u_int32_t);
   66 extern  int ieee80211_send_mgmt(struct ieee80211com *, struct ieee80211_node *,
   67                 int, int);
   68 extern  void ieee80211_recv_eapol(struct ieee80211com *, struct mbuf *,
   69                 struct ieee80211_node *);
   70 extern  struct mbuf *ieee80211_encap(struct ifnet *, struct mbuf *,
   71                 struct ieee80211_node **);
   72 extern  struct mbuf *ieee80211_get_rts(struct ieee80211com *,
   73                 const struct ieee80211_frame *, u_int16_t);
   74 extern  struct mbuf *ieee80211_get_cts_to_self(struct ieee80211com *,
   75                 u_int16_t);
   76 extern  struct mbuf *ieee80211_beacon_alloc(struct ieee80211com *,
   77                 struct ieee80211_node *);
   78 extern  int ieee80211_send_4way_msg1(struct ieee80211com *,
   79                 struct ieee80211_node *);
   80 extern  int ieee80211_send_4way_msg2(struct ieee80211com *,
   81                 struct ieee80211_node *, const u_int8_t *);
   82 extern  int ieee80211_send_4way_msg3(struct ieee80211com *,
   83                 struct ieee80211_node *);
   84 extern  int ieee80211_send_4way_msg4(struct ieee80211com *,
   85                 struct ieee80211_node *);
   86 extern  int ieee80211_send_group_msg1(struct ieee80211com *,
   87                 struct ieee80211_node *);
   88 extern  int ieee80211_send_group_msg2(struct ieee80211com *,
   89                 struct ieee80211_node *, const struct ieee80211_key *);
   90 extern  int ieee80211_send_eapol_key_req(struct ieee80211com *,
   91                 struct ieee80211_node *, u_int16_t, u_int64_t);
   92 extern  void ieee80211_pwrsave(struct ieee80211com *, struct ieee80211_node *,
   93                 struct mbuf *);
   94 extern  struct mbuf *ieee80211_decap(struct ifnet *, struct mbuf *, int);
   95 #define ieee80211_new_state(_ic, _nstate, _arg) \
   96         (((_ic)->ic_newstate)((_ic), (_nstate), (_arg)))
   97 extern  u_int8_t *ieee80211_add_capinfo(u_int8_t *, struct ieee80211com *,
   98                 const struct ieee80211_node *);
   99 extern  u_int8_t *ieee80211_add_ssid(u_int8_t *, const u_int8_t *, u_int);
  100 extern  u_int8_t *ieee80211_add_rates(u_int8_t *,
  101                 const struct ieee80211_rateset *);
  102 extern  u_int8_t *ieee80211_add_fh_params(u_int8_t *, struct ieee80211com *,
  103                 const struct ieee80211_node *);
  104 extern  u_int8_t *ieee80211_add_ds_params(u_int8_t *, struct ieee80211com *,
  105                 const struct ieee80211_node *);
  106 extern  u_int8_t *ieee80211_add_tim(u_int8_t *, struct ieee80211com *);
  107 extern  u_int8_t *ieee80211_add_ibss_params(u_int8_t *,
  108                 const struct ieee80211_node *);
  109 extern  u_int8_t *ieee80211_add_edca_params(u_int8_t *, struct ieee80211com *);
  110 extern  u_int8_t *ieee80211_add_erp(u_int8_t *, struct ieee80211com *);
  111 extern  u_int8_t *ieee80211_add_qos_capability(u_int8_t *,
  112                 struct ieee80211com *);
  113 extern  u_int8_t *ieee80211_add_rsn(u_int8_t *, struct ieee80211com *,
  114                 const struct ieee80211_node *);
  115 extern  u_int8_t *ieee80211_add_wpa1(u_int8_t *, struct ieee80211com *,
  116                 const struct ieee80211_node *);
  117 extern  u_int8_t *ieee80211_add_xrates(u_int8_t *,
  118                 const struct ieee80211_rateset *);
  119 extern  void ieee80211_print_essid(const u_int8_t *, int);
  120 extern  void ieee80211_dump_pkt(const u_int8_t *, int, int, int);
  121 extern  int ieee80211_ibss_merge(struct ieee80211com *,
  122                 struct ieee80211_node *, u_int64_t);
  123 extern  void ieee80211_reset_erp(struct ieee80211com *);
  124 extern  void ieee80211_set_shortslottime(struct ieee80211com *, int);
  125 extern  void ieee80211_eapol_key_mic(struct ieee80211_eapol_key *,
  126                 const u_int8_t *);
  127 extern  int ieee80211_eapol_key_check_mic(struct ieee80211_eapol_key *,
  128                 const u_int8_t *);
  129 extern  void ieee80211_eapol_key_encrypt(struct ieee80211com *,
  130                 struct ieee80211_eapol_key *, const u_int8_t *);
  131 extern  int ieee80211_eapol_key_decrypt(struct ieee80211_eapol_key *,
  132                 const u_int8_t *);
  133 
  134 #endif /* _NET80211_IEEE80211_PROTO_H_ */

/* [<][>][^][v][top][bottom][index][help] */