* UDP sendmsg error # -95
@ 2003-03-27 8:33 shesha bhushan
2003-03-27 14:41 ` Chuck Winters
0 siblings, 1 reply; 2+ messages in thread
From: shesha bhushan @ 2003-03-27 8:33 UTC (permalink / raw)
To: linux-kernel, kernelnewbies
Hi,
I am using UDP to in the kernel space. I have implemented as follows. But
the sock_sendmsg is returning "-95". Could any one let me know what is the
problem here..
Thanking You
Shesha
==============================
strcpy(host_ip_ch,TARG_IP);
host_ip = ntohl(my_inet_addr(host_ip_ch));
sprintf(host_ip_long,"%u",host_ip);
soc_addr->sin_addr.s_addr =
htonl(simple_strtoul(host_ip_long,NULL,0));
soc_addr->sin_family = PF_INET;
soc_addr->sin_port = htons(PORT_NUM);
msg.msg_name = soc_addr;
msg.msg_namelen = sizeof(struct sockaddr_in);
oldfs = get_fs();
set_fs(KERNEL_DS);
retval = sock_sendmsg(sock, &msg, send_length);
set_fs(oldfs);
===========================================================
_________________________________________________________________
Vrroooom
Fasten your seatbelts.
http://server1.msn.co.in/msnSpecials/formula2003/index.asp Get set for F1
2003
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: UDP sendmsg error # -95
2003-03-27 8:33 UDP sendmsg error # -95 shesha bhushan
@ 2003-03-27 14:41 ` Chuck Winters
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Winters @ 2003-03-27 14:41 UTC (permalink / raw)
To: linux-kernel, kernelnewbies
Doing a quick search through the code, it looks like the msg.msg_flags
may have MSG_OOB set. You can see it in udp_sendmsg in the file udp.c
Chuck
On Thu, Mar 27, 2003 at 08:33:43AM +0000, shesha bhushan wrote:
> Hi,
>
> I am using UDP to in the kernel space. I have implemented as follows. But
> the sock_sendmsg is returning "-95". Could any one let me know what is the
> problem here..
>
> Thanking You
> Shesha
>
> ==============================
> strcpy(host_ip_ch,TARG_IP);
> host_ip = ntohl(my_inet_addr(host_ip_ch));
> sprintf(host_ip_long,"%u",host_ip);
> soc_addr->sin_addr.s_addr =
> htonl(simple_strtoul(host_ip_long,NULL,0));
>
> soc_addr->sin_family = PF_INET;
> soc_addr->sin_port = htons(PORT_NUM);
>
> msg.msg_name = soc_addr;
> msg.msg_namelen = sizeof(struct sockaddr_in);
>
> oldfs = get_fs();
> set_fs(KERNEL_DS);
>
> retval = sock_sendmsg(sock, &msg, send_length);
>
> set_fs(oldfs);
>
> ===========================================================
>
>
> _________________________________________________________________
> Vrroooom?? Fasten your seatbelts.
> http://server1.msn.co.in/msnSpecials/formula2003/index.asp Get set for F1
> 2003
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-27 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-27 8:33 UDP sendmsg error # -95 shesha bhushan
2003-03-27 14:41 ` Chuck Winters
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®