From owner-freebsd-net Thu May 3 1:20:57 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail.kebne.se (mail.kebne.se [212.209.134.151]) by hub.freebsd.org (Postfix) with ESMTP id 1A92937B422; Thu, 3 May 2001 01:20:53 -0700 (PDT) (envelope-from gunnar.olsson@xelerated.com) Received: by mail.kebne.se with Internet Mail Service (5.5.2653.19) id ; Thu, 3 May 2001 10:20:49 +0200 Message-ID: <31A473DBB655D21180850008C71E251A031AAF3A@mail.kebne.se> From: Gunnar Olsson To: "Freebsd Net (E-mail)" , "Freebsd Hackers (E-mail)" Subject: how to use netgraph? Date: Thu, 3 May 2001 10:20:45 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi there, I have a process in user space, that wants to send a packet direct on the ethernet, not encapsulate the packet in IP. When I read about netgraph, it looks like it possible to do, or? When I hook to a upper or a lower hook, does the kernel create the ethernet header, or do I have to create the ethernet header in the user process myself before sending down? If the kernal is adding the ethernet header, what is actually sent out on the wire? Usaully an ARPLOOKUP is done and maps the IP dst to a MAC dst, but now I do not have the IP header. How to get the MAC dst field filled in? If someone has an example how to write a small program that using the netgragh to sent a packet down via an hook, I would be so happy if you could send that to me:-) Best Regards Gunnar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gunnar Olsson Phone: +46 8 5062 5762 Xelerated Packet Devices AB Fax: +46 8 5455 3211 Regeringsgatan 67 Mobile: +46 73 3279765 SE-10386 Stockholm Web: http://www.xelerated.com Email: mailto:gunnar.olsson@xelerated.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message