1 //----------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS license. 4 // 5 // Copyright (c) 2003-2004 Waldemar Kornewald, Waldemar.Kornewald@web.de 6 //----------------------------------------------------------------------- 7 8 #ifndef _K_PPP_DEFS__H 9 #define _K_PPP_DEFS__H 10 11 #include <KernelExport.h> 12 #include <PPPDefs.h> 13 14 15 extern struct core_module_info *core; 16 // needed by core quick-access function defines 17 18 19 // various constants 20 #define PPP_PULSE_RATE 500000 21 22 23 // module key types (used when loading a module) 24 enum ppp_module_key_type { 25 PPP_UNDEFINED_KEY_TYPE = -1, 26 PPP_LOAD_MODULE_KEY_TYPE = 0, 27 PPP_DEVICE_KEY_TYPE, 28 PPP_PROTOCOL_KEY_TYPE, 29 PPP_AUTHENTICATOR_KEY_TYPE, 30 PPP_MULTILINK_KEY_TYPE 31 }; 32 33 // PPP events as defined in RFC 1661 (with one exception: PPP_UP_FAILED_EVENT) 34 enum ppp_event { 35 PPP_UP_FAILED_EVENT, 36 PPP_UP_EVENT, 37 PPP_DOWN_EVENT, 38 PPP_OPEN_EVENT, 39 PPP_CLOSE_EVENT, 40 PPP_TO_GOOD_EVENT, 41 PPP_TO_BAD_EVENT, 42 PPP_RCR_GOOD_EVENT, 43 PPP_RCR_BAD_EVENT, 44 PPP_RCA_EVENT, 45 PPP_RCN_EVENT, 46 PPP_RTR_EVENT, 47 PPP_RTA_EVENT, 48 PPP_RUC_EVENT, 49 PPP_RXJ_GOOD_EVENT, 50 PPP_RXJ_BAD_EVENT, 51 PPP_RXR_EVENT 52 }; 53 54 // LCP protocol codes as defined in RFC 1661 55 // ToDo: add LCP extensions 56 enum ppp_lcp_code { 57 PPP_CONFIGURE_REQUEST = 1, 58 PPP_CONFIGURE_ACK = 2, 59 PPP_CONFIGURE_NAK = 3, 60 PPP_CONFIGURE_REJECT = 4, 61 PPP_TERMINATE_REQUEST = 5, 62 PPP_TERMINATE_ACK = 6, 63 PPP_CODE_REJECT = 7, 64 PPP_PROTOCOL_REJECT = 8, 65 PPP_ECHO_REQUEST = 9, 66 PPP_ECHO_REPLY = 10, 67 PPP_DISCARD_REQUEST = 11 68 }; 69 70 #define PPP_MIN_LCP_CODE PPP_CONFIGURE_REQUEST 71 #define PPP_MAX_LCP_CODE PPP_DISCARD_REQUEST 72 73 74 #endif 75