Updated according to name changes in kernel classes.

IPCP and PAP (hopefully) make use of profiles.
Minor changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6284 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Waldemar Kornewald
2004-01-25 12:57:01 +00:00
parent 683165b7d1
commit 1cea3d8564
14 changed files with 93 additions and 85 deletions
@@ -8,6 +8,7 @@
#include "Protocol.h" #include "Protocol.h"
#include <KPPPConfigurePacket.h> #include <KPPPConfigurePacket.h>
#include <KPPPInterface.h> #include <KPPPInterface.h>
#include <settings_tools.h>
#include <LockerHelper.h> #include <LockerHelper.h>
@@ -21,8 +22,8 @@
// 3 seconds // 3 seconds
IPCP::IPCP(PPPInterface& interface, driver_parameter *settings) IPCP::IPCP(KPPPInterface& interface, driver_parameter *settings)
: PPPProtocol("IPCP", PPP_NCP_PHASE, IPCP_PROTOCOL, PPP_PROTOCOL_LEVEL, : KPPPProtocol("IPCP", PPP_NCP_PHASE, IPCP_PROTOCOL, PPP_PROTOCOL_LEVEL,
AF_INET, 0, interface, settings, PPP_INCLUDES_NCP), AF_INET, 0, interface, settings, PPP_INCLUDES_NCP),
fDefaultRoute(NULL), fDefaultRoute(NULL),
fRequestPrimaryDNS(false), fRequestPrimaryDNS(false),
@@ -46,12 +47,10 @@ IPCP::IPCP(PPPInterface& interface, driver_parameter *settings)
// Parse settings: // Parse settings:
// "Local" and "Peer" describe each side's settings // "Local" and "Peer" describe each side's settings
for(int32 index = 0; index < settings->parameter_count; index++) { const driver_parameter *profile
if(!strcasecmp(settings->parameters[index].name, "Local")) = Interface().Profile().SettingsFor("protocol", "ipcp");
ParseSideRequests(&settings->parameters[index], PPP_LOCAL_SIDE); ParseSideRequests(get_parameter_with_name("Local", profile), PPP_LOCAL_SIDE);
else if(!strcasecmp(settings->parameters[index].name, "Peer")) ParseSideRequests(get_parameter_with_name("Peer", profile), PPP_PEER_SIDE);
ParseSideRequests(&settings->parameters[index], PPP_PEER_SIDE);
}
} }
@@ -86,7 +85,7 @@ IPCP::StackControl(uint32 op, void *data)
default: default:
dprintf("IPCP: Unknown ioctl: %ld\n", op); dprintf("IPCP: Unknown ioctl: %ld\n", op);
return PPPProtocol::StackControl(op, data); return KPPPProtocol::StackControl(op, data);
} }
return B_OK; return B_OK;
@@ -306,8 +305,11 @@ IPCP::Pulse()
bool bool
IPCP::ParseSideRequests(driver_parameter *requests, ppp_side side) IPCP::ParseSideRequests(const driver_parameter *requests, ppp_side side)
{ {
if(!requests)
return false;
ipcp_requests *selectedRequests; ipcp_requests *selectedRequests;
if(side == PPP_LOCAL_SIDE) { if(side == PPP_LOCAL_SIDE) {
@@ -419,12 +421,14 @@ IPCP::UpdateAddresses()
dprintf("IPCP: UpdateAddress(): SIOCSIFNETMASK returned error!\n"); dprintf("IPCP: UpdateAddress(): SIOCSIFNETMASK returned error!\n");
// add default/subnet route // add default/subnet route
if(rtrequest(RTM_ADD, (struct sockaddr*) &inreq.ifra_mask, if(Side() == PPP_LOCAL_SIDE) {
(struct sockaddr*) &fGateway, (struct sockaddr*) &inreq.ifra_mask, if(rtrequest(RTM_ADD, (struct sockaddr*) &inreq.ifra_mask,
RTF_UP | RTF_GATEWAY, &fDefaultRoute) != B_OK) (struct sockaddr*) &fGateway, (struct sockaddr*) &inreq.ifra_mask,
dprintf("IPCP: UpdateAddress(): could not add default/subnet route!\n"); RTF_UP | RTF_GATEWAY, &fDefaultRoute) != B_OK)
dprintf("IPCP: UpdateAddress(): could not add default/subnet route!\n");
--fDefaultRoute->rt_refcnt; --fDefaultRoute->rt_refcnt;
}
} }
@@ -546,9 +550,9 @@ IPCP::RCREvent(struct mbuf *packet)
dprintf("IPCP: RCREvent() state=%d\n", State()); dprintf("IPCP: RCREvent() state=%d\n", State());
#endif #endif
PPPConfigurePacket request(packet); KPPPConfigurePacket request(packet);
PPPConfigurePacket nak(PPP_CONFIGURE_NAK); KPPPConfigurePacket nak(PPP_CONFIGURE_NAK);
PPPConfigurePacket reject(PPP_CONFIGURE_REJECT); KPPPConfigurePacket reject(PPP_CONFIGURE_REJECT);
// we should not use the same id as the peer // we should not use the same id as the peer
if(fID == mtod(packet, ppp_lcp_packet*)->id) if(fID == mtod(packet, ppp_lcp_packet*)->id)
@@ -753,7 +757,7 @@ IPCP::RCAEvent(struct mbuf *packet)
} }
// parse this ack // parse this ack
PPPConfigurePacket ack(packet); KPPPConfigurePacket ack(packet);
ppp_configure_item *item; ppp_configure_item *item;
in_addr_t *requestedAddress, *wishedAddress = NULL, *configuredAddress = NULL; in_addr_t *requestedAddress, *wishedAddress = NULL, *configuredAddress = NULL;
for(int32 index = 0; index < ack.CountItems(); index++) { for(int32 index = 0; index < ack.CountItems(); index++) {
@@ -863,7 +867,7 @@ IPCP::RCNEvent(struct mbuf *packet)
} }
// parse this nak/reject // parse this nak/reject
PPPConfigurePacket nak_reject(packet); KPPPConfigurePacket nak_reject(packet);
ppp_configure_item *item; ppp_configure_item *item;
in_addr_t *requestedAddress; in_addr_t *requestedAddress;
if(nak_reject.Code() == PPP_CONFIGURE_NAK) if(nak_reject.Code() == PPP_CONFIGURE_NAK)
@@ -1182,7 +1186,7 @@ IPCP::SendConfigureRequest()
fNextTimeout = system_time() + PPP_STATE_MACHINE_TIMEOUT; fNextTimeout = system_time() + PPP_STATE_MACHINE_TIMEOUT;
locker.UnlockNow(); locker.UnlockNow();
PPPConfigurePacket request(PPP_CONFIGURE_REQUEST); KPPPConfigurePacket request(PPP_CONFIGURE_REQUEST);
request.SetID(NextID()); request.SetID(NextID());
fRequestID = request.ID(); fRequestID = request.ID();
ip_item ipItem; ip_item ipItem;
@@ -1236,7 +1240,7 @@ IPCP::SendConfigureAck(struct mbuf *packet)
return false; return false;
mtod(packet, ppp_lcp_packet*)->code = PPP_CONFIGURE_ACK; mtod(packet, ppp_lcp_packet*)->code = PPP_CONFIGURE_ACK;
PPPConfigurePacket ack(packet); KPPPConfigurePacket ack(packet);
// verify items // verify items
ppp_configure_item *item; ppp_configure_item *item;
@@ -58,9 +58,9 @@ extern struct protosw *gProto[];
// defined in ipcp.cpp // defined in ipcp.cpp
class IPCP : public PPPProtocol { class IPCP : public KPPPProtocol {
public: public:
IPCP(PPPInterface& interface, driver_parameter *settings); IPCP(KPPPInterface& interface, driver_parameter *settings);
virtual ~IPCP(); virtual ~IPCP();
ppp_state State() const ppp_state State() const
@@ -78,7 +78,7 @@ class IPCP : public PPPProtocol {
virtual void Pulse(); virtual void Pulse();
private: private:
bool ParseSideRequests(driver_parameter *requests, ppp_side side); bool ParseSideRequests(const driver_parameter *requests, ppp_side side);
void UpdateAddresses(); void UpdateAddresses();
void RemoveRoutes(); void RemoveRoutes();
+1 -1
View File
@@ -38,7 +38,7 @@ isascii(char c)
static static
bool bool
add_to(PPPInterface& mainInterface, PPPInterface *subInterface, add_to(KPPPInterface& mainInterface, KPPPInterface *subInterface,
driver_parameter *settings, ppp_module_key_type type) driver_parameter *settings, ppp_module_key_type type)
{ {
if(type != PPP_PROTOCOL_KEY_TYPE) if(type != PPP_PROTOCOL_KEY_TYPE)
@@ -13,8 +13,8 @@
#define ACFC_TYPE 0x8 #define ACFC_TYPE 0x8
ACFCHandler::ACFCHandler(uint32 options, PPPInterface& interface) ACFCHandler::ACFCHandler(uint32 options, KPPPInterface& interface)
: PPPOptionHandler("ACFC Handler", ACFC_TYPE, interface, NULL), : KPPPOptionHandler("ACFC Handler", ACFC_TYPE, interface, NULL),
fOptions(options), fOptions(options),
fLocalState(ACFC_DISABLED), fLocalState(ACFC_DISABLED),
fPeerState(ACFC_DISABLED) fPeerState(ACFC_DISABLED)
@@ -23,7 +23,7 @@ ACFCHandler::ACFCHandler(uint32 options, PPPInterface& interface)
status_t status_t
ACFCHandler::AddToRequest(PPPConfigurePacket& request) ACFCHandler::AddToRequest(KPPPConfigurePacket& request)
{ {
// is ACFC not requested or was it rejected? // is ACFC not requested or was it rejected?
if(fLocalState == ACFC_REJECTED if(fLocalState == ACFC_REJECTED
@@ -39,7 +39,7 @@ ACFCHandler::AddToRequest(PPPConfigurePacket& request)
status_t status_t
ACFCHandler::ParseNak(const PPPConfigurePacket& nak) ACFCHandler::ParseNak(const KPPPConfigurePacket& nak)
{ {
// naks do not contain ACFC items // naks do not contain ACFC items
if(nak.ItemWithType(ACFC_TYPE)) if(nak.ItemWithType(ACFC_TYPE))
@@ -50,7 +50,7 @@ ACFCHandler::ParseNak(const PPPConfigurePacket& nak)
status_t status_t
ACFCHandler::ParseReject(const PPPConfigurePacket& reject) ACFCHandler::ParseReject(const KPPPConfigurePacket& reject)
{ {
if(reject.ItemWithType(ACFC_TYPE)) { if(reject.ItemWithType(ACFC_TYPE)) {
fLocalState = ACFC_REJECTED; fLocalState = ACFC_REJECTED;
@@ -64,7 +64,7 @@ ACFCHandler::ParseReject(const PPPConfigurePacket& reject)
status_t status_t
ACFCHandler::ParseAck(const PPPConfigurePacket& ack) ACFCHandler::ParseAck(const KPPPConfigurePacket& ack)
{ {
if(ack.ItemWithType(ACFC_TYPE)) if(ack.ItemWithType(ACFC_TYPE))
fLocalState = ACFC_ACCEPTED; fLocalState = ACFC_ACCEPTED;
@@ -80,8 +80,8 @@ ACFCHandler::ParseAck(const PPPConfigurePacket& ack)
status_t status_t
ACFCHandler::ParseRequest(const PPPConfigurePacket& request, ACFCHandler::ParseRequest(const KPPPConfigurePacket& request,
int32 index, PPPConfigurePacket& nak, PPPConfigurePacket& reject) int32 index, KPPPConfigurePacket& nak, KPPPConfigurePacket& reject)
{ {
if(!request.ItemWithType(ACFC_TYPE)) if(!request.ItemWithType(ACFC_TYPE))
return B_OK; return B_OK;
@@ -98,7 +98,7 @@ ACFCHandler::ParseRequest(const PPPConfigurePacket& request,
status_t status_t
ACFCHandler::SendingAck(const PPPConfigurePacket& ack) ACFCHandler::SendingAck(const KPPPConfigurePacket& ack)
{ {
ppp_configure_item *item = ack.ItemWithType(ACFC_TYPE); ppp_configure_item *item = ack.ItemWithType(ACFC_TYPE);
@@ -29,9 +29,9 @@ enum acfc_state {
}; };
class ACFCHandler : public PPPOptionHandler { class ACFCHandler : public KPPPOptionHandler {
public: public:
ACFCHandler(uint32 options, PPPInterface& interface); ACFCHandler(uint32 options, KPPPInterface& interface);
uint32 Options() const uint32 Options() const
{ return fOptions; } { return fOptions; }
@@ -40,14 +40,14 @@ class ACFCHandler : public PPPOptionHandler {
acfc_state PeerState() const acfc_state PeerState() const
{ return fPeerState; } { return fPeerState; }
virtual status_t AddToRequest(PPPConfigurePacket& request); virtual status_t AddToRequest(KPPPConfigurePacket& request);
virtual status_t ParseNak(const PPPConfigurePacket& nak); virtual status_t ParseNak(const KPPPConfigurePacket& nak);
virtual status_t ParseReject(const PPPConfigurePacket& reject); virtual status_t ParseReject(const KPPPConfigurePacket& reject);
virtual status_t ParseAck(const PPPConfigurePacket& ack); virtual status_t ParseAck(const KPPPConfigurePacket& ack);
virtual status_t ParseRequest(const PPPConfigurePacket& request, virtual status_t ParseRequest(const KPPPConfigurePacket& request,
int32 index, PPPConfigurePacket& nak, PPPConfigurePacket& reject); int32 index, KPPPConfigurePacket& nak, KPPPConfigurePacket& reject);
virtual status_t SendingAck(const PPPConfigurePacket& ack); virtual status_t SendingAck(const KPPPConfigurePacket& ack);
virtual void Reset(); virtual void Reset();
@@ -179,8 +179,8 @@ worker_thread(void *data)
} }
ModemDevice::ModemDevice(PPPInterface& interface, driver_parameter *settings) ModemDevice::ModemDevice(KPPPInterface& interface, driver_parameter *settings)
: PPPDevice("PPPoE", 0, interface, settings), : KPPPDevice("Modem", 0, interface, settings),
fInterfaceName(NULL), fInterfaceName(NULL),
fHandle(-1), fHandle(-1),
fWorkerThread(-1), fWorkerThread(-1),
@@ -229,7 +229,7 @@ ModemDevice::InitCheck() const
if(fState != INITIAL && Handle() == -1) if(fState != INITIAL && Handle() == -1)
return B_ERROR; return B_ERROR;
return InterfaceName() && PPPDevice::InitCheck() == B_OK ? B_OK : B_ERROR; return InterfaceName() && KPPPDevice::InitCheck() == B_OK ? B_OK : B_ERROR;
} }
@@ -486,7 +486,7 @@ ModemDevice::Send(struct mbuf *packet, uint16 protocolNumber = 0)
status_t status_t
ModemDevice::DataReceived(uint8 *buffer, uint32 length) ModemDevice::DataReceived(uint8 *buffer, uint32 length)
{ {
// TODO: report corrupted packets to PPPInterface // TODO: report corrupted packets to KPPPInterface
if(length < 3) if(length < 3)
return B_ERROR; return B_ERROR;
@@ -25,9 +25,9 @@ enum modem_state {
class ACFCHandler; class ACFCHandler;
class ModemDevice : public PPPDevice { class ModemDevice : public KPPPDevice {
public: public:
ModemDevice(PPPInterface& interface, driver_parameter *settings); ModemDevice(KPPPInterface& interface, driver_parameter *settings);
virtual ~ModemDevice(); virtual ~ModemDevice();
const char *InterfaceName() const const char *InterfaceName() const
@@ -25,7 +25,7 @@ status_t std_ops(int32 op, ...);
static static
bool bool
add_to(PPPInterface& mainInterface, PPPInterface *subInterface, add_to(KPPPInterface& mainInterface, KPPPInterface *subInterface,
driver_parameter *settings, ppp_module_key_type type) driver_parameter *settings, ppp_module_key_type type)
{ {
if(mainInterface.Mode() != PPP_CLIENT_MODE || type != PPP_DEVICE_KEY_TYPE) if(mainInterface.Mode() != PPP_CLIENT_MODE || type != PPP_DEVICE_KEY_TYPE)
+17 -14
View File
@@ -32,15 +32,15 @@ typedef struct authentication_item {
} authentication_item; } authentication_item;
PAPHandler::PAPHandler(PAP& owner, PPPInterface& interface) PAPHandler::PAPHandler(PAP& owner, KPPPInterface& interface)
: PPPOptionHandler("PAP", AUTHENTICATION_TYPE, interface, NULL), : KPPPOptionHandler("PAP", AUTHENTICATION_TYPE, interface, NULL),
fOwner(owner) fOwner(owner)
{ {
} }
status_t status_t
PAPHandler::AddToRequest(PPPConfigurePacket& request) PAPHandler::AddToRequest(KPPPConfigurePacket& request)
{ {
// only local authenticators send requests to peer // only local authenticators send requests to peer
if(Owner().Side() != PPP_PEER_SIDE) if(Owner().Side() != PPP_PEER_SIDE)
@@ -58,29 +58,29 @@ PAPHandler::AddToRequest(PPPConfigurePacket& request)
status_t status_t
PAPHandler::ParseNak(const PPPConfigurePacket& nak) PAPHandler::ParseNak(const KPPPConfigurePacket& nak)
{ {
return B_OK; return B_OK;
} }
status_t status_t
PAPHandler::ParseReject(const PPPConfigurePacket& reject) PAPHandler::ParseReject(const KPPPConfigurePacket& reject)
{ {
return B_OK; return B_OK;
} }
status_t status_t
PAPHandler::ParseAck(const PPPConfigurePacket& ack) PAPHandler::ParseAck(const KPPPConfigurePacket& ack)
{ {
return B_OK; return B_OK;
} }
status_t status_t
PAPHandler::ParseRequest(const PPPConfigurePacket& request, PAPHandler::ParseRequest(const KPPPConfigurePacket& request,
int32 index, PPPConfigurePacket& nak, PPPConfigurePacket& reject) int32 index, KPPPConfigurePacket& nak, KPPPConfigurePacket& reject)
{ {
// only local authenticators handle requests from peer // only local authenticators handle requests from peer
if(Owner().Side() != PPP_LOCAL_SIDE) if(Owner().Side() != PPP_LOCAL_SIDE)
@@ -97,7 +97,7 @@ PAPHandler::ParseRequest(const PPPConfigurePacket& request,
status_t status_t
PAPHandler::SendingAck(const PPPConfigurePacket& ack) PAPHandler::SendingAck(const KPPPConfigurePacket& ack)
{ {
return B_OK; return B_OK;
} }
@@ -110,8 +110,8 @@ PAPHandler::Reset()
// PAP // PAP
PAP::PAP(PPPInterface& interface, driver_parameter *settings) PAP::PAP(KPPPInterface& interface, driver_parameter *settings)
: PPPProtocol("PAP", PPP_AUTHENTICATION_PHASE, PAP_PROTOCOL, PPP_PROTOCOL_LEVEL, : KPPPProtocol("PAP", PPP_AUTHENTICATION_PHASE, PAP_PROTOCOL, PPP_PROTOCOL_LEVEL,
AF_INET, 0, interface, settings, PPP_ALWAYS_ALLOWED, AF_INET, 0, interface, settings, PPP_ALWAYS_ALLOWED,
AUTHENTICATOR_TYPE_STRING, new PAPHandler(*this, interface)), AUTHENTICATOR_TYPE_STRING, new PAPHandler(*this, interface)),
fState(INITIAL), fState(INITIAL),
@@ -122,7 +122,7 @@ PAP::PAP(PPPInterface& interface, driver_parameter *settings)
{ {
fUser[0] = fPassword[0] = 0; fUser[0] = fPassword[0] = 0;
ParseSettings(settings); ParseSettings(Interface().Profile().SettingsFor("authenticator", "pap"));
} }
@@ -137,7 +137,7 @@ PAP::InitCheck() const
if(Side() != PPP_LOCAL_SIDE && Side() != PPP_PEER_SIDE) if(Side() != PPP_LOCAL_SIDE && Side() != PPP_PEER_SIDE)
return B_ERROR; return B_ERROR;
return PPPProtocol::InitCheck(); return KPPPProtocol::InitCheck();
} }
@@ -298,11 +298,14 @@ PAP::Pulse()
bool bool
PAP::ParseSettings(driver_parameter *requests) PAP::ParseSettings(const driver_parameter *requests)
{ {
memset(fUser, 0, sizeof(fUser)); memset(fUser, 0, sizeof(fUser));
memset(fPassword, 0, sizeof(fPassword)); memset(fPassword, 0, sizeof(fPassword));
if(!requests)
return false;
// The following values are allowed: // The following values are allowed:
// "User" // "User"
// "Password" // "Password"
+13 -12
View File
@@ -29,21 +29,22 @@ enum pap_state {
class PAP; class PAP;
class PAPHandler : public PPPOptionHandler {
class PAPHandler : public KPPPOptionHandler {
public: public:
PAPHandler(PAP& owner, PPPInterface& interface); PAPHandler(PAP& owner, KPPPInterface& interface);
PAP& Owner() const PAP& Owner() const
{ return fOwner; } { return fOwner; }
virtual status_t AddToRequest(PPPConfigurePacket& request); virtual status_t AddToRequest(KPPPConfigurePacket& request);
virtual status_t ParseNak(const PPPConfigurePacket& nak); virtual status_t ParseNak(const KPPPConfigurePacket& nak);
virtual status_t ParseReject(const PPPConfigurePacket& reject); virtual status_t ParseReject(const KPPPConfigurePacket& reject);
virtual status_t ParseAck(const PPPConfigurePacket& ack); virtual status_t ParseAck(const KPPPConfigurePacket& ack);
virtual status_t ParseRequest(const PPPConfigurePacket& request, virtual status_t ParseRequest(const KPPPConfigurePacket& request,
int32 index, PPPConfigurePacket& nak, PPPConfigurePacket& reject); int32 index, KPPPConfigurePacket& nak, KPPPConfigurePacket& reject);
virtual status_t SendingAck(const PPPConfigurePacket& ack); virtual status_t SendingAck(const KPPPConfigurePacket& ack);
virtual void Reset(); virtual void Reset();
@@ -52,9 +53,9 @@ class PAPHandler : public PPPOptionHandler {
}; };
class PAP : public PPPProtocol { class PAP : public KPPPProtocol {
public: public:
PAP(PPPInterface& interface, driver_parameter *settings); PAP(KPPPInterface& interface, driver_parameter *settings);
virtual ~PAP(); virtual ~PAP();
virtual status_t InitCheck() const; virtual status_t InitCheck() const;
@@ -70,7 +71,7 @@ class PAP : public PPPProtocol {
virtual void Pulse(); virtual void Pulse();
private: private:
bool ParseSettings(driver_parameter *settings); bool ParseSettings(const driver_parameter *settings);
// for state machine // for state machine
void NewState(pap_state next); void NewState(pap_state next);
+1 -1
View File
@@ -25,7 +25,7 @@ status_t std_ops(int32 op, ...);
static static
bool bool
add_to(PPPInterface& mainInterface, PPPInterface *subInterface, add_to(KPPPInterface& mainInterface, KPPPInterface *subInterface,
driver_parameter *settings, ppp_module_key_type type) driver_parameter *settings, ppp_module_key_type type)
{ {
if(type != PPP_AUTHENTICATOR_KEY_TYPE) if(type != PPP_AUTHENTICATOR_KEY_TYPE)
@@ -44,8 +44,8 @@ dump_packet(struct mbuf *packet)
#endif #endif
PPPoEDevice::PPPoEDevice(PPPInterface& interface, driver_parameter *settings) PPPoEDevice::PPPoEDevice(KPPPInterface& interface, driver_parameter *settings)
: PPPDevice("PPPoE", PPPoE_HEADER_SIZE + ETHER_HDR_LEN, interface, settings), : KPPPDevice("PPPoE", PPPoE_HEADER_SIZE + ETHER_HDR_LEN, interface, settings),
fEthernetIfnet(NULL), fEthernetIfnet(NULL),
fSessionID(0), fSessionID(0),
fHostUniq(NewHostUniq()), fHostUniq(NewHostUniq()),
@@ -114,7 +114,7 @@ status_t
PPPoEDevice::InitCheck() const PPPoEDevice::InitCheck() const
{ {
return EthernetIfnet() && EthernetIfnet()->output return EthernetIfnet() && EthernetIfnet()->output
&& PPPDevice::InitCheck() == B_OK ? B_OK : B_ERROR; && KPPPDevice::InitCheck() == B_OK ? B_OK : B_ERROR;
} }
@@ -23,9 +23,9 @@ enum pppoe_state {
}; };
class PPPoEDevice : public PPPDevice { class PPPoEDevice : public KPPPDevice {
public: public:
PPPoEDevice(PPPInterface& interface, driver_parameter *settings); PPPoEDevice(KPPPInterface& interface, driver_parameter *settings);
virtual ~PPPoEDevice(); virtual ~PPPoEDevice();
ifnet *EthernetIfnet() const ifnet *EthernetIfnet() const
@@ -116,7 +116,7 @@ pppoe_input(struct mbuf *packet)
static static
bool bool
add_to(PPPInterface& mainInterface, PPPInterface *subInterface, add_to(KPPPInterface& mainInterface, KPPPInterface *subInterface,
driver_parameter *settings, ppp_module_key_type type) driver_parameter *settings, ppp_module_key_type type)
{ {
if(mainInterface.Mode() != PPP_CLIENT_MODE || type != PPP_DEVICE_KEY_TYPE) if(mainInterface.Mode() != PPP_CLIENT_MODE || type != PPP_DEVICE_KEY_TYPE)