mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Burnett <cburnett@candysporks.org>
To: LKML <linux-kernel@vger.kernel.org>
Subject: pure raw eth sockets
Date: Fri,  8 Nov 2002 00:12:44 -0600	[thread overview]
Message-ID: <1036735964.3dcb55dc6f784@www.candysporks.org> (raw)

I'm at a complete road block here and I appreciate any help!

I'm trying to write a packet generator that generates a packet down to the
destination/src mac address of an eth frame.  However, nothing I find seems to
explain how to do this let alone if it is possible.  As example (for
familiarity), implementing a RARP client (and server).  I first create a socket:

socket(PF_INET, SOCK_PACKET, ETH_P_RARP)

After generating an entire packet (eth frame + RARP request) and sending it via
sendto, tcpdump shows that my packet was encapsulated as the data for an IP
packet.  Definitely not what I want and I suspect it is because I'm passing the
PF_INET domain (it assuming IP?).

So how would I go about implement sending a RARP request (obviously I'm doing
something wrong or assuming something wrong)?  Or more generally, how do I get
pure raw socket access?
-- 


Colin Burnett

             reply	other threads:[~2002-11-08  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08  6:12 Colin Burnett [this message]
2002-11-08  6:43 ` Chris Friesen
2002-11-08  8:14 ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1036735964.3dcb55dc6f784@www.candysporks.org \
    --to=cburnett@candysporks.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®