diff options
author | Dimitri Staessens <[email protected]> | 2021-06-18 17:37:11 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-06-21 08:45:25 +0200 |
commit | 1a13d42a0792a4a12a40c813072355502e87c42f (patch) | |
tree | 9c86f115e7f511482d178956f67af432aa9ee39a /src/ipcpd/ipcp.h | |
parent | 7b13504e2a47a40ae7e5283de41d48ca3f7efb53 (diff) | |
download | ouroboros-1a13d42a0792a4a12a40c813072355502e87c42f.tar.gz ouroboros-1a13d42a0792a4a12a40c813072355502e87c42f.zip |
ipcpd: Move RIB initialization to common ground
This moves Resource Information Base (RIB) initialization into the
ipcp_init() function, so all IPCPs initialize a RIB. The RIB not shows
some common IPCP information, such as the IPCP name, IPCP state and
the layer name if the IPCP is part of a layer.
The initialization of the hash algorithm and layer name was moved out
of the common ipcp source because IPCPs may only know this information
after enrollment. Some IPCPs were not even storing this information.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/ipcp.h')
-rw-r--r-- | src/ipcpd/ipcp.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h index 3ac0f74a..eff2ae12 100644 --- a/src/ipcpd/ipcp.h +++ b/src/ipcpd/ipcp.h @@ -35,6 +35,7 @@ enum ipcp_state { IPCP_NULL = 0, IPCP_INIT, + /* Layer name must be set for states below. */ IPCP_OPERATIONAL, IPCP_SHUTDOWN }; @@ -116,7 +117,8 @@ extern struct ipcp { int ipcp_init(int argc, char ** argv, - struct ipcp_ops * ops); + struct ipcp_ops * ops, + enum ipcp_type type); int ipcp_boot(void); |