#ifdef INET6

Matthew Dillon dillon at apollo.backplane.com
Tue Dec 14 14:27:49 PST 2004

:Hey guys,
:	I was fixing up some bad code in logger(1) and came across:
:94 #ifdef INET6
:95                 case '6':
:96                         family = PF_INET6;
:97                         break;
:98 #endif
:Now we should do something similar to the actual optstring of getopt.
:Although, talking to Joerg he has a strong dislike for INET6 within
:userland. Whats the stand on this?
:Liam J. Foy
:<liamfoy at xxxxxxxxxxxxx>
:Say it in the living years...

    Well, the above statement could very easily be rewritten like this,
    if portability is required:

	case 6:
#ifdef PF_INET6
		family = PF_INET6;
		warn("ipv6 not currently supported");

    In userland there is no real need for an 'INET6' conditional and,
    Generally speaking, -6 options should not be conditionalized out
    except when portability is an issue.

					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>

More information about the Kernel mailing list