#include "common.h"
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <pwd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <grp.h>
#include "server.h"
#include "conftable.h"
#include "conn_handler.h"
#include "connhandlerlist.h"
#include "logger.h"
#include "signal_handler.h"
#include "xmalloc.h"
Include dependency graph for server.c:
Go to the source code of this file.
Functions | |
int | changeUserGroupID () |
used to degrade the user and group. More... | |
int | newServerSocket (unsigned short int port_num) |
create a new server socket. More... | |
int | svCloseConnection (ConnHandler ch) |
closes a client connection and terminates the corresponding ConnHandler the ConnHandler stored in the list's current active node is. More... | |
int | svMain (const int port) |
initialize socket and start server. | |
Variables | |
fd_set | sock_recv_set |
set of sockets currently active. More... | |
fd_set | sock_send_set |
set of sockets with data in send queue. | |
fd_set | sock_recv_ready_set |
sockets with data waiting to be read / sockets ready to send. | |
fd_set | sock_send_ready_set |
sockets with data waiting to be read / sockets ready to send. | |
ConnHandlerList | ch_list |
list of active connection handlers. |
Definition in file server.c.
|
used to degrade the user and group.
this is used for security reasons
Definition at line 308 of file server.c. Referenced by svMain().
|
|
create a new server socket.
Creates and binds a new socket which is then initalized for accepting connections (listen).
Definition at line 77 of file server.c. Referenced by svMain().
|
|
closes a client connection and terminates the corresponding ConnHandler the ConnHandler stored in the list's current active node is.
Terminates the given connection handler and removes the corresponding socket from the set of active sockets. |
|
set of sockets currently active.
|