diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-09-30 14:46:12 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-10-08 14:59:54 +0200 |
commit | 70fa95a2e888475a51cf6cbdca26947a65e59716 (patch) | |
tree | fa5e0059198c8cad635448df00135e3f32659827 /rtemsbsd/include/rtems | |
parent | testsuite: Add DEFAULT_NETWORK_NO_INTERFACE_0 (diff) | |
download | rtems-libbsd-70fa95a2e888475a51cf6cbdca26947a65e59716.tar.bz2 |
ppp: Import from RTEMS sources
Diffstat (limited to 'rtemsbsd/include/rtems')
-rw-r--r-- | rtemsbsd/include/rtems/bsd/local/opt_ppp.h | 10 | ||||
-rw-r--r-- | rtemsbsd/include/rtems/rtemsdialer.h | 24 | ||||
-rw-r--r-- | rtemsbsd/include/rtems/rtemspppd.h | 49 |
3 files changed, 83 insertions, 0 deletions
diff --git a/rtemsbsd/include/rtems/bsd/local/opt_ppp.h b/rtemsbsd/include/rtems/bsd/local/opt_ppp.h new file mode 100644 index 00000000..37e20686 --- /dev/null +++ b/rtemsbsd/include/rtems/bsd/local/opt_ppp.h @@ -0,0 +1,10 @@ +#ifndef _PPP_H_ +#define _PPP_H_ + +#define NPPP 1 +#define NBPFILTER 0 +#undef VJC +#undef PPP_FILTER +#undef PPP_COMPRESS + +#endif diff --git a/rtemsbsd/include/rtems/rtemsdialer.h b/rtemsbsd/include/rtems/rtemsdialer.h new file mode 100644 index 00000000..611986b8 --- /dev/null +++ b/rtemsbsd/include/rtems/rtemsdialer.h @@ -0,0 +1,24 @@ + +#ifndef DIALER_H +#define DIALER_H + +/* define constant mode values */ +#define DIALER_INIT 0 +#define DIALER_CONNECT 1 +#define DIALER_WELCOME 2 +#define DIALER_DISCONNECT 3 + +/* define constant return values */ +#define DIALER_SUCCESS 0 +#define DIALER_INVALIDARG 1 +#define DIALER_UNEXPECTED 2 +#define DIALER_TIMEOUT 3 +#define DIALER_CMDFAILED 4 + +/* define typedef for dialer function prototype */ +typedef int (*dialerfp)(int tty, int mode, char *pScript); + +/* declare default chat program dialer */ +extern int chatmain(int tty, int mode, char *pScript); + +#endif diff --git a/rtemsbsd/include/rtems/rtemspppd.h b/rtemsbsd/include/rtems/rtemspppd.h new file mode 100644 index 00000000..a6c8d0b3 --- /dev/null +++ b/rtemsbsd/include/rtems/rtemspppd.h @@ -0,0 +1,49 @@ +/* + * COPYRIGHT (c) 2001, Michael Siers <mikes@poliac.com>. + * Poliac Research, Burnsville, Minnesota USA. + * COPYRIGHT (c) 2001, On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef RTEMSPPPD_H +#define RTEMSPPPD_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* define hook function identifiers */ +#define RTEMS_PPPD_LINKUP_HOOK 1 +#define RTEMS_PPPD_LINKDOWN_HOOK 2 +#define RTEMS_PPPD_IPUP_HOOK 3 +#define RTEMS_PPPD_IPDOWN_HOOK 4 +#define RTEMS_PPPD_ERROR_HOOK 5 +#define RTEMS_PPPD_EXIT_HOOK 6 + +/* define hook function pointer prototype */ +typedef void (*rtems_pppd_hookfunction)(void); +typedef int (*rtems_pppd_dialerfunction)(int tty, int mode, char *pScript); + + +/* define pppd function prototyes */ +int rtems_pppd_initialize(void); +int rtems_pppd_terminate(void); +int rtems_pppd_reset_options(void); +int rtems_pppd_set_hook(int id, rtems_pppd_hookfunction hookfp); +int rtems_pppd_set_dialer(rtems_pppd_dialerfunction dialerfp); +int rtems_pppd_set_option(const char *pOption, const char *pValue); +int rtems_pppd_connect(void); +int rtems_pppd_disconnect(void); + +struct rtems_bsdnet_ifconfig; + +int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif |