2 * Copyright (c) 2016 Mohamed Aslan <maslan@sce.carleton.ca>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26 #define CONFFILENAME ".actl"
28 typedef struct of_protocol
*(*ofp_fptr
)(void);
34 } ofp_vers
[N_OFP_VERS
] = {
35 {"1.0", (ofp_fptr
)of10_protocol
}
39 char *c_nodeid
; /* controller ID */
40 int c_co_port
; /* control port */
41 int c_sw_port
; /* switch port */
42 char *c_ofp_verstr
; /* openflow version string */
43 ofp_fptr c_ofp
; /* openflow version protocol */
44 int c_nreplicas
; /* number of replicas */
45 char *c_app_name
; /* application name */
46 int c_app_argc
; /* app init() argc */
47 char **c_app_argv
; /* app init() argv */
48 void *c_app_so
; /* app dlopen() handle */
49 struct app c_app
; /* app handlers */
50 int c_atime
; /* adaptation time */
51 int c_ltime
; /* learning time */
52 char *c_logfile
; /* log file name */
53 FILE *c_logfp
; /* log file pointer */
54 int c_topo_n
; /* size of topo arrary */
55 struct host_info
**c_topo
; /* topology info */
59 int parse_config(struct config
*, const char *);