Home | History | Annotate | Download | only in include
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2003-2012 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 /******************************************************************************
     20  *
     21  *  BD address services.
     22  *
     23  ******************************************************************************/
     24 #ifndef BD_H
     25 #define BD_H
     26 
     27 /*****************************************************************************
     28 **  Constants and data types
     29 *****************************************************************************/
     30 
     31 /* bd addr length and type */
     32 #ifndef BD_ADDR_LEN
     33 #define BD_ADDR_LEN     6
     34 typedef UINT8 BD_ADDR[BD_ADDR_LEN];
     35 #endif
     36 
     37 #ifdef __cplusplus
     38 extern "C"
     39 {
     40 #endif
     41 
     42 /* global constant for "any" bd addr */
     43 extern const BD_ADDR bd_addr_any;
     44 extern const BD_ADDR bd_addr_null;
     45 /*****************************************************************************
     46 **  Function Declarations
     47 *****************************************************************************/
     48 
     49 /*******************************************************************************
     50 **
     51 ** Function         bdcpy
     52 **
     53 ** Description      Copy bd addr b to a.
     54 **
     55 **
     56 ** Returns          void
     57 **
     58 *******************************************************************************/
     59 extern void bdcpy(BD_ADDR a, const BD_ADDR b);
     60 
     61 /*******************************************************************************
     62 **
     63 ** Function         bdcmp
     64 **
     65 ** Description      Compare bd addr b to a.
     66 **
     67 **
     68 ** Returns          Zero if b==a, nonzero otherwise (like memcmp).
     69 **
     70 *******************************************************************************/
     71 extern int bdcmp(const BD_ADDR a, const BD_ADDR b);
     72 
     73 /*******************************************************************************
     74 **
     75 ** Function         bdcmpany
     76 **
     77 ** Description      Compare bd addr to "any" bd addr.
     78 **
     79 **
     80 ** Returns          Zero if a equals bd_addr_any.
     81 **
     82 *******************************************************************************/
     83 extern int bdcmpany(const BD_ADDR a);
     84 
     85 /*******************************************************************************
     86 **
     87 ** Function         bdsetany
     88 **
     89 ** Description      Set bd addr to "any" bd addr.
     90 **
     91 **
     92 ** Returns          void
     93 **
     94 *******************************************************************************/
     95 extern void bdsetany(BD_ADDR a);
     96 
     97 #ifdef __cplusplus
     98 }
     99 #endif
    100 
    101 #endif /* BD_H */
    102 
    103