-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.h
47 lines (41 loc) · 993 Bytes
/
config.h
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
46
47
#ifndef CONFIG_H
#define CONFIG_H
/*
* Standard library imports.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <ifaddrs.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdbool.h>
/*
* Custom MTP imports.
*/
#include "mtp_utils.h" // Access MTP constants.
/*****************************************
* CONSTANTS
*****************************************/
// None
/*****************************************
* STRUCTURES
*****************************************/
/*
Defines the configuration given by the configuration file
and the interface of the compute subnet if its a leaf.
*/
typedef struct Config {
bool isLeaf;
bool isTopSpine;
uint8_t tier;
char computeIntfName[ETH_LEN];
} Config;
/*****************************************
* FUNCTION PROTOTYPES
*****************************************/
void readConfigurationFile(Config *config);
#endif