tiya17
Messages postés9Date d'inscriptionmercredi 1 août 2007StatutMembreDernière intervention 4 septembre 2007
-
16 août 2007 à 14:56
tiya17
Messages postés9Date d'inscriptionmercredi 1 août 2007StatutMembreDernière intervention 4 septembre 2007
-
16 août 2007 à 16:00
Bonjour tout le monde,
je suis débutant en C, et je travail actuellement sur un programme de telecom. cependant étant débutant je poste ici.
voila lorsque je compile mon programme cela me retourne :
In function 'get_net':
P.c:375: error: syntax error before 'TICK'
P.c: In function 'lcp_rx_handlers':
P.c:517: error: request for member 'l' in something not a structure or union
P.c: In function 'ipcp_rx_handlers':
P.c:642: error: request for member 'l' in something not a structure or union
P.c:644: error: request for member 'l' in something not a structure or union
P.c:644: error: request for member 'l' in something not a structure or union
je suis en train d'essayer de résoudre les error: request for member 'l' in something not a structure or union.
le error: syntax error before 'TICK' serai un defaut dans la stack microchip, donc je verrais cela apres.
les ligen de programme correspondant aux erreures sont :
void lcp_rx_handlers(void)
{
BYTE opt, optlen, code;
BYTE rejects=0;
WORD auth=0;
WORD lw;
...
if ((lcp_state&0xf) == PPP_OPENED && get_lword(&lw))
{ // Get magic num
lw.l++; // Return magic num + 1 => (P.c:517: error: request for member 'l' in something not a structure or union)
put_lword(&lw);
copy_rx_tx(net_rxin-rxout); // Echo the data
send_ppp(PPP_ECHO_REP, ppp_rxid, 1);
}
...
}
---------------------------------------------------------------------------------------------------------------
void ipcp_rx_handlers(void)
{
BYTE opt, optlen;
BYTE rejects=0;
int hostip,myip;
...
else if (!hostip.l) // If null IP address (P.c:642: error: request for member 'l' in something not a structure or union)
{
hostip.l = myip.l + 1; // ..give host my IP addr + 1 P.c:644: error: request for member 'l' in something not a structure or union
ipcp_event_handler(EVENT_RCR_ERR); // (for want of anthing else)
if (ipcp_action & SCN)
{ // If OK to NAK, do so
put_byte(IPCP_OPT_ADDR);
put_byte(6);
put_lword(&hostip); // ..with new address as hint
send_ppp(PPP_CFG_NAK, ppp_rxid, 1);
}
}
...
}
---------------------------------------------------------------------------------------------------------------------
si qq1 peut m'aider, je serais ravi...;-)