RTEMS CPU Kit with SuperCore
4.11.3
|
#include <stdbool.h>
#include <stdio.h>
#include <limits.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <net/ppp_defs.h>
#include <rtems/rtemsdialer.h>
#include <stdint.h>
#include <varargs.h>
Go to the source code of this file.
Data Structures | |
struct | option_t |
struct | permitted_ip |
struct | pppd_stats |
struct | wordlist |
struct | protent |
struct | option_info |
Macros | |
#define | __V(x) (va_alist) va_dcl |
#define | const |
#define | volatile |
#define | NUM_PPP 1 /* One PPP interface supported (per process) */ |
#define | MAXWORDLEN 1024 /* max length of word in file (incl null) */ |
#define | MAXARGS 1 /* max # args to a command */ |
#define | MAXNAMELEN 256 /* max length of hostname or name for auth */ |
#define | MAXSECRETLEN 256 /* max length of password or secret */ |
#define | OPT_VALUE 0xffL /* mask for presupplied value */ |
#define | OPT_HEX 0x100L /* int option is in hex */ |
#define | OPT_NOARG 0x200L /* option doesn't take argument */ |
#define | OPT_OR 0x400L /* OR in argument to value */ |
#define | OPT_INC 0x800L /* increment value */ |
#define | OPT_PRIV 0x1000L /* privileged option */ |
#define | OPT_STATIC 0x2000L /* string option goes into static array */ |
#define | OPT_LLIMIT 0x4000L /* check value against lower limit */ |
#define | OPT_ULIMIT 0x8000L /* check value against upper limit */ |
#define | OPT_LIMITS (OPT_LLIMIT|OPT_ULIMIT) |
#define | OPT_ZEROOK 0x10000L /* 0 value is OK even if not within limits */ |
#define | OPT_NOINCR 0x20000L /* value mustn't be increased */ |
#define | OPT_ZEROINF 0x40000L /* with OPT_NOINCR, 0 == infinity */ |
#define | OPT_A2INFO 0x100000L /* addr2 -> option_info to update */ |
#define | OPT_A2COPY 0x200000L /* addr2 -> second location to rcv value */ |
#define | OPT_ENABLE 0x400000L /* use *addr2 as enable for option */ |
#define | OPT_PRIVFIX 0x800000L /* can't be overridden if noauth */ |
#define | OPT_PREPASS 0x1000000L /* do this opt in pre-pass to find device */ |
#define | OPT_INITONLY 0x2000000L /* option can only be set in init phase */ |
#define | OPT_DEVEQUIV 0x4000000L /* equiv to device name */ |
#define | OPT_DEVNAM (OPT_PREPASS | OPT_INITONLY | OPT_DEVEQUIV) |
#define | OPT_VAL(x) ((x) & OPT_VALUE) |
#define | GIDSET_TYPE gid_t |
#define | CALLBACK_DIALIN 1 /* we are expecting the call back */ |
#define | CALLBACK_DIALOUT 2 /* we are dialling out to call back */ |
#define | PHASE_DEAD 0 |
#define | PHASE_INITIALIZE 1 |
#define | PHASE_SERIALCONN 2 |
#define | PHASE_DORMANT 3 |
#define | PHASE_ESTABLISH 4 |
#define | PHASE_AUTHENTICATE 5 |
#define | PHASE_CALLBACK 6 |
#define | PHASE_NETWORK 7 |
#define | PHASE_RUNNING 8 |
#define | PHASE_TERMINATE 9 |
#define | PHASE_DISCONNECT 10 |
#define | PHASE_HOLDOFF 11 |
#define | dbglog pppd_dbglog |
#define | info pppd_info |
#define | notice pppd_notice |
#define | warn pppd_warn |
#define | error pppd_error |
#define | fatal pppd_fatal |
#define | GETCHAR(c, cp) |
#define | PUTCHAR(c, cp) |
#define | GETSHORT(s, cp) |
#define | PUTSHORT(s, cp) |
#define | GETLONG(l, cp) |
#define | PUTLONG(l, cp) |
#define | INCPTR(n, cp) ((cp) += (n)) |
#define | DECPTR(n, cp) ((cp) -= (n)) |
#define | TIMEOUT(r, f, t) ppptimeout((r), (f), (t)) |
#define | UNTIMEOUT(r, f) pppuntimeout((r), (f)) |
#define | BCOPY(s, d, l) memcpy(d, s, l) |
#define | BZERO(s, n) memset(s, 0, n) |
#define | PRINTMSG(m, l) { info("Remote message: %0.*v", l, m); } |
#define | MAKEHEADER(p, t) |
#define | EXIT_OK 0 |
#define | EXIT_FATAL_ERROR 1 |
#define | EXIT_OPTION_ERROR 2 |
#define | EXIT_NOT_ROOT 3 |
#define | EXIT_NO_KERNEL_SUPPORT 4 |
#define | EXIT_USER_REQUEST 5 |
#define | EXIT_LOCK_FAILED 6 |
#define | EXIT_OPEN_FAILED 7 |
#define | EXIT_CONNECT_FAILED 8 |
#define | EXIT_PTYCMD_FAILED 9 |
#define | EXIT_NEGOTIATION_FAILED 10 |
#define | EXIT_PEER_AUTH_FAILED 11 |
#define | EXIT_IDLE_TIMEOUT 12 |
#define | EXIT_CONNECT_TIME 13 |
#define | EXIT_CALLBACK 14 |
#define | EXIT_PEER_DEAD 15 |
#define | EXIT_HANGUP 16 |
#define | EXIT_LOOPBACK 17 |
#define | EXIT_INIT_FAILED 18 |
#define | EXIT_AUTH_TOPEER_FAILED 19 |
#define | DEBUGMAIN 1 |
#define | DEBUGUPAP 1 |
#define | DEBUGCHAP 1 |
#define | MAINDEBUG(x) if (debug) dbglog x |
#define | SYSDEBUG(x) |
#define | FSMDEBUG(x) |
#define | LCPDEBUG(x) |
#define | IPCPDEBUG(x) |
#define | IPV6CPDEBUG(x) |
#define | UPAPDEBUG(x) if (debug) dbglog x |
#define | CHAPDEBUG(x) if (debug) dbglog x |
#define | IPXCPDEBUG(x) |
#define | SIGTYPE int |
Enumerations | |
enum | opt_type { o_special_noarg = 0, o_special = 1, o_bool, o_int, o_uint32, o_string } |
Functions | |
void | die (int) |
void | quit (void) |
void | novm (char *) |
void | ppptimeout (void(*func)(void *), void *arg, int t) |
void | pppuntimeout (void(*func)(void *), void *arg) |
void | update_link_stats (int) |
void | new_phase (int) |
void | log_packet (u_char *, int, char *, int) |
void | print_string (void *, int, void(*)(void *, char *,...), void *) |
int | slprintf (char *, int, char *,...) |
int | vslprintf (char *, int, char *, va_list) |
size_t | strlcpy (char *, const char *, size_t) |
size_t | strlcat (char *, const char *, size_t) |
like strcat/strncat, doesn't overflow destination buffer, always leaves destination null-terminated (for len > 0). | |
void | pppd_dbglog (char *,...) |
void | pppd_info (char *,...) |
void | pppd_notice (char *,...) |
void | pppd_warn (char *,...) |
void | pppd_error (char *,...) |
void | pppd_fatal (char *,...) |
void | link_required (int) |
void | link_terminated (int) |
void | link_down (int) |
void | link_established (int) |
void | start_networks (void) |
void | np_up (int, int) |
void | np_down (int, int) |
void | np_finished (int, int) |
void | auth_peer_fail (int, int) |
void | auth_peer_success (int, int, char *, int) |
void | auth_withpeer_fail (int, int) |
void | auth_withpeer_success (int, int) |
int | auth_check_options (void) |
void | auth_reset (int) |
int | check_passwd (int, char *, int, char *, int, char **) |
int | get_secret (int, char *, char *, unsigned char *, int *, int) |
int | auth_ip_addr (int, uint32_t) |
int | bad_ip_adrs (uint32_t) |
void | demand_conf (void) |
void | demand_block (void) |
void | demand_unblock (void) |
void | demand_discard (void) |
void | demand_rexmit (int) |
int | loop_chars (unsigned char *, int) |
int | loop_frame (unsigned char *, int) |
void | sys_init (void) |
void | sys_cleanup (void) |
int | sys_check_options (void) |
void | sys_close (void) |
int | ppp_available (void) |
int | get_pty (int *, int *, char *, int) |
int | open_ppp_loopback (void) |
int | establish_ppp (int) |
void | restore_loop (void) |
void | disestablish_ppp (int) |
void | clean_check (void) |
void | set_up_tty (int, int) |
void | restore_tty (int) |
void | setdtr (int, int) |
void | output (int, u_char *, int) |
void | wait_input (struct timeval *) |
void | ppp_delay (void) |
int | read_packet (u_char *) |
int | get_loop_output (void) |
void | ppp_send_config (int, int, uint32_t, int, int) |
void | ppp_set_xaccm (int, ext_accm) |
void | ppp_recv_config (int, int, uint32_t, int, int) |
int | ccp_test (int, u_char *, int, int) |
void | ccp_flags_set (int, int, int) |
int | ccp_fatal_error (int) |
int | get_idle_time (int, struct ppp_idle *) |
int | get_ppp_stats (int, struct pppd_stats *) |
int | sifvjcomp (int, int, int, int) |
int | sifup (int) |
int | sifnpmode (int u, int proto, enum NPmode mode) |
int | sifdown (int) |
int | sifaddr (int, uint32_t, uint32_t, uint32_t) |
int | cifaddr (int, uint32_t, uint32_t) |
int | sifdefaultroute (int, uint32_t, uint32_t) |
int | cifdefaultroute (int, uint32_t, uint32_t) |
int | sifproxyarp (int, uint32_t) |
int | cifproxyarp (int, uint32_t) |
uint32_t | GetMask (uint32_t) |
int | lock (char *) |
int | relock (int) |
void | unlock (void) |
void | logwtmp (const char *, const char *, const char *) |
int | get_host_seed (void) |
int | have_route_to (uint32_t) |
int | parse_args (int argc, char **argv) |
int | options_from_file (char *filename, int must_exist, int check_prot, int privileged) |
int | options_from_user (void) |
int | options_for_tty (void) |
int | options_from_list (struct wordlist *, int privileged) |
int | getword (FILE *f, char *word, int *newlinep, char *filename) |
void | option_error (char *fmt,...) |
int | int_option (char *, int *) |
void | add_options (option_t *) |
Variables | |
int | pppd_kill_link |
int | hungup |
int | pppifunit |
char | ifname [] |
int | pppd_ttyfd |
char | hostname [] |
u_char | outpacket_buf [] |
int | pppd_phase |
int | baud_rate |
int | redirect_stderr |
char | peer_authname [] |
int | privileged |
int | need_holdoff |
char ** | script_env |
int | detached |
GIDSET_TYPE | groups [NGROUPS_MAX] |
int | ngroups |
struct pppd_stats | link_stats |
int | using_pty |
int | log_to_fd |
char * | no_ppp_msg |
volatile int | pppd_status |
int | devnam_fixed |
int | unsuccess |
int | do_callback |
int | doing_callback |
dialerfp | pppd_dialer |
int | debug |
int | kdebugflag |
int | default_device |
char | devnam [MAXPATHLEN] |
int | crtscts |
bool | modem |
int | inspeed |
uint32_t | netmask |
bool | lockflag |
bool | nodetach |
bool | updetach |
char * | initializer |
char * | connect_script |
char * | disconnect_script |
char * | welcomer |
char * | ptycommand |
int | maxconnect |
char | user [MAXNAMELEN] |
char | passwd [MAXSECRETLEN] |
bool | auth_required |
bool | persist |
bool | uselogin |
char | our_name [MAXNAMELEN] |
char | remote_name [MAXNAMELEN] |
bool | explicit_remote |
bool | demand |
char * | ipparam |
bool | cryptpap |
int | idle_time_limit |
int | holdoff |
bool | holdoff_specified |
bool | notty |
char * | record_file |
bool | sync_serial |
int | maxfail |
char | linkname [MAXPATHLEN] |
bool | tune_kernel |
int | connect_delay |
char * | current_option |
int | privileged_option |
char * | option_source |
struct protent * | protocols [] |
struct option_info | devnam_info |
struct option_info | initializer_info |
struct option_info | connect_script_info |
struct option_info | disconnect_script_info |
struct option_info | welcomer_info |
struct option_info | ptycommand_info |
int(* | new_phase_hook )(int) |
int(* | idle_time_hook )(struct ppp_idle *) |
int(* | holdoff_hook )(void) |
int(* | pap_check_hook )(void) |
int(* | pap_auth_hook )(char *user, char *passwd) |
void(* | pap_logout_hook )(void) |
int(* | pap_passwd_hook )(char *user, char *passwd) |
void(* | ip_up_hook )(void) |
void(* | ip_down_hook )(void) |
void(* | auth_linkup_hook )(void) |
void(* | auth_linkdown_hook )(void) |
#define GETCHAR | ( | c, | |
cp | |||
) |
#define GETLONG | ( | l, | |
cp | |||
) |
#define GETSHORT | ( | s, | |
cp | |||
) |
#define MAKEHEADER | ( | p, | |
t | |||
) |
#define PUTCHAR | ( | c, | |
cp | |||
) |
#define PUTLONG | ( | l, | |
cp | |||
) |
#define PUTSHORT | ( | s, | |
cp | |||
) |