public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
* Porting to macOS
@ 2024-09-10 20:15 DUO Labs
  2024-09-10 21:26 ` Stefano Brivio
  0 siblings, 1 reply; 6+ messages in thread
From: DUO Labs @ 2024-09-10 20:15 UTC (permalink / raw)
  To: passt-dev

I started doing some preliminary work on porting passt to macOS (I would have responded to issue 6 directly, but I can't seem to make an account); however, I wanted to know how exactly the system works --- does it _require_ a tap device, or can I safely remove that file from the compilation target (I know that pasta requires it, though)?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting to macOS
  2024-09-10 20:15 Porting to macOS DUO Labs
@ 2024-09-10 21:26 ` Stefano Brivio
       [not found]   ` <f872b2a5-107f-4ee5-92f8-0832f1e771ea@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Brivio @ 2024-09-10 21:26 UTC (permalink / raw)
  To: DUO Labs; +Cc: passt-dev

Hi,

On Tue, 10 Sep 2024 16:15:33 -0400
DUO Labs <dvdugo333@gmail.com> wrote:

> I started doing some preliminary work on porting passt to macOS

That's great to hear!

> (I would have responded to issue 6 directly, but I can't seem to make an
> account);

Sorry for that, you should have your request confirmation email now.

I'm reviewing those manually as we have botnets sending automated
account requests for seemingly no benefit, so they might be a bit
delayed from time to time.

> however, I wanted to know how exactly the system works ---
> does it _require_ a tap device, or can I safely remove that file from
> the compilation target (I know that pasta requires it, though)?

passt itself doesn't need a tap device, but note that tap.c is a bit of
a misnomer: it refers to anything guest/container side (be it a UNIX
domain socket, a pre-opened file, or an actual tuntap network
interface).

I guess a reasonable way forward would be to conditionally disable
pasta-related functions, in tap.c and elsewhere, for non-Linux targets
(perhaps easier: conditionally enable them for Linux?).

That is, you won't need tap_handler_pasta() and friends, but you'll need
tap_handler_passt().

-- 
Stefano


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting to macOS
       [not found]     ` <20240910234105.5ef93691@elisabeth>
@ 2024-09-11  1:33       ` DUO Labs
  2024-09-11  1:46         ` DUO Labs
  0 siblings, 1 reply; 6+ messages in thread
From: DUO Labs @ 2024-09-11  1:33 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev

Question: In icmp.c:110, the line reads `ih6->icmp6_identifier = htons(ini->eport);`, where `ih6` is of type icmp6hdr *. However, this field does not exist --- ih6->u_echo.icmp6_identifier does. Is this intended?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting to macOS
  2024-09-11  1:33       ` DUO Labs
@ 2024-09-11  1:46         ` DUO Labs
  2024-09-11 23:01           ` DUO Labs
       [not found]           ` <CADYS5mCYj0pc3iCOU5Z=VUkm-KXiB9hbwqm_KkqxT-FLRd1gtg@mail.gmail.com>
  0 siblings, 2 replies; 6+ messages in thread
From: DUO Labs @ 2024-09-11  1:46 UTC (permalink / raw)
  To: Stefano Brivio, passt-dev

Oh, never mind --- forgot to copy over the entire header, which includes the #defines.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting to macOS
  2024-09-11  1:46         ` DUO Labs
@ 2024-09-11 23:01           ` DUO Labs
       [not found]           ` <CADYS5mCYj0pc3iCOU5Z=VUkm-KXiB9hbwqm_KkqxT-FLRd1gtg@mail.gmail.com>
  1 sibling, 0 replies; 6+ messages in thread
From: DUO Labs @ 2024-09-11 23:01 UTC (permalink / raw)
  To: passt-dev

Is AF_NETLINK required for passt usage, or is it only for pasta?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Porting to macOS
       [not found]           ` <CADYS5mCYj0pc3iCOU5Z=VUkm-KXiB9hbwqm_KkqxT-FLRd1gtg@mail.gmail.com>
@ 2024-09-12  7:00             ` Stefano Brivio
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Brivio @ 2024-09-12  7:00 UTC (permalink / raw)
  To: DUO Labs; +Cc: passt-dev

On Wed, 11 Sep 2024 22:19:15 -0400
DUO Labs <dvdugo333@gmail.com> wrote:

> Looking at the archives, it looks like my message was never received (I'm
> still figuring this mailing list stuff out). I'm pasting my message below:

Non-subscribers' posts are held to avoid spam, I have to approve them
manually. You can register to the list to avoid delays:

  https://lists.passt.top/postorius/lists/passt-dev.passt.top/

> Is AF_NETLINK required for passt usage, or is it only for pasta?

It's more heavily needed for pasta because, there, we use it to
directly configure the networking in the container (with --config-net),
whereas with passt the configuration happens via DHCP/NDP/DHCPv6.

With passt, we use netlink just to source addresses and routes from the
host. I see two alternatives for Darwin:

- use sysctls with NET_RT_DUMP / NET_RT_IFLIST2 / NET_RT_DUMP2 to fetch
  the same information. It's not clear to me if it needs root, though,
  or if there's a different way to fetch information without root

- force the user to give a manual configuration (with options -a, -g at
  least)

-- 
Stefano


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-12  7:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-10 20:15 Porting to macOS DUO Labs
2024-09-10 21:26 ` Stefano Brivio
     [not found]   ` <f872b2a5-107f-4ee5-92f8-0832f1e771ea@gmail.com>
     [not found]     ` <20240910234105.5ef93691@elisabeth>
2024-09-11  1:33       ` DUO Labs
2024-09-11  1:46         ` DUO Labs
2024-09-11 23:01           ` DUO Labs
     [not found]           ` <CADYS5mCYj0pc3iCOU5Z=VUkm-KXiB9hbwqm_KkqxT-FLRd1gtg@mail.gmail.com>
2024-09-12  7:00             ` Stefano Brivio

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).