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_MODULE__H 9 #define _K_PPP_MODULE__H 10 11 #include <module.h> 12 13 class KPPPInterface; 14 15 16 //! This structure is exported by PPP kernel modules. 17 typedef struct ppp_module_info { 18 module_info minfo; 19 //!< Default kernel module structure. 20 21 //! You may define this \e optional function if you want to export a private API. 22 status_t (*control)(uint32 op, void *data, size_t length); 23 24 /*! \brief Signals your module to add its handlers to the PPP interface. 25 26 This function \e must be exported. 27 28 Multilink-only: Handlers that must run on a bundle's child should be 29 added to \a subInterface while \a mainInterface handlers are used for the 30 bundle interfaces. For example, devices must be added to every child 31 individually because every \a subInterface establishes its own connection 32 while the IP Control Protocol is added to the \a mainInterface because 33 it is shared by all interfaces of the bundle. 34 35 \param mainInterface The multilink bundle or (if subInterface == NULL) the 36 actual interface object. 37 \param subInterface If defined, this is a child interface of a bundle. 38 \param settings The settings for your module. 39 \param type Specifies which key caused loading the module. This would be 40 \c PPP_AUTHENTICATOR_KEY_TYPE for "authenticator". You should check 41 if \a type is correct (e.g.: loading an authenticator with "device" 42 should fail). 43 44 \return 45 \c true: Modules could be added successfully. 46 */ 47 bool (*add_to)(KPPPInterface& mainInterface, KPPPInterface *subInterface, 48 driver_parameter *settings, ppp_module_key_type type); 49 } ppp_module_info; 50 51 52 #endif 53