-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparameters.h
More file actions
45 lines (36 loc) · 976 Bytes
/
parameters.h
File metadata and controls
45 lines (36 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef PARAMETERS
#define PARAMETERS
#include <stdint.h>
#include <netinet/in.h>
#include <stdbool.h>
#include "media_types.h"
#define SCTP_DEFAULT_PORT 9090
#define HTTP_DEFAULT_PORT 8080
#define MAX_PORT 60000
#define MIN_PORT 1024
#define VERSION "0.0.0"
#define ERROR_FILE_DEFAULT "/dev/null"
#define LOCALHOST "127.0.0.1"
#define LISTENING_ADDRESS "0.0.0.0"
#define DEFAULT_MEDIA_TYPES_RANGES ""
#define DEFAULT_COMMAND ""
struct options_struct {
/* Connection Settings */
uint16_t http_port;
char * listen_address;
struct addrinfo * listenadddrinfo;
uint16_t sctp_port;
char * management_address;
struct addrinfo * managementaddrinfo;
/* Logs */
char * error_file;
/* Response settings */
int transformations;
char * command;
char * media_types_input;
struct media_types * mts;
};
typedef struct options_struct * options;
void parse_options(int argc, const char **argv);
extern options parameters;
#endif