[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sendto syscall problems?

Dear Sirs,

I have a problem with the 
"sendto" syscall, running on 2.5 OpenBSD/i386.

I seem to use the right parameters as
call entrance to "sendto", but I always
receive EINVAL, error no = 22.

Please, guide me to where my mistake can be.

Note, however, that programs working perfectly
before 2.5(i.e.on 2.4), now can't. No changes
in source have been made.

here's a dump of the offending line, 

ktrace :
CALL  sendto(0x3,0x17000,0xb0,0x40,0xefbfdbb4,0x10)
RET   sendto -1 errno 22 Invalid argument
and the line from the source is:
sendto(sock, packet, sizeof(struct ip) + sizeof(struct icmp) + psize,0, (struct sockaddr *) & sin,sizeof(struct sockaddr));

and another example: 

ktrace :
CALL   sendto(0x4,0xf000,0x70,0,0xefbfdbb8,0x10)       RET   sendto -1 errno 22 Invalid argument
and the line of the source is:
/* send it on its way */
if (sendto(sm->s, packet, pktsize, 0, (struct sockaddr *) &sm->sin,sizeof(struct sockaddr)) == -1)

Please, note that the above lines are taken from
programs, which DO NOT fail to compile.
They only fail to send IPs from my dial-up

Thank you,
hope to have a solution soon.


Get your free email from AltaVista at http://altavista.iname.com