按照以下步骤做,可是pppOEServiceNameAdd失败!
Project Configuration for Target 1:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1) create a bootable project based on the BSP for Target 1.This example uses the mbx860 reference board.
2) Click on the vxWorks tab in the Workspace window, andInclude the PPPoE component.
- network components->networking protocols-> remote access framework->PPP over Ethernet
- project errors will appear because PPPoE parameters need tobe set.
3) right-click on the 'PPP over Ethernet' component to set the associatedparameters. Select the 'Properties' item. A Properties window willappear; click on the 'Params' tab to set each parameter. Set the followingproperties:
PPPOE_DEV_NAME "cpm" /* use your ethernet device name */
PPPOE_DEV_UNIT "0" /* use your ethernet device number */
PPPOE_MAX_SERVICES 5 /* use the default setting */
PPPOE_OPERATING_MODE PPPOE_HOST_MODE
PPPOE_SERVICE_NAME "gold"
4) It's not necessary, but the DNS Resolver parameters may also be setat this time. This component is included in the vxWorks image whenPPPoE is included. The resolver domain, and the IP address of the domain name server should be set.Click on the vxWorks tab within the workspace window. Select:networking protocols->network applications->DNS resolver
right-click on the DNS resolver component, and select properties.Click on the Params tab. Finally, set the following parametersto match the domain name and IP address of your network:
RESOLVER_DOMAIN "windriver.com"
RESOLVER_DOMAIN_SERVER "147.11.1.11"
5) Modify usrAppInit.c as follows:
/* adde the following global variables above usrAppInit() */
extern PFW_PROFILE_OBJ *pppOeSysProfile;
extern PFW_STACK_OBJ_CALLBACKS applCallbacks;
int myHandle = 0;
/* within usrAppInit(), add the following line */
pppOEServiceNameAdd(pppOeSysProfile,"gold",&applCallbacks,&myHandle);
6) Modify /target/config/comps/src/vxWorks/net/usrBasicPPPoECfg.c as follows:
#define PPPOE_OPERATING_MODE PPPOE_HOST_MODE
#define PPPOE_DEV_NAME "cpm"
#define PPPOE_DEV_UNIT “0”
7) Add /target/src/ppp/unsupported/pppAppl.c to the project.
8) rebuild the project
谢谢各位做过adsl上网的大侠指导!!