xref: /openbsd/usr.sbin/pppd/cbcp.h (revision 683c57d2)
1 /*	$OpenBSD: cbcp.h,v 1.2 2002/09/13 18:19:45 deraadt Exp $	*/
2 
3 /*
4  * cbcp - Call Back Configuration Protocol.
5  *
6  * Copyright (c) 1995 Pedro Roque Marques.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in
17  *    the documentation and/or other materials provided with the
18  *    distribution.
19  *
20  * 3. The name(s) of the authors of this software must not be used to
21  *    endorse or promote products derived from this software without
22  *    prior written permission.
23  *
24  * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
25  * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26  * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
27  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
28  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
29  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
30  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31  */
32 
33 #ifndef CBCP_H
34 #define CBCP_H
35 
36 typedef struct cbcp_state {
37     int    us_unit;	/* Interface unit number */
38     u_char us_id;		/* Current id */
39     u_char us_allowed;
40     int    us_type;
41     char   *us_number;    /* Telefone Number */
42 } cbcp_state;
43 
44 extern cbcp_state cbcp[];
45 
46 extern struct protent cbcp_protent;
47 
48 #define CBCP_MINLEN 4
49 
50 #define CBCP_REQ    1
51 #define CBCP_RESP   2
52 #define CBCP_ACK    3
53 
54 #define CB_CONF_NO     1
55 #define CB_CONF_USER   2
56 #define CB_CONF_ADMIN  3
57 #define CB_CONF_LIST   4
58 #endif
59