DHCP over PPP - or how to use sockets instead of BPF?

Patrik Lahti plahti at qnx.com
Thu Apr 15 20:59:30 UTC 2010


On 15/04/10 03:10 PM, sthaug at nethelp.no wrote:
>> AFAIU, BPF is used because of problems with BSD sockets when e.g.
>> sending to 255.255.255.255 broadcast address, sending direct without
>> issuing ARP, and sending when interface is not configured (has address
>> 0.0.0.0) etc. Could using BSD sockets get around the need to implement
>> encap/decap for PPP but still get by without running into too much
>> trouble with the BSD sockets?
>>      
> With suitable patches, which have been posted to the list,
>
> https://lists.isc.org/pipermail/dhcp-users/2010-February/010916.html
> https://lists.isc.org/pipermail/dhcp-users/2009-August/009667.html
>
> you can use BSD sockets exclusively, as long as you don't need to
> handle DHCP broadcast traffic (for instance if all your DHCP clients
> are behind a relay agent). This *should*, at least in theory, enable
> you to use a ppp interface.
>
>    
Thanks,

I think that this patch might work to USE_SOCKETS over ethernet, but 
will still log_fatal() for IFT_PPP on get_hw_addr() at the same place.

Maybe I have to fudge a "PPP hw address" in get_hw_addr(), but in 
thinking further, the CHADDR field of DHCP header will need a value so 
maybe simply require that the user configures a client identifier when 
the interface is PPP and put that in the hw_address field. The specs 
don't really say, is this how people do it on PPP?

Regards,
/P




More information about the dhcp-users mailing list