> sock_creat(PF_INET, SOCK_DGRAM, IPPROTO_UDP, );
> sin.sin_family = AF_INET;
> sin.sin_port = htons((unsigned short)serv_port);
> sin.sin_addr.s_addr = htonl(INADDR_ANY); /*i am not sure about this*/
Needs the target IP address here.
> msg.msg_name =
> msg.msglen = sizeof(struct sockaddr_in);
sock_creat(PF_INET, SOCK_DGRAM, IPPROTO_UDP, sock);
sin.sin_family = AF_INET;
sin.sin_port = htons((unsigned short)serv_port);
sin.sin_addr.s_addr = htonl(INADDR_ANY); /*i am not sure about this*/
Needs the target IP address here.
msg.msg_name = sin;
msg.msglen = sizeof(struct
[EMAIL PROTECTED] writes:
> i am getting EFAULT.
Use
mm_segment_t oldseg = get_fs();
set_fs(KERNEL_DS);
... sendmsg
set_fs(oldseg);
-Andi
P.S.: This is really getting a FAQ. If it isn't already please someone add
it to the linux-kernel FAQ.
-
To unsubscribe from this list: send the
[EMAIL PROTECTED] writes:
i am getting EFAULT.
Use
mm_segment_t oldseg = get_fs();
set_fs(KERNEL_DS);
... sendmsg
set_fs(oldseg);
-Andi
P.S.: This is really getting a FAQ. If it isn't already please someone add
it to the linux-kernel FAQ.
-
To unsubscribe from this list: send the line
4 matches
Mail list logo