2 * multilink.h - support routines for multilink.
4 * Copyright (c) 2000-2002 Paul Mackerras. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. The name(s) of the authors of this software must not be used to
14 * endorse or promote products derived from this software without
15 * prior written permission.
17 * 3. Redistributions of any form whatsoever must retain the following
19 * "This product includes software developed by Paul Mackerras
20 * <paulus@samba.org>".
22 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
23 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
25 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
26 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
27 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
28 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 #ifndef PPP_MULTILINK_H
32 #define PPP_MULTILINK_H
37 * values for epdisc.class
39 #define EPD_NULL 0 /* null discriminator, no data */
44 #define EPD_PHONENUM 5
48 #ifdef PPP_WITH_MULTILINK
51 * Check multilink-related options
53 void mp_check_options(void);
56 * Join our link to an appropriate bundle
58 int mp_join_bundle(void);
61 * Disconnected our link from the bundle
63 void mp_exit_bundle(void);
66 * Multipoint bundle terminated
68 void mp_bundle_terminated(void);
71 * Acting as a multilink master
76 * Was multilink negotiated
81 * Convert an endpoint discriminator to a string
83 char *epdisc_to_str(struct epdisc *);
86 * Convert a string to an endpoint discriminator
88 int str_to_epdisc(struct epdisc *, char *);
91 * Hook for plugin to hear when an interface joins a multilink bundle
93 typedef void (multilink_join_hook_fn)(void);
94 extern multilink_join_hook_fn *multilink_join_hook;
98 #define mp_check_options(x) ((void)0)
99 #define mp_join_bundle(x) ((void)0)
100 #define mp_exit_bundle(x) ((void)0)
101 #define mp_bundle_terminated(x) ((void)0)
103 static inline bool mp_on() {
107 static inline bool mp_master() {
111 #endif // PPP_WITH_MULTILINK
112 #endif // PPP_MULTILINK_H