linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Porting source to OSX
@ 2020-02-14 14:51 igal avraham
  2020-02-14 16:40 ` James Carlson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: igal avraham @ 2020-02-14 14:51 UTC (permalink / raw)
  To: linux-ppp

Hi,

Is there a port available for OS X ?

Thanks,
Igal

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

* Re: Porting source to OSX
  2020-02-14 14:51 Porting source to OSX igal avraham
@ 2020-02-14 16:40 ` James Carlson
  2020-02-14 16:58 ` igal avraham
  2020-02-14 18:25 ` James Carlson
  2 siblings, 0 replies; 4+ messages in thread
From: James Carlson @ 2020-02-14 16:40 UTC (permalink / raw)
  To: linux-ppp

On 2/14/20 9:51 AM, igal avraham wrote:
> Is there a port available for OS X ?

pppd version 2.4.2 is included as part of Mac OS X, but my understanding
is that this port was done inside Apple and that they haven't released
source code for it.  The existing publicly-available pppd code doesn't
have support for a "Darwin" (Mac OS X) kernel.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

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

* Re: Porting source to OSX
  2020-02-14 14:51 Porting source to OSX igal avraham
  2020-02-14 16:40 ` James Carlson
@ 2020-02-14 16:58 ` igal avraham
  2020-02-14 18:25 ` James Carlson
  2 siblings, 0 replies; 4+ messages in thread
From: igal avraham @ 2020-02-14 16:58 UTC (permalink / raw)
  To: linux-ppp

Thanks for the fast reply.

Are there any guidelines for porting if I want to do it by myself ?

> On 14 Feb 2020, at 18:40, James Carlson <carlsonj@workingcode.com> wrote:
> 
> On 2/14/20 9:51 AM, igal avraham wrote:
>> Is there a port available for OS X ?
> 
> pppd version 2.4.2 is included as part of Mac OS X, but my understanding
> is that this port was done inside Apple and that they haven't released
> source code for it.  The existing publicly-available pppd code doesn't
> have support for a "Darwin" (Mac OS X) kernel.
> 
> -- 
> James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

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

* Re: Porting source to OSX
  2020-02-14 14:51 Porting source to OSX igal avraham
  2020-02-14 16:40 ` James Carlson
  2020-02-14 16:58 ` igal avraham
@ 2020-02-14 18:25 ` James Carlson
  2 siblings, 0 replies; 4+ messages in thread
From: James Carlson @ 2020-02-14 18:25 UTC (permalink / raw)
  To: linux-ppp

On 2/14/20 11:58 AM, igal avraham wrote:
> Thanks for the fast reply.
> 
> Are there any guidelines for porting if I want to do it by myself ?

If Apple shipped their driver header files, you *might* be able to get
away with compiling just the user-space code alone, substituting in
those headers.  A quick check of a Mac system I have shows that the
header files for PPP are missing.  I don't know how you'd go about
getting them.  Maybe you'd get lucky and their kernel modules don't
differ significantly from those used on other OSes.  It's perhaps worth
a try.  It'll take some hacking of the 'configure' script to make it happen.

Assuming that fails ...

The starting point for a complete port is the kernel module, which must
be able to attach to a serial driver (so that we can send/receive frames
using AHDLC or HDLC) and to the network stack (so that we can behave as
a data link layer protocol in the system).

How this is done varies dramatically based on system design, kernel
facilities, and resource management issues.  Feel free to look through
the 'modules' subdirectory in the pppd distribution for an example of
how it's done on a STREAMS-based system, and the Linux sources for an
example of that kernel:

https://github.com/torvalds/linux/blob/master/drivers/net/ppp/ppp_generic.c

Perhaps closer to what you want is the FreeBSD port, given that I think
Darwin is a derivative of the original BSD4.4, but that one is even
further afield of the original pppd sources.  They've forked the sources
and maintain them as part of the FreeBSD tree.  (I think similar things
are true for the other *BSD variants.)

https://github.com/freebsd/freebsd/tree/master/usr.sbin/ppp

I don't know how much of Darwin's kernel is publicly documented.  I know
they released some stuff openly for a while and then gave up on the
whole "open source" thing.  You might be able to get some pointers
through one of the projects that derived from that:

http://www.puredarwin.org/

And, if successful, you'd also need to figure out how to put a
cryptographic signature on your module so you can load it in the kernel.
 Much luck with that part; all I know is that it's non-trivial.

-- 
James Carlson         42.703N 71.076W         <carlsonj@workingcode.com>

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

end of thread, other threads:[~2020-02-14 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 14:51 Porting source to OSX igal avraham
2020-02-14 16:40 ` James Carlson
2020-02-14 16:58 ` igal avraham
2020-02-14 18:25 ` James Carlson

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).