#ifndef __PJNATH_SERVER__
#define __PJNATH_SERVER__

#include <pjlib.h>

#define IPADDRLEN 16

typedef struct server_options
{
    char	*realm;
    char	*user_name;
    char	*password;
    char	*nonce;
    pj_bool_t	 use_fingerprint;
    int   stun_srv_port;
} ServerOptions ;

typedef struct pjnath_turn_allocation {

  unsigned short  relayport;
  char            ip[IPADDRLEN];
  unsigned short  port;
  long            sbw;
  long            rbw;

} pjnath_turn_allocation;

int get_stun_srv_port();


/**
 * initialize STUN/TUEN server
 */
int init_server(struct server_options *options);

/**
 *shutdown STUN/TURN server
 */
void shutdown_server(int a);

void print_server_resource_usage();

void getsendrecvbw(long* sbw, long* rbw);

void get_turn_allocations(pjnath_turn_allocation *arr, int *len);

#endif
