Chapter 7:

Socket Options and IOCTLs

 

 

 

C & Winsock: The Kick Start programming tutorials

 

C & Linux Socket

 

Program Example Index

 

C#, VB .NET & C++/CLI Network Programming

 

Windows Device Driver Development & Program Examples

 

ReactOS - Windows OS Binary Compatible Open Source Project - C & C++

 

 

 

 

COMPLETED PROJECT DOWNLOAD

 

 

 

What do we have in this chapter?

  1. Socket Options

  2. SOL_SOCKET Option Level

    SO_ACCEPTCONN

    SO_BROADCAST

    SO_CONDITIONAL_ACCEPT

    SO_CONNECT_TIME

    SO_DEBUG

    SO_DONTLINGER

    SO_DONTROUTE

    SO_ERROR

    SO_ EXCLUSIVEADDRUSE

    SO_KEEPALIVE

    SO_LINGER

    SO_MAX_MSG_SIZE

    SO_OOBINLINE

    SO_OPENTYPE

    SO_PROTOCOL_INFO

    SO_RCVBUF

    SO_RCVTIMEO

    SO_REUSEADDR

    SO_SNDBUF

    SO_SNDTIMEO

    SO_TYPE

    SO_UPDATE_ACCEPT_CONTEXT

    SOL_APPLETALK Option Level

    SO_CONFIRM_NAME

    SO_DEREGISTER_NAME, SO_REMOVE_NAME

    SO_LOOKUP_MYZONE, SO_GETMYZONE

    SO_LOOKUP_NAME

    SO_LOOKUP_ZONES, SO_GETZONELIST

    SO_LOOKUP_ZONES_ON_ADAPTER, SO_GETLOCALZONES

    SO_LOOKUP_NETDEF_ON_ADAPTER, SO_GETNETINFO

    SO_PAP_GET_SERVER_STATUS

    SO_PAP_PRIME_READ

    SO_PAP_SET_SERVER_STATUS

    SO_REGISTER_NAME

    SOL_IRLMP Option Level

    IRLMP_9WIRE_MODE

    IRLMP_ENUMDEVICES

    IRLMP_EXCLUSIVE_MODE

    IRLMP_IAS_QUERY

    IRLMP_IAS_SET

    IRLMP_IRLPT_MODE

    IRLMP_SEND_PDU_LEN

    IPPROTO_IP Option Level

  3. IP_OPTIONS

  4. IP_HDRINCL

    IP_TOS

    IP_TTL

    IP_MULTICAST_IF

    IP_MULTICAST_TTL

    IP_MULTICAST_LOOP

    IP_ADD_MEMBERSHIP

    IP_DROP_MEMBERSHIP

    IP_ADD_SOURCE_MEMBERSHIP

    IP_DROP_SOURCE_MEMBERSHIP

    IP_BLOCK_SOURCE

    IP_UNBLOCK_SOURCE

    IP_DONTFRAGMENT

    IP_PKTINFO

    IPPROTO_IPV6 Option Level

    IPV6_HDRINCL

    IPV6_UNICAST_HOPS

    IPV6_MULTICAST_IF

    IPV6_MULTICAST_HOPS

    IPV6_MULTICAST_LOOP

    IPV6_ADD_MEMBERSHIP, IPV6_JOIN_GROUP

    IPV6_DROP_MEMBERSHIP, IPV6_LEAVE_GROUP

    IPV6_PKTINFO

    IPPROTO_RM Option Level

    RM_RATE_WINDOW_SIZE

    RM_SET_MESSAGE_BOUNDARY

    RM_FLUSHCACHE

    RM_SENDER_WINDOW_ADVANCE_METHOD

    RM_SENDER_STATISTICS

    RM_LATEJOIN

    RM_SET_SEND_IF

    RM_ADD_RECEIVE_IF

    RM_DEL_RECEIVE_IF

    RM_SEND_WINDOW_ADV_RATE

    RM_USE_FEC

    RM_SET_MCAST_TTL

    RM_RECEIVER_STATISTICS

    IPPROTO_TCP Option Level

    TCP_NODELAY

    NSPROTO_IPX Option Level

    IPX_PTYPE

    IPX_FILTERPTYPE

    IPX_STOPFILTERPTYPE

    IPX_DSTYPE

    IPX_EXTENDED_ADDRESS

    IPX_RECVHDR

    IPX_MAXSIZE

    IPX_ADDRESS

    IPX_GETNETINFO

    IPX_GETNETINFO_NORIP

    IPX_SPXGETCONNECTIONSTATUS

    IPX_ADDRESS_NOTIFY

    IPX_MAX_ADAPTER_NUM

    IPX_RERIPNETNUMBER

    IPX_RECEIVE_BROADCAST

    IPX_IMMEDIATESPXACK

    Ioctlsocket(), WSAIoctl(), and WSANSPIoctl()

  5. Standard Ioctl Commands

  6. FIONBIO

    FIONREAD

    SIOCATMARK

    Other Ioctl Commands

    SIO_ENABLE_CIRCULAR_QUEUEING

    SIO_FIND_ROUTE

    SIO_FLUSH

    SIO_GET_BROADCAST_ADDRESS

    SIO_GET_EXTENSION_FUNCTION_POINTER

    SIO_CHK_QOS

    SIO_GET_QOS

    SIO_SET_QOS

    SIO_MULTIPOINT_LOOPBACK

    SIO_MULTICAST_SCOPE

    SIO_KEEPALIVE_VALS

    SIO_RCVALL

    SIO_RCVALL_MCAST

    SIO_RCVALL_IGMPMCAST

    SIO_ROUTING_INTERFACE_QUERY

    SIO_ROUTING_INTERFACE_CHANGE

    SIO_ADDRESS_LIST_QUERY

    SIO_ADDRESS_LIST_SORT

    SIO_ADDRESS_LIST_CHANGE

    SIO_GET_INTERFACE_LIST

    SIO_GET_INTERFACE_LIST_EX

    SIO_GET_MULTICAST_FILTER

    SIO_SET_MULTICAST_FILTER

    SIO_INDEX_BIND

    SIO_INDEX_MCASTIF

    SIO_INDEX_ADD_MCAST

    SIO_INDEX_DEL_MCAST

    SIO_NSP_NOTIFY_CHANGE

    SIO_QUERY_TARGET_PNP_HANDLE

    SIO_UDP_CONNRESET

  7. Secure Socket Layer (SSL) Ioctl Commands

  8. SO_SSL_GET_CAPABILITIES

    SO_SSL_GET_FLAGS

    SO_SSL_SET_FLAGS

    SO_SSL_GET_PROTOCOLS

    SO_SSL_SET_PROTOCOLS

    SO_SSL_SET_VALIDATE_CERT_HOOK

    SO_SSL_PERFORM_HANDSHAKE

    ATM Ioctl Commands

    SIO_GET_NUMBER_OF_ATM_DEVICES

    SIO_GET_ATM_ADDRESS

    SIO_ASSOCIATE_PVC

    SIO_GET_ATM_CONNECTION_ID

    Program Examples

    The Multicast and IP_TTL Option Program Example

  9. The IP_TOS and Type-of-Service Bit Program Example

    The SIO_ADDRESS_LIST_QUERY Program Example

  10. Setting the IOCTL SIO_ENABLE_CIRCULAR_QUEUEING Program Example

  11. The SIO_GET_ATM_ADDRESS Program Example

  12. The SIO_GET_BROADCAST_ADDRESS Program Example

  13. Setting the SO_KEEPALIVE_VALS on a Socket Program Example

  14. Using the IOCTLS SIO_RCVALL, SIO_RCVALL_MCAST and SIO_RCVALL_IGMPMCAST Program Example

  15. Using the SIO_ROUTING_INTERFACE_QUERY Option Program Example

  16. The SO_ACCEPTCONN Option Program Example

    The Broadcast Data and SO_BROADCASt Option Program Example

  17. The SO_MAX_MSG_SIZE Option Program Example

  18. The SO_PROTOCOL_INFO Option Program Example

    The SO_RCVTIMEO Option Program Example

    The SO_TYPE Option Program Example

 

 

Summary

 

Such an enormous variety of socket options and ioctl commands might seem overwhelming at first, but they do allow applications to access protocol-specific characteristics, as well as offer you the capability to fine-tune an application. In some cases, an application must use one or more socket options or ioctls in order to operate, as in the case of AppleTalk or IrDA. Even so, an application will most likely use only a few options at a time. Of course, one of the more frustrating aspects of socket options and ioctls is that not all options or ioctls are available on every Windows platform, causing trouble for those applications that are attempting to be cross-platform-compatible.

 

 

 

 

HOME

 

Custom Search

 

 

< Chap 6: Scalable Winsock2 Applications | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10 | Chap 8: Registration & Name Resolutions >

 

Share and email to your beloved friends and foes: