/* pppControlLayer.c - PPP Control Layer Source File */
/* Copyright 1999 Wind River Systems, Inc. */
#include "copyright_wrs.h"
/*
modification history
--------------------
03d,07aug03,rp updating include path for message digest
03c,21mar03,ijm SPR#87027,set numberOfNetworkPhaseProtocols to 0 before
starting network protocols
03b,03mar03,ijm in controlLayerReceive, free packet if pfwReceive
returns ERROR, SPR# 86148
03a,12dec02,ijm merged fix for SPR# 76442,check name and password lengths
02z,05nov02,ijm use printf instead of logMsg
02y,04nov02,ijm update proxyAuthenAttributes,SPR# 75504
02x,17oct02,ijm check protocol state in protocolDown
02w,04oct02,ijm Changed event name from MP_LINK_DOWN_EVENT to
PPP_LINK_RESET_EVENT
02v,17jul02,emr Bring into line for PPP 2.0
02u,26jun02 ijm changed header file inclusion order to support dual stack
02t,28may02,rvr fixed build warnings
02s,14mar02,ak Added MP_LINK_DOWN_EVENT
02r,27feb02,ak releasing the state locks in ERROR exits in
chapCallbackWrapper() and papCallbackWrapper()
02q,27feb02,ak validating the Manager Stack Obj before retrieving the value of
"mpFraming_localUserName" in protocolUp()
02p,23feb02,jr setting the pointers to NULL after freeing
02o,17feb02,ak support for dynamic assignment of MP Member Stack to Manager
Stack
02n,29oct01,ijm fixed SPR#70122: after authentication failure, cannot
re-establish serial connection to Windows NT.
02m,08oct01,ak Merged the modifications done in the T2 file in
the functions linkIdGet() deleteProtocolItem(),
componentStackDelDone(), protocolUp()
02l,08oct01,ak return ERROR if pfwEventObjGet() fails for
PPP_AUTH_SUCCESSFUL_EVENT in controllayerStackDataConstruct()
02k,08oct01,ak Checking for MP Manager Stack before attempting
pfwStackParamGet() in configuring local auth protocol
protocolUp()
02j,08oct01,ak Removed unnecesaary log message in getting the reference to
LINK_ID_INTERFACE in protocolUp()
02i,08oct01,ak deleting reference to AUTH_INFO_INTERFACE in protocolUp()
02h,08oct01,ak changed MAX_NAME to NAME_SIZE
02g,21jun01,ak Configuring authentication information on the MP Member Stacks
02f,20jun01,nts Handling MP Member Stack and Manager Stack interaction
02e,20jun01,as added COMPONENT_ACCEPTABLE_PROTOCOL_INTERFACE
02d,13apr01,ijm corrected noAuthenticationRequired function removing redundant
call to pfwLayerStateGet
02c,05mar01,ijm removed redundant peer and localSecretsTable in
pppControlLayerCreate. Released interfaces when stack
is deleted (SPR#63868: pfwDelete does not delete
framework)
02b,02mar01,ijm publish and raise LCP_CLOSE_EVENT
02a,17dec00,md publish and raise PPP_NETWORK_PHASE_UP event
01z,02aug00,adb Merging in LAC modifications
01y,01aug00,md changes to authenAttributesGet() to support PAP
01x,01aug00,adb Merging with openstack view
01w,31jul00,adb Merging with bala.tor2_pppfrmwk
01v,28jul00,md initializes proxy authen event and fixes authenAttributesGet()
to return authenChallenge instead of authenName
01u,12jul00,md publish COLLECT_PPP_ATTRIBUTES_EVENT
01t,12jul00,md added support for l2tp proxy authentication
01s,30jun00,bsn added support for Radius Authentication and Accounting
01r,29jun00,md added authenAttributesGet() interface
01q,20mar00,sj NOMANUAL for obsolete secrets database interfaces
01p,15mar00,sj call lcpTerminationRequest upcall
01o,09mar00,sj FIX bad function definition for OBSOLETE pppLocalSecretDelete
01n,25feb00,sj apopulate lcpIdRequest and lcpIdRequestReceived in
PPP_CONTROL_LAYER_INTERFACE
01m,23feb00,sj changed bzero to memset and bcopy to memcpy + Pedantic ANSI fix
01l,17feb00,sj in pppLinkIdGet get and use the PPP_LINK_ID_INTERFACE +
added support for PPP_INTERFACE_UP/DOWN_EVENT
01k,15feb00,sj changed m2pppSecretsSecretGet to m2pppSecretsSecretGet
01j,07feb00,sj use secrets database implemented for SNMP + fixes
01i,23dec99,sj dont send protocol reject if received in bad phase
01h,14dec99,sj added LCP_OPEN_EVENT and LCP_DOWN_EVENT
01g,30nov99,sj dont set TERMINATE phase in tearDownConnection
01f,30nov99,sj removing debug messages
01e,09nov99,sj LCP raises LCP up event
01d,16oct99,sj modifications for RW LCP and IPCP
01c,23aug99,sj modified for generic framework
01b,12jul99,koz included new framework header files and updated interfaces
accordingly
01a,07jul99,koz created.
*/
/*
DESCRIPTION
This module implements the PPP phase diagram. It is the managing entity for
all PPP control protocols. PPP control and authentication protocol packets
received from the network are dispatched to the respective protocols if they
are available within the stack instance for which the packet is received.
Starting from the DEAD_PHASE this layer progresses through ESTABLISH_PHASE,
to NETWORK_PHASE when bringing up the connection and through TERMINATE_PHASE,
back to DEAD_PHASE during shutdown as defined in RFC 1661.
In each phase only packets with protocol types belonging to the current phase
and the preceeding phases are honored. A protocol reject packet is sent out via
the LCP component for unsupported/unavailable protocols.
The Control Layer publishes an interface, "PPP_CONTROL_LAYER_INTERFACE," that
is used by all the component Control Layer protocols to communicate with
the layer. Some of these callbacks are translated into up-calls to
the user application via the PPP_UPCALL_FUNCTIONS callback mechanism defined
in "$WIND_BASE/target/h/ppp/pppInterfaces.h."
This layer also expects all component protocols to implement a
"CONTROL_PROTOCOL_INTERFACE" which used to obtain the PPP phase to which
the protocol belongs, to trigger OPEN, DOWN and CLOSE events and to
get the current state information.
The negotiated Authentication protocol information is obtained from the
LCP component via the "LCP_NEGOTIATED_AUTH_PROTOCOL_INTERFACE" once it is UP.
The corresponding protocols, if configured for dynamic addition, are first
added and then started. The connection will be shutdown if the negotiated
authentication protocols are unavailable.
This module has been implemented as a LAYER plugin object and it exists in
the CONTROL PLANE of the framework instance for which it has been
instantiated. It has a single profile parameter which is described in
"$WIND_BASE/target/h/ppp/pppControlLayer.h."
INCLUDE FILES pppControlLayer.h pppInterfaces.h pppControlProtocolInterface.h
pppControlLayerInterface.h lcpInterfaces.h
*/
/* includes */
#include "vxWorks.h"
#include "pfw/pfw.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "logLib.h"
#include "tickLib.h"
#include "muxLib.h"
#include "netBufLib.h"
#include "pfw/pfwStack.h"
#include "pfw/pfwComponent.h"
#include "pfw/pfwLayer.h"
#include "pfw/pfwTable.h"
#include "pfw/pfwEvent.h"
#include "pfw/pfwMemory.h"
#include "ppp/kstart.h"
#include "ppp/kppp.h"
#include "private/ppp/vpppastr.h"
#include "ppp/interfaces/pppControlLayerInterface.h"
#include "ppp/interfaces/pppControlProtocolInterface.h"
#include "ppp/interfaces/lcpInterfaces.h"
#include "ppp/interfaces/pppLinkIdInterface.h"
#include "ppp/interfaces/pppRadiusInterface.h"
#include "ppp/pppInterfaces.h"
#include "ppp/m2pppSecuritySecretsLib.h"
#include "ppp/pppControlLayer.h"
#include "sllLib.h"
#include "wrn/util/mdLib.h"
/* WindNet Multilink */
#include "ppp/interfaces/componentAcceptableProtocolsInterface.h"
#include "ppp/interfaces/authInfoInterface.h"
/* WindNet Multilink */
/* defines */
#define LOCAL_SECRETS_DATABASE 1
#define EXTERNAL_SECRETS_DATABASE 2
#define REMOTE_SECRETS_DATABASE 3
#define _LCP_PROTOCOL_ 0xc021 /* Link Control Protocol */
#define _PAP_PROTOCOL_ 0xc023 /* Password Authentication Protocol */
#define _LQR_P
没有合适的资源?快使用搜索试试~ 我知道了~
linux_ppp.rar_gps ppp c/c++_linux ppp_ppPappl_www852ppp.cσm
共90个文件
c:84个
makefile:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 43 浏览量
2022-09-19
16:40:31
上传
评论
收藏 519KB RAR 举报
温馨提示
c c++实现的PPP协议源码,具有很好的参考价值。
资源详情
资源评论
资源推荐
收起资源包目录
linux_ppp.rar (90个子文件)
ppp
framing
mpFramingLayer.c 38KB
pppOEthernet.c 110KB
pppChecksum.c 8KB
mpBdlManagement.c 37KB
pppMuxAdapter.c 55KB
pppAdapterLayer.c 3KB
pppSioAdapter.c 76KB
pppBitSyncFraming.c 34KB
mpRx.c 25KB
mpreassemble.c 61KB
pppFramingLayer.c 4KB
pppAsyncFraming.c 42KB
Makefile 2KB
mpFramingLayerInterface.c 58KB
mpQueueTask.c 9KB
mpAPI.c 45KB
mpBufCal.c 5KB
mpsend.c 26KB
control
pppncprx.c 20KB
pppstate.c 41KB
bacpoptn.c 15KB
pppbaprx.c 76KB
pppbacprx.c 24KB
ppplcprx.c 40KB
ipcpInterfaces.c 8KB
ppplcptx.c 42KB
pppIpStateMachineFunction.c 43KB
pppbacptx.c 23KB
pppBacpComponent.c 92KB
pppPapComponent.c 42KB
pppbaptx.c 66KB
lcpstate.c 28KB
portManagerSerial.c 23KB
pppoptnp.c 36KB
pppLcpComponent.c 94KB
bacpstate.c 43KB
pppRadiusComponent.c 91KB
mpLcpInterfaces.c 21KB
bacptimer.c 20KB
pppoptn.c 45KB
listutls.c 9KB
pppChapComponent.c 46KB
lcpInterfaces.c 47KB
pppIpcpComponent.c 64KB
pppconfg.c 38KB
baputil.c 24KB
pppcfgar.c 9KB
Makefile 2KB
lcptimer.c 6KB
pppControlLayer.c 127KB
pppIpv6cpComponent.c 59KB
pppNcpLib.c 15KB
pppncptx.c 21KB
rasamm.c 34KB
pppoptna.c 23KB
bacpaction.c 9KB
data
mpInterfaceLayer.c 44KB
pppVsEnd.c 115KB
pppVjc.c 24KB
pppNetworkLayer.c 22KB
pppInterfaceLayer.c 18KB
Makefile 2KB
pppEnd.c 57KB
unsupported
mpTest.c 12KB
pppMuxAdapter.c 56KB
m2pppLinkGroupTest.c 22KB
m2pppLibTest.c 6KB
bacpTest.c 37KB
m2pppIpcpGroupTest.c 8KB
pppAppl.c 3KB
portmanager
portManagerModem.c 16KB
pppModem.c 25KB
m2pppSecuritySecretsLibTest.c 21KB
Makefile 1KB
m2pppSecurityTest.c 16KB
pppModem.c 26KB
management
m2pppIpcpGroup.c 8KB
m2pppSecuritySecretsLib.c 82KB
snmpAgent
m1473.c 4KB
snmp1471.c 52KB
m1471.c 8KB
snmp1473.c 31KB
m1472.c 6KB
snmp1472.c 63KB
pppMibAgent.c 3KB
Makefile 2KB
m2pppLib.c 21KB
m2pppSecurityConfig.c 15KB
Makefile 1KB
m2pppLinkGroup.c 11KB
共 90 条
- 1
朱moyimi
- 粉丝: 61
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0