From 9903b8a2f9a7dc8ebac6928dcf2d2b5593ea0615 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Fri, 12 May 2017 13:05:47 +0200 Subject: ipcpd: Allow specifying fixed syntax This commits adds the functions and messages to specify a fixed protocol syntax during CACEP. It also revises the messages for specifying the DT protocol syntax from the irm tool. --- include/ouroboros/ipcp.h | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'include/ouroboros/ipcp.h') diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h index f418d640..05fdcd49 100644 --- a/include/ouroboros/ipcp.h +++ b/include/ouroboros/ipcp.h @@ -57,22 +57,22 @@ enum hash_algo { HASH_SHA3_512 }; +#define DIF_NAME_SIZE 256 + +struct dif_info { + char dif_name[DIF_NAME_SIZE]; + enum hash_algo dir_hash_algo; +}; + struct ipcp_config { - char * dif_name; + struct dif_info dif_info; + enum ipcp_type type; - enum hash_algo dir_hash_algo; - /* Normal DIF */ + /* DT syntax */ uint8_t addr_size; - uint8_t cep_id_size; - uint8_t pdu_length_size; - uint8_t seqno_size; - + uint8_t fd_size; bool has_ttl; - bool has_chk; - - uint32_t min_pdu_size; - uint32_t max_pdu_size; enum pol_addr_auth addr_auth_type; enum pol_gam dt_gam_type; @@ -86,12 +86,4 @@ struct ipcp_config { char * if_name; }; -#define DIF_NAME_SIZE 256 - -/* capability report of a DIF */ -struct dif_info { - enum hash_algo algo; - char dif_name[DIF_NAME_SIZE]; -}; - #endif /* OUROBOROS_IPCP_H */ -- cgit v1.2.3