diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/CMakeLists.txt | 4 | ||||
-rw-r--r-- | include/ouroboros/common.h | 6 | ||||
-rw-r--r-- | include/ouroboros/dev.h | 1 | ||||
-rw-r--r-- | include/ouroboros/errno.h (renamed from include/ouroboros/da.h) | 18 | ||||
-rw-r--r-- | include/ouroboros/flow.h | 6 | ||||
-rw-r--r-- | include/ouroboros/ipcp.h | 2 | ||||
-rw-r--r-- | include/ouroboros/irm.h | 2 | ||||
-rw-r--r-- | include/ouroboros/nsm.h | 43 |
8 files changed, 60 insertions, 22 deletions
diff --git a/include/ouroboros/CMakeLists.txt b/include/ouroboros/CMakeLists.txt index 8347f928..c5f65d49 100644 --- a/include/ouroboros/CMakeLists.txt +++ b/include/ouroboros/CMakeLists.txt @@ -4,14 +4,14 @@ configure_file( set(HEADER_FILES cdap.h - da.h dev.h dif_config.h + errno.h flow.h instance_name.h irm.h + nsm.h qos.h - time_utils.h ) install(FILES ${HEADER_FILES} DESTINATION usr/include/ouroboros) diff --git a/include/ouroboros/common.h b/include/ouroboros/common.h index f2c8a9ec..039e1a83 100644 --- a/include/ouroboros/common.h +++ b/include/ouroboros/common.h @@ -39,4 +39,10 @@ enum qos_cube { QOS_CUBE_VIDEO }; +enum flow_state { + FLOW_NULL = 0, + FLOW_PENDING, + FLOW_ALLOCATED +}; + #endif /* OUROBOROS_COMMON_H */ diff --git a/include/ouroboros/dev.h b/include/ouroboros/dev.h index ee253ff8..897bc124 100644 --- a/include/ouroboros/dev.h +++ b/include/ouroboros/dev.h @@ -29,7 +29,6 @@ #ifndef OUROBOROS_DEV_H #define OUROBOROS_DEV_H -#define UNKNOWN_AP "__UNKNOWN_AP__" #define UNKNOWN_AE "__UNKNOWN_AE__" /* These calls should be removed once we write the ouroboros OS. */ diff --git a/include/ouroboros/da.h b/include/ouroboros/errno.h index 406be7a8..62629134 100644 --- a/include/ouroboros/da.h +++ b/include/ouroboros/errno.h @@ -1,7 +1,7 @@ /* * Ouroboros - Copyright (C) 2016 * - * The API to consult the DIF Allocator + * Ouroboros specific error numbers * * Sander Vrijders <[email protected]> * @@ -20,18 +20,12 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef OUROBOROS_DA_H -#define OUROBOROS_DA_H +#ifndef OUROBOROS_ERRNO_H +#define OUROBOROS_ERRNO_H -#include <stdint.h> -#include <unistd.h> +#include <errno.h> -char * da_resolve_daf(char * daf_name); -/* - * n_1_difs is an out parameter - * The amount of n_1_difs is returned - */ -ssize_t da_resolve_dap(char * name, - char ** n_1_difs); +#define ENOTALLOC 1000 /* Flow is not allocated */ +#define EIPCPTYPE 1001 /* Unknown IPCP type */ #endif diff --git a/include/ouroboros/flow.h b/include/ouroboros/flow.h index aa377034..754c7632 100644 --- a/include/ouroboros/flow.h +++ b/include/ouroboros/flow.h @@ -37,10 +37,4 @@ #define FLOW_F_GETFL 00000001 #define FLOW_F_SETFL 00000002 -enum flow_state { - FLOW_NULL = 0, - FLOW_PENDING, - FLOW_ALLOCATED -}; - #endif /* OUROBOROS_FLOW_H */ diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h index 89b9fa92..0d62bd59 100644 --- a/include/ouroboros/ipcp.h +++ b/include/ouroboros/ipcp.h @@ -46,7 +46,7 @@ int ipcp_unreg(pid_t pid, size_t difs_size); int ipcp_enroll(pid_t pid, - char * member_name, + char * dif_name, char * n_1_dif); int ipcp_bootstrap(pid_t pid, diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h index 9d547643..743ed79c 100644 --- a/include/ouroboros/irm.h +++ b/include/ouroboros/irm.h @@ -46,9 +46,11 @@ int irm_reg(char * name, bool autoexec, char ** difs, size_t difs_size); + int irm_unreg(char * name, const instance_name_t * api, char ** difs, size_t difs_size, bool hard); + #endif /* OUROBOROS_IRM_H */ diff --git a/include/ouroboros/nsm.h b/include/ouroboros/nsm.h new file mode 100644 index 00000000..69b1d9d2 --- /dev/null +++ b/include/ouroboros/nsm.h @@ -0,0 +1,43 @@ +/* + * Ouroboros - Copyright (C) 2016 + * + * The API to instruct the global Namespace Manager + * + * Sander Vrijders <[email protected]> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef OUROBOROS_NSM_H +#define OUROBOROS_NSM_H + +#include <stdint.h> +#include <unistd.h> + +int nsm_reg(char * name, + char ** dafs, + size_t dafs_size); + +int nsm_unreg(char * name, + char ** dafs, + size_t dafs_size); + +/* + * dafs is an out parameter + * The amount of DAFs is returned + */ +ssize_t nsm_resolve(char * name, + char ** dafs); +#endif |