SINGLESOCK - How much to strip away?

Hal Murray hmurray at
Wed May 30 11:04:29 UTC 2018

esr at said:
> >Is there a clean way to get notified when an interface comes or goes?
> Yes, that's what routing sockets gives you - notification when there's a
> routing change.  (I don't understand the details well, but this seems to be
> the big picture.) 

Are routing sockets available on all platforms?

There is a command line option:
   -U Num uinterval      interval in secs between scans for new or dropped 
I'm guessing there is also a polling option in the code and that's part of 
what makes the code so ugly.  Or maybe wakeup on the routing socket doesn't 
work, or isn't used.  ??

If it's not used, we can fix that.

> I agree. I'm not in favor of this combination.  But apparently Gary and
> Jason want to keep some sort of explicit interface selection.  I don't know
> why. 

There is an interesting quirk in this area.  The command line defaults to 
none and you get to add the ones you want.  The config file defaults to all 
and you get to drop the ones you don't want.  (If I understand things 


FreeBSD missing IP_PKTINFO:
> Search for IP_PKTINFO.  It's documented there.  I don't know where the
> header is lurking, though; that is a bit odd. 

I found one discussion that said that FreeBSD didn't have it.  That was from 
early 2017.

I have kernel sources from last July.  IP_PKTINFO is only in contrib, and a 
lot of that is ifdefs.  So I'm pretty sure it doesn't exist.  Nothing in 

My guess is that the documentation got copied from someplace and they grabbed 
too much.

Another possibility is that the header file or a patch to the installed file 
with that detail comes from a package I need to install.  That seems unlikely.

Looks like OpenBSD copied the NetBSD man page.

My system is slightly old.  They might have added that feature recently.  
I'll worry about that if we figure out how to make FreeBSD work.

How many other OSes are we interested in?  Anybody checked Mac?


Back up a few steps.  Why do you think multiple sockets are so ugly?  To my 
view, the ugly part is tracking interfaces and using a single socket doesn't 
fix that.

Should we run some timing tests?  Do we want to use recvmsg and sendmsg if 
they are significantly slower?  What is significant? ...

These are my opinions.  I hate spam.

More information about the devel mailing list