39#define IPCP_DEFAULT_SUBNET_MASK IPV4_ADDR(255, 255, 255, 255)
64#if defined(__CWCC__) || defined(_WIN32)
79} IpcpIpAddressesOption;
92} IpcpIpCompProtocolOption;
104} IpcpIpAddressOption;
116} IpcpPrimaryDnsOption;
128} IpcpPrimaryNbnsOption;
140} IpcpSecondaryDnsOption;
152} IpcpSecondaryNbnsOption;
156#if defined(__CWCC__) || defined(_WIN32)
161error_t ipcpOpen(PppContext *context);
162error_t ipcpClose(PppContext *context);
164void ipcpTick(PppContext *context);
166void ipcpProcessPacket(PppContext *context,
const PppPacket *packet,
size_t length);
168error_t ipcpProcessConfigureReq(PppContext *context,
169 const PppConfigurePacket *configureReqPacket);
171error_t ipcpProcessConfigureAck(PppContext *context,
172 const PppConfigurePacket *configureAckPacket);
174error_t ipcpProcessConfigureNak(PppContext *context,
175 const PppConfigurePacket *configureNakPacket);
177error_t ipcpProcessConfigureReject(PppContext *context,
178 const PppConfigurePacket *configureRejPacket);
180error_t ipcpProcessTerminateReq(PppContext *context,
181 const PppTerminatePacket *terminateReqPacket);
183error_t ipcpProcessTerminateAck(PppContext *context,
184 const PppTerminatePacket *terminateAckPacket);
186error_t ipcpProcessCodeRej(PppContext *context,
187 const PppCodeRejPacket *codeRejPacket);
189error_t ipcpProcessUnknownCode(PppContext *context,
190 const PppPacket *packet);
193void ipcpThisLayerUp(PppContext *context);
194void ipcpThisLayerDown(PppContext *context);
195void ipcpThisLayerStarted(PppContext *context);
196void ipcpThisLayerFinished(PppContext *context);
198void ipcpInitRestartCount(PppContext *context, uint_t value);
199void ipcpZeroRestartCount(PppContext *context);
201error_t ipcpSendConfigureReq(PppContext *context);
203error_t ipcpSendConfigureAck(PppContext *context,
204 const PppConfigurePacket *configureReqPacket);
206error_t ipcpSendConfigureNak(PppContext *context,
207 const PppConfigurePacket *configureReqPacket);
209error_t ipcpSendConfigureRej(PppContext *context,
210 const PppConfigurePacket *configureReqPacket);
212error_t ipcpSendTerminateReq(PppContext *context);
214error_t ipcpSendTerminateAck(PppContext *context,
215 const PppTerminatePacket *terminateReqPacket);
217error_t ipcpSendCodeRej(PppContext *context,
const PppPacket *packet);
220error_t ipcpParseOption(PppContext *context, PppOption *option,
221 size_t inPacketLen, PppConfigurePacket *outPacket);
223error_t ipcpParseIpAddressOption(PppContext *context,
224 IpcpIpAddressOption *option, PppConfigurePacket *outPacket);
error_t
Error codes.
Definition error.h:43
IpcpOptionType
IPCP option types.
Definition ipcp.h:52
@ IPCP_OPTION_IP_ADDRESS
IP-Address.
Definition ipcp.h:55
@ IPCP_OPTION_PRIMARY_NBNS
Primary-NBNS-Server-Address.
Definition ipcp.h:57
@ IPCP_OPTION_IP_ADDRESSES
IP-Addresses.
Definition ipcp.h:53
@ IPCP_OPTION_IP_COMP_PROTOCOL
IP-Compression-Protocol.
Definition ipcp.h:54
@ IPCP_OPTION_SECONDARY_NBNS
Secondary-NBNS-Server-Address.
Definition ipcp.h:59
@ IPCP_OPTION_SECONDARY_DNS
Secondary-DNS-Server-Address.
Definition ipcp.h:58
@ IPCP_OPTION_PRIMARY_DNS
Primary-DNS-Server-Address.
Definition ipcp.h:56
typedef __packed_struct
IP-Addresses option.
Definition ipcp.h:74
uint32_t Ipv4Addr
IPv4 network address.
Definition ipv4.h:267
PPP (Point-to-Point Protocol)