You are not logged in.

#1 2012-08-13 11:21:07

leetow2003
Member
Registered: 2012-04-08
Posts: 25

How to receive the datas?

Look:
the first I create socket sk:
sk=socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
and I fill data into Ip Head and Icmp Head,
then I sendto the packet,but I don't receive
any datas:
lenrecv=recvfrom(sk,buf,100,0,(struct sockaddr*)&addr,&rlen);
my codes run at the function recvfrom,but it
couldn't return variable lenrecv,and it look like down,
I want to know why?how to receive the data?
(I couldn't creat socket like this:
sk=socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
I want to know when I creat socket like this
sk=socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
How to receive datas?)

Offline

#2 2012-08-13 19:49:44

joseperezc
Member
Registered: 2011-03-02
Posts: 80

Re: How to receive the datas?

sad

Last edited by joseperezc (2012-08-14 18:58:22)


Hope to be helpfull

Offline

#3 2012-08-13 19:54:23

joseperezc
Member
Registered: 2011-03-02
Posts: 80

Re: How to receive the datas?

sad

Last edited by joseperezc (2012-08-14 18:58:39)


Hope to be helpfull

Offline

#4 2012-08-13 20:42:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to receive the datas?

joseperec - you will be banned if you do this again.

If you don't have anything constructive to add to a thread, don't post in it.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2012-08-14 13:59:55

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: How to receive the datas?

leetow2003, is this a programming problem or a network problem? If this is a network problem, please give more information about your network setup. Thanks.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB