hcsecd.h revision 114879
1114879Sjulian/*
2114879Sjulian * hcsecd.h
3114879Sjulian *
4114879Sjulian * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
5114879Sjulian * All rights reserved.
6114879Sjulian *
7114879Sjulian * Redistribution and use in source and binary forms, with or without
8114879Sjulian * modification, are permitted provided that the following conditions
9114879Sjulian * are met:
10114879Sjulian * 1. Redistributions of source code must retain the above copyright
11114879Sjulian *    notice, this list of conditions and the following disclaimer.
12114879Sjulian * 2. Redistributions in binary form must reproduce the above copyright
13114879Sjulian *    notice, this list of conditions and the following disclaimer in the
14114879Sjulian *    documentation and/or other materials provided with the distribution.
15114879Sjulian *
16114879Sjulian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17114879Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18114879Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19114879Sjulian * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20114879Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21114879Sjulian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22114879Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23114879Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24114879Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25114879Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26114879Sjulian * SUCH DAMAGE.
27114879Sjulian *
28114879Sjulian * $Id: hcsecd.h,v 1.1 2002/11/24 20:22:39 max Exp $
29114879Sjulian * $FreeBSD: head/usr.sbin/bluetooth/hcsecd/hcsecd.h 114879 2003-05-10 21:50:37Z julian $
30114879Sjulian */
31114879Sjulian
32114879Sjulian#ifndef _HCSECD_H_
33114879Sjulian#define _HCSECD_H_ 1
34114879Sjulian
35114879Sjulianstruct link_key
36114879Sjulian{
37114879Sjulian	bdaddr_t		 bdaddr; /* remote device BDADDR */
38114879Sjulian	char			*name;   /* remote device name */
39114879Sjulian	u_int8_t		*key;    /* link key (or NULL if no key) */
40114879Sjulian	char			*pin;    /* pin (or NULL if no pin) */
41114879Sjulian	LIST_ENTRY(link_key)	 next;   /* link to the next */
42114879Sjulian};
43114879Sjuliantypedef struct link_key		link_key_t;
44114879Sjuliantypedef struct link_key *	link_key_p;
45114879Sjulian
46114879Sjulianextern char	*config_file;
47114879Sjulian
48114879Sjulian#if __config_debug__
49114879Sjulianvoid		dump_config	(void);
50114879Sjulian#endif
51114879Sjulian
52114879Sjulianvoid		read_config_file(int s);
53114879Sjulianvoid		clean_config	(void);
54114879Sjulianlink_key_p	get_key		(bdaddr_p bdaddr, int exact_match);
55114879Sjulian
56114879Sjulian#endif /* ndef _HCSECD_H_ */
57114879Sjulian
58