Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part V: Appendixes > Socket Options (get/setsockopt())

Socket Options (get/setsockopt())

Tables A.4 through A.7 list the various socket options and the required parameters. Not all options are size compatible between UNIX types. For example, IP_TTL in Linux allows a type int, but only fills the first byte. IBM's AIX restricts the same option to a char instead.

Table A.4. General Socket Options
LevelOptionDescription*RWValueType
SOL_SOCKETSO_ATTACH_FILTERAttach filter???Integerint
SOL_SOCKETSO_BINDTODEVICEBind to device???Stringchar*
SOL_SOCKETSO_BROADCASTEnable broadcastYYYBooleanint
SOL_SOCKETSO_BSDCOMPATRequest BSD bug-for-bug compatibilityYYYBooleanint
SOL_SOCKETSO_DEBUGEnable socket debuggingYYYBooleanint
SOL_SOCKETSO_DETACH_FILTERDetach filter???Integerint
SOL_SOCKETSO_DONTROUTEForbid routingYYYBooleanint
SOL_SOCKETSO_ERRORLast errorYYYIntegerint
SOL_SOCKETSO_KEEPALIVEEnable keeping connection aliveYYYBooleanint
SOL_SOCKETSO_LINGERLinger until data sentYYYLingerstruct linger
SOL_SOCKETSO_NO_CHECKNo checkingYYYBooleanint
SOL_SOCKETSO_OOBINLINEPlace out-of-band inlineYYYBooleanint
SOL_SOCKETSO_PASSCREDEnable passing user credentialsYYYBooleanint
SOL_SOCKETSO_PEERCREDPeer CredentialsYYYCredentialsstruct ucred
SOL_SOCKETSO_PRIORITYSet the queue priorityYYYIntegerint
SOL_SOCKETSO_RCVBUFReceive buffer sizeYYYIntegerint
SOL_SOCKETSO_RCVLOWATReceive low water markYYNIntegerint
SOL_SOCKETSO_RCVTIMEOReceive TimeoutYYYTimestruct timeval
SOL_SOCKETSO_REUSEADDRReuse AddressYYYBooleanint
SOL_SOCKETSO_REUSEPORTReuse Address(multicasting)N--Booleanint
SOL_SOCKETSO_SECURITY_ AUTHENTICATIONSecurity authenticationN--Integerint
SOL_SOCKETSO_SECURITY_ ENCRYPTION_ NETWORKSecurity encryption networkN--Integerint
SOL_SOCKETSO_SECURITY_ ENCRYPTION_ TRANSPORTSecurity encryption transportN--Integerint
SOL_SOCKETSO_SNDBUFSend buffer sizeYYYIntegerint
SOL_SOCKETSO_SNDLOWATSend low water markYYYIntegerint
SOL_SOCKETSO_SNDTIMEOSend TimeoutYYYTimestruct timeval
SOL_SOCKETSO_TYPESocket TypeYYYIntegerint



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial