diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2024-02-23 09:29:47 +0100 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2024-02-23 16:41:37 +0100 |
commit | e6c2d4c9c6b8b12bbcf7bc8bd494b3ba56133e1f (patch) | |
tree | ad959d95f8fb1f6d4744c57c9027bf182bc3190b /include/ouroboros/protobuf.h | |
parent | dcefa07624926da23a559eedc3f7361ac36e8312 (diff) | |
download | ouroboros-e6c2d4c9c6b8b12bbcf7bc8bd494b3ba56133e1f.tar.gz ouroboros-e6c2d4c9c6b8b12bbcf7bc8bd494b3ba56133e1f.zip |
lib: Revise app flow allocation
This revises the application flow allocator to use the flow_info
struct/message between the components. Revises the messaging to move
the use protocol buffers to its own source (serdes-irm).
Adds a timeout to the IRMd flow allocator to make sure flow
allocations don't hang forever (this was previously taken care of by
the sanitize thread).
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'include/ouroboros/protobuf.h')
-rw-r--r-- | include/ouroboros/protobuf.h | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/include/ouroboros/protobuf.h b/include/ouroboros/protobuf.h index eb292721..9d38afb1 100644 --- a/include/ouroboros/protobuf.h +++ b/include/ouroboros/protobuf.h @@ -23,44 +23,56 @@ #ifndef OUROBOROS_LIB_PROTOBUF_H #define OUROBOROS_LIB_PROTOBUF_H +#include <ouroboros/flow.h> #include <ouroboros/qos.h> #include <ouroboros/ipcp.h> #include <ouroboros/irm.h> +#include <ouroboros/serdes-irm.h> #include <ouroboros/serdes-oep.h> #include "ipcp_config.pb-c.h" typedef IpcpConfigMsg ipcp_config_msg_t; -typedef LayerInfoMsg layer_info_msg_t; -typedef DtConfigMsg dt_config_msg_t; -typedef EthConfigMsg eth_config_msg_t; -typedef UdpConfigMsg udp_config_msg_t; -typedef UniConfigMsg uni_config_msg_t; +typedef DtConfigMsg dt_config_msg_t; +typedef EthConfigMsg eth_config_msg_t; +typedef UdpConfigMsg udp_config_msg_t; +typedef UniConfigMsg uni_config_msg_t; #include "ipcp.pb-c.h" -typedef IpcpMsg ipcp_msg_t; +typedef IpcpMsg ipcp_msg_t; #include "irm.pb-c.h" -typedef IpcpInfoMsg ipcp_info_msg_t; -typedef IpcpListMsg ipcp_list_msg_t; -typedef NameInfoMsg name_info_msg_t; +typedef IrmMsg irm_msg_t; +typedef TimespecMsg timespec_msg_t; +typedef IpcpInfoMsg ipcp_info_msg_t; +typedef IpcpListMsg ipcp_list_msg_t; -#include "qos.pb-c.h" -typedef QosspecMsg qosspec_msg_t; +#include "model.pb-c.h" +typedef FlowInfoMsg flow_info_msg_t; +typedef LayerInfoMsg layer_info_msg_t; +typedef NameInfoMsg name_info_msg_t; +typedef QosspecMsg qosspec_msg_t; #include "enroll.pb-c.h" -typedef EnrollReqMsg enroll_req_msg_t; -typedef EnrollRespMsg enroll_resp_msg_t; -typedef EnrollAckMsg enroll_ack_msg_t; +typedef EnrollReqMsg enroll_req_msg_t; +typedef EnrollRespMsg enroll_resp_msg_t; +typedef EnrollAckMsg enroll_ack_msg_t; /* IPCP configuration */ +timespec_msg_t * timespec_s_to_msg(const struct timespec * s); + +struct timespec timespec_msg_to_s(timespec_msg_t * msg); + +flow_info_msg_t * flow_info_s_to_msg(const struct flow_info * s); + +struct flow_info flow_info_msg_to_s(const flow_info_msg_t * msg); layer_info_msg_t * layer_info_s_to_msg(const struct layer_info * s); struct layer_info layer_info_msg_to_s(const layer_info_msg_t * msg); -ipcp_info_msg_t * ipcp_info_s_to_msg(const struct ipcp_info * s); +ipcp_info_msg_t * ipcp_info_s_to_msg(const struct ipcp_info * s); -struct ipcp_info ipcp_info_msg_to_s(const ipcp_info_msg_t * msg); +struct ipcp_info ipcp_info_msg_to_s(const ipcp_info_msg_t * msg); dt_config_msg_t * dt_config_s_to_msg(const struct dt_config * s); @@ -102,4 +114,4 @@ enroll_ack_msg_t * enroll_ack_s_to_msg(const struct enroll_ack * s); struct enroll_ack enroll_ack_msg_to_s(const enroll_ack_msg_t * msg); -#endif /* OUROBOROS_LIB_PROTOBUF_H */
\ No newline at end of file +#endif /* OUROBOROS_LIB_PROTOBUF_H */ |