Deleted Added
full compact
bundle.h (36452) bundle.h (36467)
1/*-
2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Brian Somers <brian@Awfulhak.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: bundle.h,v 1.3 1998/05/23 22:24:30 brian Exp $
26 * $Id: bundle.h,v 1.4 1998/05/28 23:17:33 brian Exp $
27 */
28
29#define PHASE_DEAD 0 /* Link is dead */
30#define PHASE_ESTABLISH 1 /* Establishing link */
31#define PHASE_AUTHENTICATE 2 /* Being authenticated */
32#define PHASE_NETWORK 3 /* We're alive ! */
33#define PHASE_TERMINATE 4 /* Terminating link */
34

--- 15 unchanged lines hidden (view full) ---

50struct physical;
51struct link;
52struct server;
53struct prompt;
54
55struct bundle {
56 struct descriptor desc; /* really all our datalinks */
57 int unit; /* The device/interface unit number */
27 */
28
29#define PHASE_DEAD 0 /* Link is dead */
30#define PHASE_ESTABLISH 1 /* Establishing link */
31#define PHASE_AUTHENTICATE 2 /* Being authenticated */
32#define PHASE_NETWORK 3 /* We're alive ! */
33#define PHASE_TERMINATE 4 /* Terminating link */
34

--- 15 unchanged lines hidden (view full) ---

50struct physical;
51struct link;
52struct server;
53struct prompt;
54
55struct bundle {
56 struct descriptor desc; /* really all our datalinks */
57 int unit; /* The device/interface unit number */
58 const char **argv; /* From main() */
58
59 struct {
60 char Name[20]; /* The /dev/XXXX name */
61 int fd; /* The /dev/XXXX descriptor */
62 } dev;
63
64 struct {
65 u_long Speed; /* struct tuninfo speed */

--- 55 unchanged lines hidden (view full) ---

121 unsigned running : 1;
122 unsigned comingup : 1;
123 } autoload;
124};
125
126#define descriptor2bundle(d) \
127 ((d)->type == BUNDLE_DESCRIPTOR ? (struct bundle *)(d) : NULL)
128
59
60 struct {
61 char Name[20]; /* The /dev/XXXX name */
62 int fd; /* The /dev/XXXX descriptor */
63 } dev;
64
65 struct {
66 u_long Speed; /* struct tuninfo speed */

--- 55 unchanged lines hidden (view full) ---

122 unsigned running : 1;
123 unsigned comingup : 1;
124 } autoload;
125};
126
127#define descriptor2bundle(d) \
128 ((d)->type == BUNDLE_DESCRIPTOR ? (struct bundle *)(d) : NULL)
129
129extern struct bundle *bundle_Create(const char *, int);
130extern struct bundle *bundle_Create(const char *, int, const char **);
130extern void bundle_Destroy(struct bundle *);
131extern const char *bundle_PhaseName(struct bundle *);
132#define bundle_Phase(b) ((b)->phase)
133extern void bundle_NewPhase(struct bundle *, u_int);
134extern int bundle_LinkIsUp(const struct bundle *);
135extern int bundle_SetRoute(struct bundle *, int, struct in_addr,
136 struct in_addr, struct in_addr, int);
137extern void bundle_Close(struct bundle *, const char *, int);

--- 30 unchanged lines hidden ---
131extern void bundle_Destroy(struct bundle *);
132extern const char *bundle_PhaseName(struct bundle *);
133#define bundle_Phase(b) ((b)->phase)
134extern void bundle_NewPhase(struct bundle *, u_int);
135extern int bundle_LinkIsUp(const struct bundle *);
136extern int bundle_SetRoute(struct bundle *, int, struct in_addr,
137 struct in_addr, struct in_addr, int);
138extern void bundle_Close(struct bundle *, const char *, int);

--- 30 unchanged lines hidden ---