+/*
+ * This struct contains pointers to a set of procedures for
+ * doing operations on a "channel". A channel provides a way
+ * to send and receive PPP packets - the canonical example is
+ * a serial port device in PPP line discipline (or equivalently
+ * with PPP STREAMS modules pushed onto it).
+ */
+struct channel {
+ /* set of options for this channel */
+ option_t *options;
+ /* find and process a per-channel options file */
+ void (*process_extra_options)(void);
+ /* check all the options that have been given */
+ void (*check_options)(void);
+ /* get the channel ready to do PPP, return a file descriptor */
+ int (*connect)(void);
+ /* we're finished with the channel */
+ void (*disconnect)(void);
+ /* put the channel into PPP `mode' */
+ int (*establish_ppp)(int);
+ /* take the channel out of PPP `mode', restore loopback if demand */
+ void (*disestablish_ppp)(int);
+ /* set the transmit-side PPP parameters of the channel */
+ void (*send_config)(int, u_int32_t, int, int);
+ /* set the receive-side PPP parameters of the channel */
+ void (*recv_config)(int, u_int32_t, int, int);
+ /* cleanup on error or normal exit */
+ void (*cleanup)(void);
+ /* close the device, called in children after fork */
+ void (*close)(void);
+};
+
+extern struct channel *the_channel;
+
+/*
+ * This structure contains environment variables that are set or unset
+ * by the user.
+ */
+struct userenv {
+ struct userenv *ue_next;
+ char *ue_value; /* value (set only) */
+ bool ue_isset; /* 1 for set, 0 for unset */
+ bool ue_priv; /* from privileged source */
+ const char *ue_source; /* source name */
+ char ue_name[1]; /* variable name */
+};
+
+extern struct userenv *userenv_list;
+