Annotation of embedaddon/libpdel/ppp/ppp_engine.h, revision 1.1.1.1
1.1 misho 1:
2: /*
3: * Copyright (c) 2001-2002 Packet Design, LLC.
4: * All rights reserved.
5: *
6: * Subject to the following obligations and disclaimer of warranty,
7: * use and redistribution of this software, in source or object code
8: * forms, with or without modifications are expressly permitted by
9: * Packet Design; provided, however, that:
10: *
11: * (i) Any and all reproductions of the source or object code
12: * must include the copyright notice above and the following
13: * disclaimer of warranties; and
14: * (ii) No rights are granted, in any manner or form, to use
15: * Packet Design trademarks, including the mark "PACKET DESIGN"
16: * on advertising, endorsements, or otherwise except as such
17: * appears in the above copyright notice or in the software.
18: *
19: * THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
20: * TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
21: * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
22: * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
23: * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
24: * OR NON-INFRINGEMENT. PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
25: * OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
26: * OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
27: * RELIABILITY OR OTHERWISE. IN NO EVENT SHALL PACKET DESIGN BE
28: * LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
29: * OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
30: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
31: * DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
32: * USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
33: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
35: * THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
36: * THE POSSIBILITY OF SUCH DAMAGE.
37: *
38: * Author: Archie Cobbs <archie@freebsd.org>
39: */
40:
41: #ifndef _PDEL_PPP_PPP_ENGINE_H_
42: #define _PDEL_PPP_PPP_ENGINE_H_
43:
44: struct ppp_engine;
45: struct ppp_manager;
46: struct ppp_bundle;
47: struct ppp_link;
48: struct ppp_node;
49: struct ppp_link_config;
50: struct ppp_bundle_config;
51: struct ppp_log;
52:
53: __BEGIN_DECLS
54:
55: /********************************************************************
56: PUBLIC FUNCTIONS
57: ********************************************************************/
58:
59: extern struct ppp_engine *ppp_engine_create(struct ppp_manager *manager,
60: const pthread_attr_t *attr, struct ppp_log *log);
61: extern void ppp_engine_destroy(struct ppp_engine **enginep, int wait);
62:
63: extern int ppp_engine_get_bundles(struct ppp_engine *engine,
64: struct ppp_bundle ***listp, const char *mtype);
65:
66: /********************************************************************
67: PRIVATE FUNCTIONS
68: ********************************************************************/
69:
70: #ifdef _PDEL_PPP_PRIVATE_H_
71:
72: extern int ppp_engine_add_link(struct ppp_engine *engine,
73: struct ppp_link *link);
74: extern void ppp_engine_del_link(struct ppp_engine *engine,
75: struct ppp_link *link);
76: extern struct ppp_bundle *ppp_engine_join(struct ppp_engine *engine,
77: struct ppp_link *link, struct ppp_node **nodep,
78: u_int16_t *link_num);
79: extern int ppp_engine_add_bundle(struct ppp_engine *engine,
80: struct ppp_bundle *bundle);
81: extern void ppp_engine_del_bundle(struct ppp_engine *engine,
82: struct ppp_bundle *bundle);
83: extern void ppp_engine_set_pptp_server(struct ppp_engine *engine, void *s);
84: extern void *ppp_engine_get_pptp_server(struct ppp_engine *engine);
85: extern void ppp_engine_set_l2tp_server(struct ppp_engine *engine, void *s);
86: extern void *ppp_engine_get_l2tp_server(struct ppp_engine *engine);
87: struct ppp_log *ppp_engine_get_log(struct ppp_engine *engine);
88: extern struct pevent_ctx *ppp_engine_get_ev_ctx(struct ppp_engine *engine);
89: extern pthread_mutex_t *ppp_engine_get_mutex(struct ppp_engine *engine);
90:
91: /* Functions that call through to the manager */
92: extern void *ppp_engine_bundle_config(struct ppp_engine *engine,
93: struct ppp_link *link, struct ppp_bundle_config *conf);
94: extern void *ppp_engine_bundle_plumb(struct ppp_engine *engine,
95: struct ppp_bundle *bundle,
96: const char *path, const char *hook,
97: struct in_addr *ips, struct in_addr *dns,
98: struct in_addr *nbns, u_int mtu);
99: extern void ppp_engine_bundle_unplumb(struct ppp_engine *engine,
100: void *arg, struct ppp_bundle *bundle);
101: extern void ppp_engine_release_ip(struct ppp_engine *engine,
102: struct ppp_bundle *bundle, struct in_addr ip);
103:
104: __END_DECLS
105:
106: #endif /* _PDEL_PPP_PRIVATE_H_ */
107:
108: #endif /* _PDEL_PPP_PPP_ENGINE_H_ */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>