R(3)

PACKAGE
r - Low level connection routines

PURPOSE
These routines are meant to provide a low level mechanism to create and accept connections. Although these routines are made public, their use is NOT recommended. The <-conn-> package is the suggested means to create and accept connections.

LIBRARY
karma

LINK WITH
-lkarma

FUNCTIONS

r_check_file_variants
    Test for variants of a filename.

r_fork_and_execvp
    Fork and exec a process in a virtual memory efficient way.

r_alloc_port
    Allocate a Karma port whic can receive connections.

r_close_dock
    Close a dock.

r_connect_to_port
    Make a connection to a Karma port on some machine.

r_udp_alloc
    Create a UDP socket and bind to a random port number.

r_accept_connection_on_dock
    Accept a connection on a dock.

r_close_connection
    Close a connection.

r_get_bytes_readable
    Get bytes readable on a connection.

r_get_inet_addr_from_host
    Get the first listed Internet address of a hostname.

r_read
    Read bytes from a file descriptor.

r_write
    Write bytes to a file descriptor.

r_test_input_event
    Test for activity on a connection.

r_open_stdin
    Open the standard input.

r_open_stdin2
    Open the standard input.

r_getenv
    Get the value of an environment variable.

r_setenv
    Set an environment variable.

r_gethostname
    This routine will determine the local hostname.

r_get_fq_hostname
    This routine will get the fully qualified local hostname.

r_getppid
    Get the parent process ID.

r_open_file
    Open a named file.

r_create_pipe
    Create an un-named pipe.

r_create_socketpair
    Create an un-named pair of connected sockets.

r_get_fd_filetype
    Get filetype for a descriptor.

r_gethostbyaddr
    Get hostname from Internet Address.

r_set_nodelay
    Set the no-delay flag for a descriptor if appropriate.

r_create_exclusive_file
    Exclusively create a file (typically for locking purposes).

r_set_file_lock
    Grab or release the lock on a file.

r_send_fd
    Send a file descriptor over a connection.

r_recv_fd
    Receive a file descriptor over a connection.

r_get_karmabase
    Get the pathname of the installed runtime Karma.

r_get_service_number
    Get service number for a module.

r_get_host_from_display
    Get the hostname in a display string.

r_get_display_num_from_display
    Get display number from a display string.

r_get_screen_num_from_display
    Get the screen number in a display string.

r_get_def_port
    Get the default Karma port number for a module.

TABLE r_FILE_TYPES
List of defined file types
Type Meaning
KFTYPE_DISC Disc (regular file)
KFTYPE_CHARACTER Character device
KFTYPE_FIFO FIFO (pipe)
KFTYPE_UNIX_CONNECTION Unix connection
KFTYPE_LOCAL_tcpIP_CONNECTION TCP/IP connection to local host
KFTYPE_REMOTE_tcpIP_CONNECTION TCP/IP connection to remote host
KFTYPE_DIRECTORY Directory
KFTYPE_BLOCK Block device
KFTYPE_SOCKET Socket
KFTYPE_DANGLING_SYMLINK Dangling symbolic link

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/