public inbox for developer@lists.illumos.org (since 2011-08)
 help / color / mirror / Atom feed
From: Marcel Telka <marcel@telka.sk>
To: illumos-developer <developer@lists.illumos.org>
Subject: Re: [developer] Raw ethernet packets
Date: Fri, 31 May 2024 15:45:20 +0200	[thread overview]
Message-ID: <ZlnUcIRgSr1vdgwF@telcontar> (raw)
In-Reply-To: <ZlmdTwliRuPF3gpA@telcontar>

On Fri, May 31, 2024 at 11:50:07AM +0200, Marcel Telka wrote:
> On Fri, May 31, 2024 at 02:03:07AM -0700, Joshua M. Clulow via illumos-developer wrote:
> > On Fri, May 31, 2024, 01:43 Marcel Telka <marcel@telka.sk> wrote:
> > 
> > > I'm trying to send a raw ethernet packet from an userland application
> > > but all my attempts so far were unsuccessful.  I basically tried two
> > > approaches (see below) but maybe both are in wrong direction.  I'd
> > > appreciate some help, suggestion or pointer to an working example or
> > > application already doing that.
> > >
> > 
> > You probably want to look at the DLPI, and in particular libdlpi:
> > 
> >     https://illumos.org/man/4P/dlpi
> > 
> > There's a simple program in the gate that demonstrates sending an ethernet
> > frame using libdlpi interfaces:
> > 
> > 
> > https://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/dlutil/dlsend.c?r=20768856
> 
> I'm not sure I'll be able/allowed to use libdlpi for this, but
> definitely this is valuable suggestion.

FYI, the following works:

/usr/lib/dl/dlsend e1000g0 ff:ff:ff:ff:ff:ff

Snooped on another machine:

15:42:09.75924            ? -> (broadcast)  drops: 0 ETHER Type=DEED (Unknown), size=310 bytes

So apparently there is some way how to do that.  I just need to find how
to make it working without libdlpi/libdladm.


Thank you.

-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel@telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+

  reply	other threads:[~2024-05-31 13:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  8:43 Marcel Telka
2024-05-31  8:54 ` [developer] " Marcel Telka
2024-05-31  9:13   ` Denis Kozadaev
2024-05-31  9:51     ` Marcel Telka
2024-05-31 11:08       ` Marcel Telka
2024-05-31 11:23         ` Denis Kozadaev
2024-05-31 12:07           ` Marcel Telka
2024-05-31 12:18             ` Denis Kozadaev
2024-05-31 13:33               ` Marcel Telka
2024-05-31 14:15                 ` Denis Kozadaev
2024-05-31 15:04                   ` Marcel Telka
2024-05-31 15:20                     ` Denis Kozadaev
2024-05-31  9:03 ` Joshua M. Clulow
2024-05-31  9:50   ` Marcel Telka
2024-05-31 13:45     ` Marcel Telka [this message]
2024-05-31  9:43 ` Pramod Batni
2024-05-31  9:49   ` Marcel Telka
2024-06-02  9:05 ` Marcel Telka
2024-06-06 12:54   ` Marcel Telka
2024-06-06 16:51     ` Alan Coopersmith

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=ZlnUcIRgSr1vdgwF@telcontar \
    --to=marcel@telka.sk \
    --cc=developer@lists.illumos.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;
as well as URLs for NNTP newsgroup(s).