From owner-freebsd-questions Sun Feb 8 21:38:49 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA05254 for questions-outgoing; Sun, 8 Feb 1998 21:38:49 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA05242 for ; Sun, 8 Feb 1998 21:38:39 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.7/8.8.8) with SMTP id VAA25007; Sun, 8 Feb 1998 21:38:25 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Date: Sun, 8 Feb 1998 21:38:25 -0800 (PST) From: Doug White Reply-To: Doug White To: Jaroslav Klaus cc: freebsd-questions@FreeBSD.ORG Subject: Re: IPX RAW socket In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 '. 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