Back to index

glibc  2.9
Defines | Enumerations | Functions
socket.h File Reference
#include <features.h>
#include <sys/uio.h>
#include <stddef.h>
#include <bits/socket.h>

Go to the source code of this file.

Defines

#define __need_size_t
#define SHUT_RD   SHUT_RD
#define SHUT_WR   SHUT_WR
#define SHUT_RDWR   SHUT_RDWR
#define __SOCKADDR_ARG   struct sockaddr *__restrict
#define __CONST_SOCKADDR_ARG   __const struct sockaddr *

Enumerations

enum  { SHUT_RD = 0, SHUT_RD = 0, SHUT_WR, SHUT_WR }

Functions

int socket (int __domain, int __type, int __protocol) __THROW
int socketpair (int __domain, int __type, int __protocol, int __fds[2]) __THROW
int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) __THROW
int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __THROW
int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len)
int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __THROW
ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags)
ssize_t recv (int __fd, void *__buf, size_t __n, int __flags)
ssize_t sendto (int __fd, __const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len)
ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
ssize_t sendmsg (int __fd, __const struct msghdr *__message, int __flags)
ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags)
int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __THROW
int setsockopt (int __fd, int __level, int __optname, __const void *__optval, socklen_t __optlen) __THROW
int listen (int __fd, int __n) __THROW
int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len)
int shutdown (int __fd, int __how) __THROW

Define Documentation

#define __CONST_SOCKADDR_ARG   __const struct sockaddr *

Definition at line 72 of file socket.h.

#define __need_size_t

Definition at line 29 of file socket.h.

#define __SOCKADDR_ARG   struct sockaddr *__restrict

Definition at line 71 of file socket.h.

#define SHUT_RD   SHUT_RD

Definition at line 57 of file socket.h.

#define SHUT_RDWR   SHUT_RDWR

Definition at line 61 of file socket.h.

#define SHUT_WR   SHUT_WR

Definition at line 59 of file socket.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
SHUT_RD 
SHUT_RD 
SHUT_WR 
SHUT_WR 

Definition at line 54 of file socket.h.

{
  SHUT_RD = 0,              /* No more receptions.  */
#define SHUT_RD             SHUT_RD
  SHUT_WR,           /* No more transmissions.  */
#define SHUT_WR             SHUT_WR
  SHUT_RDWR          /* No more receptions or transmissions.  */
#define SHUT_RDWR    SHUT_RDWR
};

Function Documentation

int accept ( int  __fd,
__SOCKADDR_ARG  __addr,
socklen_t *__restrict  __addr_len 
)
int bind ( int  __fd,
__CONST_SOCKADDR_ARG  __addr,
socklen_t  __len 
)

Here is the caller graph for this function:

int connect ( int  __fd,
__CONST_SOCKADDR_ARG  __addr,
socklen_t  __len 
)

Here is the caller graph for this function:

int getpeername ( int  __fd,
__SOCKADDR_ARG  __addr,
socklen_t *__restrict  __len 
)
int getsockname ( int  __fd,
__SOCKADDR_ARG  __addr,
socklen_t *__restrict  __len 
)

Here is the caller graph for this function:

int getsockopt ( int  __fd,
int  __level,
int  __optname,
void *__restrict  __optval,
socklen_t *__restrict  __optlen 
)
int listen ( int  __fd,
int  __n 
)

Here is the caller graph for this function:

ssize_t recv ( int  __fd,
void *  __buf,
size_t  __n,
int  __flags 
)

Definition at line 35 of file socket2.h.

{
  if (__bos0 (__buf) != (size_t) -1)
    {
      if (!__builtin_constant_p (__n))
       return __recv_chk (__fd, __buf, __n, __bos0 (__buf), __flags);

      if (__n > __bos0 (__buf))
       return __recv_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags);
    }
  return __recv_alias (__fd, __buf, __n, __flags);
}

Here is the call graph for this function:

ssize_t recvfrom ( int  __fd,
void *__restrict  __buf,
size_t  __n,
int  __flags,
__SOCKADDR_ARG  __addr,
socklen_t *__restrict  __addr_len 
)

Definition at line 65 of file socket2.h.

{
  if (__bos0 (__buf) != (size_t) -1)
    {
      if (!__builtin_constant_p (__n))
       return __recvfrom_chk (__fd, __buf, __n, __bos0 (__buf), __flags,
                            __addr, __addr_len);
      if (__n > __bos0 (__buf))
       return __recvfrom_chk_warn (__fd, __buf, __n, __bos0 (__buf), __flags,
                                __addr, __addr_len);
    }
  return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len);
}

Here is the call graph for this function:

Here is the caller graph for this function:

ssize_t recvmsg ( int  __fd,
struct msghdr __message,
int  __flags 
)

Here is the caller graph for this function:

ssize_t send ( int  __fd,
__const void *  __buf,
size_t  __n,
int  __flags 
)

Here is the caller graph for this function:

ssize_t sendmsg ( int  __fd,
__const struct msghdr __message,
int  __flags 
)

Here is the caller graph for this function:

ssize_t sendto ( int  __fd,
__const void *  __buf,
size_t  __n,
int  __flags,
__CONST_SOCKADDR_ARG  __addr,
socklen_t  __addr_len 
)

Here is the caller graph for this function:

int setsockopt ( int  __fd,
int  __level,
int  __optname,
__const void *  __optval,
socklen_t  __optlen 
)

Here is the caller graph for this function:

int shutdown ( int  __fd,
int  __how 
)

Definition at line 29 of file shutdown.c.

{
  __set_errno (ENOSYS);
  return -1;
}

Here is the call graph for this function:

int socket ( int  __domain,
int  __type,
int  __protocol 
)

Here is the caller graph for this function:

int socketpair ( int  __domain,
int  __type,
int  __protocol,
int  __fds[2] 
)