Cross reference for sk/sk_socket.c of index.

# File sk/sk_socket.c

      $Revision: 1.20 $

      Socket module - routines facilitating calls to socket library.

      Status: NOT REVUED, TESTED

      Basic code adapted by Chris Ottrey from
          http://www.ibrado.com/sock-faq/sfaq.html#faq65 - sample source code.

## Included Files

- `#include "/home/shane/code/RIP/include/rip.h"`
  - `#include </home/shane/code/RIP/include/config.h>`
  - `#include <sys/param.h>`
  - `#include </ncc/dbwork/platforms/yucca-debug/glib-indep/include/glib-1.2/glib.h>`
  - `#include "/home/shane/code/RIP/include/AU_util.h"`
    - `#include <stdio.h>`
    - `#include <stdlib.h>`
    - `#include <string.h>`
    - `#include <sys/types.h>`
    - `#include <unistd.h>`
    - `#include <regex.h>`
    - `#include <glib.h>`
  - `#include "/home/shane/code/RIP/include/aa.h"`
    - `#include "/home/shane/code/RIP/include/iproutines.h"`
      - `#include <sys/types.h>`
      - `#include <glib.h>`
      - `#include </home/shane/code/RIP/include/inet6def.h>`
      - `#include </home/shane/code/RIP/include/erroutines.h>`
  - `#include "/home/shane/code/RIP/include/access_control.h"`
    - `#include "/home/shane/code/RIP/include/erroutines.h"`
    - `#include "/home/shane/code/RIP/include/iproutines.h"`
    - `#include "/home/shane/code/RIP/include/rxroutines.h"`
      - `#include <glib.h>`
      - `#include <pthread.h>`
      - `#include <stubs.h>`
      - `#include </home/shane/code/RIP/include/memwrap.h>`
      - `#include <stdio.h>`
      - `#include <iproutines.h>`
      - `#include <erroutines.h>`
      - `#include "/home/shane/code/RIP/include/sk.h"`
        - `#include "/home/shane/code/RIP/include/stubs.h"`
        - `#include <sys/time.h>`
        - `#include <unistd.h>`
        - `#include <sys/types.h>`
        - `#include <sys/socket.h>`
        - `#include <netinet/in.h>`
        - `#include <netdb.h>`
        - `#include <pthread.h>`
        - `#include <stdlib.h>`
        - `#include <errno.h>`
        - `#include <fcntl.h>`
        - `#include <signal.h>`
        - `#include <stdio.h>`
        - `#include "/home/shane/code/RIP/include/iproutines.h"`
      - `#include "/home/shane/code/RIP/include/thread.h"`
    - `#include "/home/shane/code/RIP/include/mysql_driver.h"`
      - `#include "/usr/local/mysql/include/mysql/mysql.h"`
        - `#include <sys/types.h>`
        - `#include "/usr/local/mysql/include/mysql/mysql_com.h"`
        - `#include "/usr/local/mysql/include/mysql/mysql_version.h"`
      - `#include "/usr/local/mysql/include/mysql/mysqld_error.h"`
      - `#include "/home/shane/code/RIP/include/erroutines.h"`
  - `#include "/home/shane/code/RIP/include/bitmask.h"`
  - `#include "/home/shane/code/RIP/include/ca_adminAttribs.h"`
  - `#include "/home/shane/code/RIP/include/ca_configFns.h"`
    - `#include "/home/shane/code/RIP/include/ca_defs.h"`
      - `#include <pthread.h>`
      - `#include <glib.h>`
    - `#include <memwrap.h>`
    - `#include <erroutines.h>`
  - `#include "/home/shane/code/RIP/include/ca_defs.h"`
  - `#include "/home/shane/code/RIP/include/ca_dictionary.h"`
  - `#include "/home/shane/code/RIP/include/ca_macros.h"`
    - `#include "/home/shane/code/RIP/include/ca_adminAttribs.h"`
  - `#include "/home/shane/code/RIP/include/ca_srcAttribs.h"`
  - `#include "/home/shane/code/RIP/include/comparisons.h"`
  - `#include "/home/shane/code/RIP/include/constants.h"`
    - `#include <glib.h>`
  - `#include "/home/shane/code/RIP/include/defs.h"`
    - `#include <glib.h>`
    - `#include "/home/shane/code/RIP/include/bitmask.h"`
    - `#include "/home/shane/code/RIP/include/DF_class_enum.def"`
    - `#include "/home/shane/code/RIP/include/DF_class_mask.def"`
    - `#include "/home/shane/code/RIP/include/DF_attribute_enum.def"`
    - `#include "/home/shane/code/RIP/include/DF_attribute_inv_attr_mask.def"`
    - `#include "/home/shane/code/RIP/include/which_keytypes.h"`
      - `#include "/home/shane/code/RIP/include/bitmask.h"`
    - `#include "/home/shane/code/RIP/include/iproutines.h"`
    - `#include "/home/shane/code/RIP/include/rxroutines.h"`
  - `#include "/home/shane/code/RIP/include/er_arrays.h"`
    - `#include "/home/shane/code/RIP/include/erroutines.h"`
  - `#include "/home/shane/code/RIP/include/er_aspects.h"`
  - `#include "/home/shane/code/RIP/include/er_facilities.h"`
  - `#include "/home/shane/code/RIP/include/er_formats.h"`
  - `#include "/home/shane/code/RIP/include/er_macro.h"`
    - `#include "/home/shane/code/RIP/include/sk.h"`
  - `#include "/home/shane/code/RIP/include/er_paths.h"`
    - `#include <sys/param.h>`
    - `#include <glib.h>`
  - `#include "/home/shane/code/RIP/include/er_yacc_helper.h"`
  - `#include "/home/shane/code/RIP/include/erroutines.h"`
  - `#include "/home/shane/code/RIP/include/fdwrap.h"`
    - `#include <stdio.h>`
  - `#include "/home/shane/code/RIP/include/mg_getopt.h"`
  - `#include "/home/shane/code/RIP/include/globaldefs.h"`
  - `#include "/home/shane/code/RIP/include/gpg.h"`
    - `#include <netdb.h>`
    - `#include <unistd.h>`
    - `#include "/home/shane/code/RIP/include/mail_parser.h"`
      - `#include "/home/shane/code/RIP/include/gpg.h"`
      - `#include "/home/shane/code/RIP/include/memwrap.h"`
  - `#include "/home/shane/code/RIP/include/inet6def.h"`
  - `#include "/home/shane/code/RIP/include/iproutines.h"`
  - `#include "/home/shane/code/RIP/include/mail_parser.h"`
  - `#include "/home/shane/code/RIP/include/memwrap.h"`
  - `#include "/home/shane/code/RIP/include/mm.h"`
    - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/mail.h"`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/linkage.h"`
    - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/osdep.h"`
      - `#include <string.h>`
      - `#include <sys/types.h>`
      - `#include <stdlib.h>`
      - `#include <dirent.h>`
      - `#include <fcntl.h>`
      - `#include <unistd.h>`
      - `#include <time.h>`
      - `#include <utime.h>`
      - `#include <syslog.h>`
      - `#include <sys/file.h>`
      - `#include <ustat.h>`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/env_unix.h"`
        - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/env.h"`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/fs.h"`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/ftl.h"`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/nl.h"`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/tcp.h"`
      - `#include "/ncc/dbwork/c-client/sparc-sun-solaris2.7/imap-2000a/c-client/lockfix.h"`
    - `#include "/home/shane/code/RIP/include/gpg.h"`
    - `#include "/home/shane/code/RIP/include/mail_parser.h"`
    - `#include "/home/shane/code/RIP/include/memwrap.h"`
    - `#include "/ncc/dbwork/platforms/yucca-debug/glib-indep/include/glib-1.2/glib.h"`
  - `#include "/home/shane/code/RIP/include/mysql_driver.h"`
  - `#include "/home/shane/code/RIP/include/nh.h"`
    - `#include <mysql_driver.h>`
  - `#include "/home/shane/code/RIP/include/notification.h"`
    - `#include <stdarg.h>`
    - `#include <stdio.h>`
    - `#include <strings.h>`
    - `#include <unistd.h>`
    - `#include <stdlib.h>`
    - `#include <time.h>`
    - `#include <glib.h>`
    - `#include "/home/shane/code/RIP/include/UP_util.h"`
      - `#include "/home/shane/code/RIP/include/syntax_api.h"`
  - `#include "/home/shane/code/RIP/include/numconv.h"`
  - `#include "/home/shane/code/RIP/include/pc_commands.h"`
  - `#include "/home/shane/code/RIP/include/properties.h"`
  - `#include "/home/shane/code/RIP/include/protocol_config.h"`
  - `#include "/home/shane/code/RIP/include/protocol_mirror.h"`
    - `#include <glib.h>`
    - `#include "/home/shane/code/RIP/include/mysql_driver.h"`
    - `#include "/home/shane/code/RIP/include/iproutines.h"`
    - `#include "/home/shane/code/RIP/include/aa.h"`
      - `#include "/home/shane/code/RIP/include/iproutines.h"`
  - `#include "/home/shane/code/RIP/include/protocol_whois.h"`
    - `#include "/home/shane/code/RIP/include/query_command.h"`
      - `#include <glib.h>`
      - `#include "/home/shane/code/RIP/include/bitmask.h"`
      - `#include "/home/shane/code/RIP/include/sk.h"`
  - `#include "/home/shane/code/RIP/include/query_command.h"`
  - `#include "/home/shane/code/RIP/include/query_instructions.h"`
    - `#include "/home/shane/code/RIP/include/rxroutines.h"`
    - `#include "/home/shane/code/RIP/include/iproutines.h"`
    - `#include "/home/shane/code/RIP/include/mysql_driver.h"`
    - `#include "/home/shane/code/RIP/include/query_command.h"`
    - `#include "/home/shane/code/RIP/include/defs.h"`
    - `#include "/home/shane/code/RIP/include/which_keytypes.h"`
    - `#include "/home/shane/code/RIP/include/access_control.h"`
    - `#include "/home/shane/code/RIP/include/ca_configFns.h"`
    - `#include "/home/shane/code/RIP/include/ca_dictionary.h"`
    - `#include "/home/shane/code/RIP/include/ca_macros.h"`
    - `#include "/home/shane/code/RIP/include/ca_srcAttribs.h"`
  - `#include "/home/shane/code/RIP/include/rp.h"`
    - `#include <stddef.h>`
    - `#include <glib.h>`
    - `#include <pthread.h>`
    - `#include <defs.h>`
    - `#include <iproutines.h>`
    - `#include <erroutines.h>`
    - `#include <rxroutines.h>`
    - `#include <mysql_driver.h>`
    - `#include "/home/shane/code/RIP/include/ca_defs.h"`
    - `#include <thread.h>`
  - `#include "/home/shane/code/RIP/include/rxroutines.h"`
  - `#include "/home/shane/code/RIP/include/server.h"`
  - `#include "/home/shane/code/RIP/include/sk.h"`
  - `#include "/home/shane/code/RIP/include/stubs.h"`
  - `#include "/home/shane/code/RIP/include/syntax_api.h"`
  - `#include "/home/shane/code/RIP/include/ta.h"`
    - `#include <glib.h>`
    - `#include <pthread.h>`
    - `#include <stdio.h>`
    - `#include "/home/shane/code/RIP/include/stubs.h"`
    - `#include "/home/shane/code/RIP/include/memwrap.h"`
    - `#include "/home/shane/code/RIP/include/sk.h"`
    - `#include "/home/shane/code/RIP/include/timediff.h"`
      - `#include <sys/time.h>`
  - `#include "/home/shane/code/RIP/include/thread.h"`
  - `#include "/home/shane/code/RIP/include/timediff.h"`
  - `#include "/home/shane/code/RIP/include/ud.h"`
  - `#include "/home/shane/code/RIP/include/ud_int.h"`
    - `#include <stdio.h>`
    - `#include <strings.h>`
    - `#include <glib.h>`
    - `#include <stdlib.h>`
    - `#include <ctype.h>`
    - `#include <unistd.h>`
    - `#include "/home/shane/code/RIP/include/defs.h"`
    - `#include "/home/shane/code/RIP/include/mysql_driver.h"`
    - `#include "/home/shane/code/RIP/include/iproutines.h"`
    - `#include "/home/shane/code/RIP/include/erroutines.h"`
    - `#include "/home/shane/code/RIP/include/rp.h"`
    - `#include "/home/shane/code/RIP/include/nh.h"`
    - `#include "/home/shane/code/RIP/include/sk.h"`
    - `#include "/home/shane/code/RIP/include/memwrap.h"`
    - `#include "/home/shane/code/RIP/include/ca_configFns.h"`
    - `#include "/home/shane/code/RIP/include/ca_dictionary.h"`
    - `#include "/home/shane/code/RIP/include/ca_macros.h"`
    - `#include "/home/shane/code/RIP/include/ca_srcAttribs.h"`
    - `#include "/home/shane/code/RIP/include/globaldefs.h"`
    - `#include "/home/shane/code/RIP/include/bitmask.h"`
    - `#include "/home/shane/code/RIP/include/which_keytypes.h"`
  - `#include "/home/shane/code/RIP/include/ud_tr.h"`
    - `#include "/home/shane/code/RIP/include/ud_int.h"`
  - `#include "/home/shane/code/RIP/include/ut_string.h"`
  - `#include "/home/shane/code/RIP/include/wh_queries.h"`
    - `#include "/home/shane/code/RIP/include/sk.h"`
  - `#include "/home/shane/code/RIP/include/which_keytypes.h"`

## Preprocessor definitions

Wait for an incoming connection on the specified socket
int SK_accept_connection The socket for communicating to the client
int listening_socket The socket that the server is bound to
Authors: joao, marek.

`#define MAX_ACCEPT_ERRORS 3`

## Global Variable Lock

`pthread_mutex_t Lock`

Included from | /home/shane/code/RIP/include/ca_defs.h
Visible in: |  | aa/aa.c
|  | ac/access_control.c
|  | ca/ca_configFns.c
|  | ca/ca_initFn.c
|  | ca/ca_sanityCheck.c
|  | ca/ca_sourceLoader.c
|  | ca/ca_values.c
|  | co/constants.c
|  | df/defs.c
|  | er/er.c
|  | er/er_arrays.c
|  | er/er_macro.c
|  | er/er_paths.c
|  | er/er_print.c
|  | ip/ip.c
|  | ma/bitmask.c
|  | mm/mm.c
|  | nh/nh.c
|  | pa/gpg.c
|  | pa/spawn.c
|  | pc/pc_commands.c
|  | pc/protocol_config.c
|  | pm/pm_serials.c
|  | pm/protocol_mirror.c
|  | pr/properties.c
|  | pw/protocol_whois.c
|  | qc/mg_getopt.c
|  | qc/query_command.c
|  | qi/query_instructions.c
|  | rp/rp_convert.c
|  | rp/rp_load.c
|  | rp/rp_search.c
|  | rp/rp_tree.c
|  | rp/rp_update.c
|  | rx/rx_node.c
|  | rx/rx_print.c
|  | rx/rx_search.c
|  | rx/rx_tree.c
|  | sk/cd_socket.c
|  | sk/cd_watchdog.c
|  | sk/sk_socket.c
Used in: | ca_get_adminIntElement() | ca/ca_configFns.c
| ca_get_adminStrElement() | ca/ca_configFns.c
| ca_get_boolean() | ca/ca_configFns.c
| ca_get_dirlist() | ca/ca_configFns.c
| ca_get_int() | ca/ca_configFns.c
| ca_get_string() | ca/ca_configFns.c
| ca_set_boolean() | ca/ca_configFns.c
| ca_srchandle2Intelement() | ca/ca_configFns.c
| ca_srchandle2Strelement() | ca/ca_configFns.c

## Global Function SK_accept_connection()

       Wait for an incoming connection on the specified socket

       int	SK_accept_connection The socket for communicating to the client

      Authors:
    	joao,
    	marek.

`int SK_accept_connection ( int listening_socket )`

`int listening_socket`
  The socket that the server is bound to

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | CO_get_do_server() | co/constants.c
| ER_dbg_va() | er/er.c
| ER_perror() | er/er.c
| ___errno(), accept(), fprintf(), strerror()

## Global Function SK_atoport()

       Take a service name, and a service type, and return a port number.  If the
       service name is not found, it tries it as a decimal number.  The number
       returned is byte ordered for the network.

      char *service   Service name (or port number).

      char *proto     Protocol (eg "tcp").

      Author:
            ottrey.

`int SK_atoport ( const char* service, const char* proto )`

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | getservbyname_r(), strtol()

## Global Function SK_close()

      Author:
            ottrey

`int SK_close ( int socket )`

`int SK_close`
  wrapper around closing the socket. Returns the value returned by close(2)
`int socket`
  socket to be closed

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | ER_dbg_va() | er/er.c
| fdwrap_close()
Called by: | SK_cd_close() | sk/cd_socket.c

## Global Function SK_connect()

      int port          port to connect to

      int timeout       in seconds

      Author: marek

`er_ret_t SK_connect ( int* sock, char* hostname, unsigned int port, unsigned int timeout )`

`er_ret_t SK_connect`
  wrapper around connect(), doing non-blocking connection with timeout
`int* sock`
  pointer to the storage for socket descriptor
`char* hostname`
  host to connect to
`unsigned int port`
  &nbs;
`unsigned int timeout`
  &nbs;

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | ___errno(), bcopy(), bind(), bzero(), connect(), fcntl(), fdwrap_close(), gethostbyname_r(), getsockopt(), memset(), select(), socket()

## Global Function SK_getc()

       This function reads a single character from a socket.

       returns EOF when no character can be read.

`int SK_getc ( int sockfd )`

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | read()

## Global Function SK_getpeerip()

      This function will check the ip of the connected peer and store it in the
      ip_addr_t structure defined in the IP module.

      Author:
    	marek

`int SK_getpeerip ( int sockfd, ip_addr_t* ip )`

`int SK_getpeerip`
  returns 0 on success, -1 on failure.
`int sockfd`
  The socket descriptor (file will result in -1)
`ip_addr_t* ip`
  Pointer to where the address should be stored.

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | IP_addr_s2b() | ip/ip.c
| getpeername(), memset()
Called by: | PC_interact() | pc/protocol_config.c
| PM_interact() | pm/protocol_mirror.c
| SK_cd_make() | sk/cd_socket.c

## Global Function SK_getpeername()

      This function will tell you who is at the other end of a connected stream socket.

      Authors:
            ottrey,
    	marek (modified error handling, made MT-Safe).

`char* SK_getpeername ( int sockfd )`

`char* SK_getpeername`
  Returns allocated string with the IP in it, or "--" if the descriptor is not a socket, or NULL on error.
`int sockfd`
  The socket or file descriptor.

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | inet_ntop() | ip/inet_ntop.c
| UT_malloc_real(), UT_strdup_real(), ___errno(), getpeername(), wr_real_string()
Called by: | PC_interact() | pc/protocol_config.c
| PM_interact() | pm/protocol_mirror.c
| PW_interact() | pw/protocol_whois.c
| SK_cd_make() | sk/cd_socket.c
| er_path_safeguard() | er/er_paths.c

## Global Function SK_gets()

       This function reads from a socket, until it recieves a linefeed
       character.  It fills the buffer "str" up to the maximum size "count".

      Authors:
            ottrey,
    	marek (modified for meaningful error codes).

      Side Effects:
            This function will return -1 if the socket is closed during the read operation.

            Note that if a single line exceeds the length of count, the extra data
            will be read and discarded!  You have been warned.

`int SK_gets ( int sockfd, char* str, size_t count )`

`int SK_gets`
  Returns the total_count of bytes read.
`int sockfd`
  The socket file descriptor.
`char* str`
  The buffer to be written from the socket.
`size_t count`
  The number of bytes in the buffer.

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | ER_dbg_va() | er/er.c
| read()

## Global Function SK_getsock()

       unsigned  port         The port to listen on. Ports < 1024 are
                              reserved for the root user. Host byte order.

      Authors:
            ottrey,
    	joao,
    	marek (added htons conversion for port).

`int SK_getsock ( int socket_type, unsigned h_port, int backlog, uint32_t bind_address )`

`int SK_getsock`
  This function creates a socket and binds to it. Returns the number of the created descriptor/listening socket.
`int socket_type`
  SOCK_STREAM or SOCK_DGRAM (TCP or UDP sockets)
`unsigned h_port`
  &nbs;
`int backlog`
  Size of the backlog queue to be set on that socket.
`uint32_t bind_address`
  Address to bind to, in network order.

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | bind(), exit(), fdwrap_close(), listen(), memset(), perror(), setsockopt(), socket()

## Global Function SK_putc()

      This function writes a single character out to a socket.

`int SK_putc ( int sockfd, char ch, const struct timeval* timeout )`

`int SK_putc`
  Returns the number of characters written.
`int sockfd`
  socket
`char ch`
  character
`const struct timeval* timeout`
  Maximum time to wait between each write() call, or NULL for "forever".

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | SK_write() | sk/sk_socket.c

## Global Function SK_puts()

       This function writes a character string out to a socket.

       char   *str      The buffer to be written from the socket.

`int SK_puts ( int sockfd, const char* str, const struct timeval* timeout )`

`int SK_puts`
  The total_count of bytes written, or -1 on hangup, error, or timeout
`int sockfd`
  The socket file descriptor.
`const char* str`
  &nbs;
`const struct timeval* timeout`
  Maximum time to wait between each write() call, or NULL for "forever".

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | SK_write() | sk/sk_socket.c
| strlen()
Called by: | SK_cd_puts() | sk/cd_socket.c

## Global Function SK_read()

       This is just like the read() system call, except that it will make
       sure that all your data goes through the socket.

      Author:
            ottrey

`int SK_read ( int sockfd, char* buf, size_t count )`

`int SK_read`
  Returns the number of bytes read.
`int sockfd`
  The socket file descriptor.
`char* buf`
  The buffer to be read from the socket.
`size_t count`
  The number of bytes in the buffer.

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | ___errno(), read()

## Global Function SK_write()

`int SK_write ( int sockfd, const char* buf, int count, const struct timeval* timeout, int* count_sent )`

`int SK_write`
  Returns: -1 on error 0 on timeout 1 on success (all bytes written)
`int sockfd`
  The socket file descriptor.
`const char* buf`
  The buffer to be written to the socket.
`int count`
  The number of bytes in the buffer.
`const struct timeval* timeout`
  Maximum time to wait between each write() call, or NULL for "forever".
`int* count_sent`
  Set to the number of bytes sucessfully written. This value is always valid, although it will be less than the total number of bytes to send if the function returns -1 or 0. NULL may be sent if the caller does not care about the number of bytes sent on failure.

Prototyped in: | /home/shane/code/RIP/include/sk.h
Calls: | ER_dbg_va() | er/er.c
| ER_perror() | er/er.c
| ___errno(), memset(), select(), strerror(), write()
Called by: | SK_putc() | sk/sk_socket.c
| SK_puts() | sk/sk_socket.c

## Local Function asctime_r()

`static char* asctime_r ( const struct tm* __tm, char* __buf )`

Included from: | /usr/include/time.h
Calls: | __posix_asctime_r()

## Local Function ctime_r()

`static char* ctime_r ( const time_t* __time, char* __buf )`

Included from: | /usr/include/time.h
Calls: | __posix_ctime_r()

## Local Function getlogin_r()

`static int getlogin_r ( char* __name, int __len )`

Included from: | /usr/include/unistd.h
Calls: | __posix_getlogin_r()

## Local Function readdir_r()

`static int readdir_r ( DIR* __dp, struct dirent* __ent, struct dirent** __res )`

Included from: | /usr/include/dirent.h
Calls: | __posix_readdir_r()

## Local Function sigwait()

`static int sigwait ( const sigset_t* __setp, int* __signo )`

Included from: | /usr/include/signal.h
Calls: | __posix_sigwait()

## Local Function ttyname_r()

`static int ttyname_r ( int __fildes, char* __buf, size_t __size )`

Included from: | /usr/include/unistd.h
Calls: | __posix_ttyname_r()