SysSocketCreate

From WhitixDoc

Jump to: navigation, search

SysSocketCreate creates a network socket for use in later socket system calls.

Syntax

int SysSocketCreate(
    int domain,
    int type,
    int flags
)

Parameters

  • domain. The socket family that the new socket will belong to. It can either be NET_LOCAL or NET_INET (see the network API documentation for further information).
  • type. The type of socket. Its value and meaning is dependent on the socket family.
  • flags. Will be used in a future version. Its value is currently ignored by the kernel.

Returns

If the call is sucessful, a new socket is created and a file descriptor (with a value above 0) is returned for use in later socket functions.

If the socket could not be created, one of the standard errors is returned.


Personal tools