From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id B9A1B1A943C7 for ; Fri, 31 May 2024 05:03:21 -0400 (EDT) (envelope-from josh@sysmgr.org) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id 3B8B7C67ACD; Fri, 31 May 2024 05:03:21 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1717146201; b=iOF704jUz7VkXLoqAoWw21na0u9/ejOFEkWGbjhKya6tDOOHs2 y0tBj/T0j3IuGMgrCidLqkvWjqm8L3SDAIuppKkDSDMAS8tizmhD2t0gBI/4//FQ 2hdq1T6HzE7YwOKZRhhVo+Z9g6LI6lSX86DLQLT5JHMOpouV/OlEjpKsuvtkAV9/ FA0vfaZfbADE8SzIxCCRCAM5q6qAKbugIXumYqEtS3/CoBggrx9r3KyGqdYN2Obp 0HdubpDjrBzrqhxDgnkb2+Jc4JrBYe5gJh27Dh3etz0H6DpFSY4trtgxHmI4/jy4 BZ8AS7NR5DmJoRy1VZknbK7hZKEng+LZ/nbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1717146201; bh=JyYN4SnMDW9ft9zkDtm6GGMSJUhcm4NBqdTx0n0oDnY=; b=jRjZo4ThR8h/ x0f5yZw9vuga9E0mUOjY6gBqZeBdwux3qe3WaBsqP4nicVyajDwJEUS32+ceLeck Xglf+n2rbR5qpp7QEbkRDUaShNBOLNpflzSB7PAzRWA8M3G0CBSLYpTsX17r4or9 T1Jjwlg88dDfuI79NHDXALuQfrElx2/A+hS2CpL6a9QofudSNlC7dJMd4DHu6HUV Sbo7g1zDHDy0MdPbdMWzZAOrh8JR/BpcpYGNtHn0HhJQyaAvxf/BMvwCL9sGkRbp m3XapfUW0fC2Tk6+zSsdJk6ymt2vG7e390JyttsKBm2edxaNQTKfC+3N+eIL9D+T 68b7h3HskA== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=pass (2048-bit rsa key sha256) header.d=sysmgr.org header.i=@sysmgr.org header.b=N/+qnckh header.a=rsa-sha256 header.s=google x-bits=2048; dmarc=pass policy.published-domain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sysmgr.org; iprev=pass smtp.remote-ip=209.85.216.49 (mail-pj1-f49.google.com); spf=pass smtp.mailfrom=josh@sysmgr.org smtp.helo=mail-pj1-f49.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=Yl9Qf5Vj; x-me-sender=none; x-ptr=pass smtp.helo=mail-pj1-f49.google.com policy.ptr=mail-pj1-f49.google.com; x-return-mx=pass header.domain=sysmgr.org policy.is_org=yes (MX Records found: alt2.aspmx.l.google.com,alt4.aspmx.l.google.com,alt3.aspmx.l.google.com,alt1.aspmx.l.google.com,aspmx.l.google.com); x-return-mx=pass smtp.domain=sysmgr.org policy.is_org=yes (MX Records found: alt2.aspmx.l.google.com,alt4.aspmx.l.google.com,alt3.aspmx.l.google.com,alt1.aspmx.l.google.com,aspmx.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=-100 state=0 Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=pass (2048-bit rsa key sha256) header.d=sysmgr.org header.i=@sysmgr.org header.b=N/+qnckh header.a=rsa-sha256 header.s=google x-bits=2048; dmarc=pass policy.published-domain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sysmgr.org; iprev=pass smtp.remote-ip=209.85.216.49 (mail-pj1-f49.google.com); spf=pass smtp.mailfrom=josh@sysmgr.org smtp.helo=mail-pj1-f49.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=Yl9Qf5Vj; x-me-sender=none; x-ptr=pass smtp.helo=mail-pj1-f49.google.com policy.ptr=mail-pj1-f49.google.com; x-return-mx=pass header.domain=sysmgr.org policy.is_org=yes (MX Records found: alt2.aspmx.l.google.com,alt4.aspmx.l.google.com,alt3.aspmx.l.google.com,alt1.aspmx.l.google.com,aspmx.l.google.com); x-return-mx=pass smtp.domain=sysmgr.org policy.is_org=yes (MX Records found: alt2.aspmx.l.google.com,alt4.aspmx.l.google.com,alt3.aspmx.l.google.com,alt1.aspmx.l.google.com,aspmx.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=-100 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekiedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepgghfjgfhfffkuffvtgesrgdtreertddtjeenucfh rhhomhepfdflohhshhhurgcuofdrucevlhhulhhofidfuceojhhoshhhsehshihsmhhgrh drohhrgheqnecuggftrfgrthhtvghrnhepteduhfeigedtfeehvddtieefffefgeeukedv ffekgedufefggfeiieevgfeugfdvnecuffhomhgrihhnpehilhhluhhmohhsrdhorhhgne cukfhppedvtdelrdekhedrvdduiedrgeelnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehinhgvthepvddtledrkeehrddvudeirdegledphhgvlhhopehmrghilhdqph hjuddqfhegledrghhoohhglhgvrdgtohhmpdhmrghilhhfrhhomhepoehjohhshhesshih shhmghhrrdhorhhgqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeouggvvhgvlh hophgvrheslhhishhtshdrihhllhhumhhoshdrohhrgheq X-ME-VSScore: -100 X-ME-VSCategory: clean Received-SPF: pass (sysmgr.org: Sender is authorized to use 'josh@sysmgr.org' in 'mfrom' identity (mechanism 'include:_spf.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="josh@sysmgr.org"; helo=mail-pj1-f49.google.com; client-ip=209.85.216.49 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for ; Fri, 31 May 2024 05:03:20 -0400 (EDT) (envelope-from josh@sysmgr.org) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2c1aa8d302fso1213186a91.1 for ; Fri, 31 May 2024 02:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sysmgr.org; s=google; t=1717146199; x=1717750999; darn=lists.illumos.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=JyYN4SnMDW9ft9zkDtm6GGMSJUhcm4NBqdTx0n0oDnY=; b=N/+qnckh4OYwFLxUjbANlsf/O5rQlKBcuTxPUo5TI1Yqc3DonXbDW0VG3AGcKH7fGf hkbeXihZKl0zA/K9UeQtj2gW4S4vMwGQHkFIe9DpYIRivTLh+W6/zgFGwIiF6fNB4urJ 8mt22z8d8qL+5OgclSGRuJpe5kjmqHIuMesfB7+N+8v4f8rV1m3UkkrXHuYYOZM6OkD8 6gKIzSu848l0HY33WWWlQ6TCBQx9KeWqKk3WPja3XumepXwbazMoSvUMVCQ9XK7WfF0W pGQk/I6NjcdpgQUzLHK0IL6EUtZ2WCy7cNVgnZjrXeu3stKDX8Nq1pNNfcPba+FsdvTv QOaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717146199; x=1717750999; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JyYN4SnMDW9ft9zkDtm6GGMSJUhcm4NBqdTx0n0oDnY=; b=Yl9Qf5Vjk5geNJav76z2ij64leRr7r6Sibs2wb4rm9DrSlcFo5sUCF1zndfMN8tzNp CYHUUO/Kls5k/YGOGtKbG6WJVMuNH3lKDT01S0EDp6W+OpLdcomGYApF0BGh1HTfmAs7 AhO12YnYV/jgrwAHFIf92cRk8BkBDkmLrubmyrEV2EfIzZ1fUtNykvlmxoCKAVJQR6jh 1mQuYteieCsnO/ApxN/6dkIacfpouCmq/76uF70ZHxcLYuRJgq4nbOM4j1kTGBWxQScK zP1pVjutYome4BchByePGd8MOslyl8WkvGKMl9rYnbzkJrWOa7MPxyW+OEJ0v6TDCxEk kFHA== X-Gm-Message-State: AOJu0YyB7R2G74ounl3QvPiHJnAcyw4TA7JY56wTcUPonbAtEWi8lhUf eoZRVwMD2FD6KUbYjQDNKEONzJBTVXDAzeDQfR/lW6Ptvyh7DVkMOeuhI5siQYN6OJMEisf8g6n MNeuGui0HfaMH3sO/g/0luGk5R2Hz7AZjcUYOcAru+d9HVm3b X-Google-Smtp-Source: AGHT+IGEX95Qh0+UJRW12isTtXQg7MV9eSZJ/HxTAU/BfceYht4DliNgQdiIEgSf+tQfaXQsOb8yFCdyUu8efPlIYEM= X-Received: by 2002:a17:90b:707:b0:2c1:e9db:92c8 with SMTP id 98e67ed59e1d1-2c1e9db9305mr575629a91.12.1717146198716; Fri, 31 May 2024 02:03:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Joshua M. Clulow" Date: Fri, 31 May 2024 02:03:07 -0700 Message-ID: Subject: Re: [developer] Raw ethernet packets To: illumos-developer Content-Type: multipart/alternative; boundary="00000000000033d0a80619bc41ea" Topicbox-Policy-Reasoning: allow: sender is an admin Topicbox-Message-UUID: a3d0ea8c-1f2c-11ef-841e-89a6ba807279 --00000000000033d0a80619bc41ea Content-Type: text/plain; charset="UTF-8" On Fri, May 31, 2024, 01:43 Marcel Telka 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 Cheers. --00000000000033d0a80619bc41ea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, May 31, 2024, 01:43 Marcel Telka <marcel@tel= ka.sk> wrote:
I'm trying= to send a raw ethernet packet from an userland application
but all my attempts so far were unsuccessful.=C2=A0 I basically tried two approaches (see below) but maybe both are in wrong direction.=C2=A0 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 i= n particular libdlpi:

= =C2=A0 =C2=A0=C2=A0https://illumos.org/man/4P/dlpi

There's a simple program in the g= ate that demonstrates sending an ethernet frame using libdlpi interfaces:


Cheers.
--00000000000033d0a80619bc41ea--