popserver.h File Reference

Pop3 server with driver support and multiple threads. More...

Go to the source code of this file.

Data Structures

struct  popserver_functions_t
 These functions are called by the pop3 server. More...

Defines

#define uid_t   int
#define gid_t   int
Error codes
#define POPSERVER_ERR_OK   0
#define POPSERVER_ERR_SYNTAX   1
#define POPSERVER_ERR_NETWORK   2
#define POPSERVER_ERR_AUTH   3
#define POPSERVER_ERR_INTERNAL   4
#define POPSERVER_ERR_NOMSG   5
#define POPSERVER_ERR_LOCKED   6
#define POPSERVER_ERR_EOF   7
#define POPSERVER_ERR_TOOFAST   8
#define POPSERVER_ERR_UNKNOWN   9
Timeout
#define POPSERVER_NOOP_TIMEOUT   60

Functions

void popserver_start (struct popserver_functions_t *f, struct in_addr address, unsigned short port, int maxthreads, int(*set_rights)(uid_t, gid_t), uid_t uid, gid_t gid)
 Starts a pop3 server that uses functions in f and listens on port port.
int popserver_callback (const char *buffer, void *popserver_data)
 retr and top need this


Detailed Description

Pop3 server with driver support and multiple threads.

Author:
Enrico Tassi   <sorry guy>

Definition in file popserver.h.


Define Documentation

#define gid_t   int

Definition at line 26 of file popserver.h.

#define POPSERVER_ERR_AUTH   3

Definition at line 36 of file popserver.h.

#define POPSERVER_ERR_EOF   7

Definition at line 40 of file popserver.h.

#define POPSERVER_ERR_INTERNAL   4

Definition at line 37 of file popserver.h.

#define POPSERVER_ERR_LOCKED   6

Definition at line 39 of file popserver.h.

#define POPSERVER_ERR_NETWORK   2

Definition at line 35 of file popserver.h.

#define POPSERVER_ERR_NOMSG   5

Definition at line 38 of file popserver.h.

#define POPSERVER_ERR_OK   0

Definition at line 33 of file popserver.h.

#define POPSERVER_ERR_SYNTAX   1

Definition at line 34 of file popserver.h.

#define POPSERVER_ERR_TOOFAST   8

Definition at line 41 of file popserver.h.

#define POPSERVER_ERR_UNKNOWN   9

Definition at line 42 of file popserver.h.

#define POPSERVER_NOOP_TIMEOUT   60

Definition at line 47 of file popserver.h.

#define uid_t   int

Definition at line 25 of file popserver.h.


Function Documentation

int popserver_callback ( const char *  buffer,
void *  popserver_data 
)

retr and top need this

Parameters:
buffer is the data to send, terminated
an opaque data pased by the popserver to retr/top

void popserver_start ( struct popserver_functions_t f,
struct in_addr  address,
unsigned short  port,
int  maxthreads,
int(*)(uid_t, gid_t)  set_rights,
uid_t  uid,
gid_t  gid 
)

Starts a pop3 server that uses functions in f and listens on port port.

Parameters:
set_rights a function to loose rights called after bind(). This function must return 0 on success.
maxthreads Upper bound to thread launched to manage incoming connections.


Generated on Sat Nov 1 15:55:53 2008 for FreePOPs by  doxygen 1.5.6