cbcp.h revision 1.4.28.1 1 /* $NetBSD: cbcp.h,v 1.4.28.1 2025/08/02 05:23:14 perseant Exp $ */
2
3 /*
4 * Copyright (c) 1995 Pedro Roque Marques. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
16 * distribution.
17 *
18 * 3. The names of the authors of this software must not be used to
19 * endorse or promote products derived from this software without
20 * prior written permission.
21 *
22 * 4. Redistributions of any form whatsoever must retain the following
23 * acknowledgment:
24 * "This product includes software developed by Pedro Roque Marques
25 * <pedro_m (at) yahoo.com>"
26 *
27 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
28 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
29 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
30 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
31 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
32 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
33 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 */
35 #ifndef PPP_CBCP_H
36 #define PPP_CBCP_H
37
38 #include "pppdconf.h"
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 typedef struct cbcp_state {
45 int us_unit; /* Interface unit number */
46 u_char us_id; /* Current id */
47 u_char us_allowed;
48 int us_type;
49 char *us_number; /* Telefone Number */
50 } cbcp_state;
51
52 extern cbcp_state cbcp[];
53
54 extern struct protent cbcp_protent;
55
56 #define CBCP_MINLEN 4
57
58 #define CBCP_REQ 1
59 #define CBCP_RESP 2
60 #define CBCP_ACK 3
61
62 #define CB_CONF_NO 1
63 #define CB_CONF_USER 2
64 #define CB_CONF_ADMIN 3
65 #define CB_CONF_LIST 4
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif // PPP_CBCP_H
72