From owner-freebsd-hackers Thu Feb 5 04:35:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA12352 for hackers-outgoing; Thu, 5 Feb 1998 04:35:19 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from klokan.sh.cvut.cz (root@klokan.sh.cvut.cz [193.84.105.141]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id EAA12227 for ; Thu, 5 Feb 1998 04:33:57 -0800 (PST) (envelope-from J.Klaus@sh.cvut.cz) Received: from skunk.sh.cvut.cz (skunk.sh.cvut.cz [194.108.141.194]) by klokan.sh.cvut.cz (8.6.12/8.6.9) with ESMTP id NAA02741 for ; Thu, 5 Feb 1998 13:27:43 +0100 Received: from SKUNK/SpoolDir by skunk.sh.cvut.cz (Mercury 1.31); 5 Feb 98 13:27:44 +0100 Received: from SpoolDir by SKUNK (Mercury 1.31); 5 Feb 98 13:27:21 +0100 Received: from hell.sh.cvut.cz by skunk.sh.cvut.cz (Mercury 1.31); 5 Feb 98 13:27:15 +0100 Date: Thu, 5 Feb 1998 13:27:52 +0100 (CET) From: Jaroslav Klaus X-Sender: klausik@hell.sh.cvut.cz To: freebsd-hackers@FreeBSD.ORG Subject: IPX RAW socket Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-912541307-886681672=:10351" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe hackers" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-912541307-886681672=:10351 Content-Type: TEXT/PLAIN; charset=US-ASCII Hello, 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 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 '. Thank you, -- Jarda --0-912541307-886681672=:10351 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ipx.c" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: ipx.c I2luY2x1ZGUgPHN0ZGxpYi5oPg0KI2luY2x1ZGUgPHN0cmluZy5oPg0KI2lu Y2x1ZGUgPHVuaXN0ZC5oPg0KI2luY2x1ZGUgPHN5cy9lcnJuby5oPg0KDQoj aW5jbHVkZSA8bmV0ZGIuaD4NCiNpbmNsdWRlIDxzeXMvdHlwZXMuaD4NCiNp bmNsdWRlIDxzeXMvc29ja2V0Lmg+DQojaW5jbHVkZSA8bmV0aW5ldC9pbi5o Pg0KI2luY2x1ZGUgPG5ldGlweC9pcHguaD4NCg0KI2RlZmluZSBJUFhfREFU QV9MRU4JCTIwDQoNCiNkZWZpbmUgSVBYUFJPVE9fTkVUQklPUwkyMA0KDQp1 X3Nob3J0IGNoZWNrc3VtKHVfc2hvcnQgKiBkYXRhLHVfc2hvcnQgbGVuZ3Ro KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KeyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICANCiAgICAgICAgcmVnaXN0ZXIg bG9uZyB2YWx1ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgDQogICAgICAgIHVfc2hvcnQgaTsgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICANCiAgICAgICAgZm9yKGk9MDtpPChsZW5ndGg+PjEpO2krKykgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAg ICAgICAgICAgICAgdmFsdWUrPWRhdGFbaV07ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICANCiAgICAgICAgaWYoKGxlbmd0aCYx KT09MSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgdmFsdWUrPShkYXRh W2ldPDw4KTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAN CiAgICAgICAgdmFsdWU9KHZhbHVlJjY1NTM1KSsodmFsdWU+PjE2KTsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KICAgICAgICByZXR1cm4o fnZhbHVlKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICANCn0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgDQoNCg0KaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiog YXJndikNCnsNCglzdHJ1Y3Qgc29ja2FkZHJfaXB4IAlzaXB4Ow0KCWludCAJ CQlzb2NrLGVycjsNCgljaGFyIAkJCWJ1ZmZlcltzaXplb2Yoc3RydWN0IG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