Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 1998 21:38:25 -0800 (PST)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        Jaroslav Klaus <J.Klaus@sh.cvut.cz>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: IPX RAW socket
Message-ID:  <Pine.BSF.3.96.980208213341.24904L-100000@gdi.uoregon.edu>
In-Reply-To: <XFMail.980205002320.J.Klaus@sh.cvut.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 5 Feb 1998, Jaroslav Klaus wrote:

> I'd like to send IPX type20 packet. I've writen a small prg but sendto
> returns errno=56. Is IPX RAW socket implemented in FBSD2.2? Can anybody help
> me with it? I attached my program in this mail. I started it by this way:
> 
> %./ipx 0x337130.0x00:00:b4:72:aa:83.0x5500 0.0:00:12:34:56:78.0x5520
> couldn't send packet
> 0.12345678H.5520H : 337130H.b472aa83.5500H -> 0.12345678H.5520H
> 56: unknown error

According to intro(2):

 56 EISCONN Socket is already connected. A connect(2) request was made on
an already connected socket; or, a sendto(2) or sendmsg(2) request on a
connected socket specified a destination when already connected. 

I don't know where you learned your switch(errno) stuff, but you will find
perror() and strerror() very useful; this will translate the error number
to the error text which you can then lookup on intro(2).  Saves you, oh,
10 lines of code plus, depending on how many errno's you want to check.

> And another Q. In ports is there any tool for sending data to network iface?
> I need resend some ethernet packet captured by 'tcpdump -w <file>'.

man bpf  

It's a kernel land interface.

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980208213341.24904L-100000>