struct pcep_config_group_opts {
char name[64];
- char tcp_md5_auth[TCP_MD5SIG_MAXKEYLEN];
+ char tcp_md5_auth[PCEP_MD5SIG_MAXKEYLEN];
struct ipaddr source_ip;
short source_port;
bool draft07;
#endif
#if defined(linux) || defined(GNU_LINUX)
-//#include <netinet/in.h>
+
#define ipv6_u __in6_u
#else
-// bsd family
-#define TCP_MD5SIG_MAXKEYLEN 80
-//#include <netinet/in.h>
+/* bsd family */
#define ipv6_u __u6_addr
#ifdef __FreeBSD__
#include <sys/endian.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <pthread.h>
+
+/* Cross-compilation seems to have trouble finding this */
+#if defined(TCP_MD5SIG_MAXKEYLEN)
+#define PCEP_MD5SIG_MAXKEYLEN TCP_MD5SIG_MAXKEYLEN
+#else
+#define PCEP_MD5SIG_MAXKEYLEN 80
+#endif
+
#endif
char dest_ip_str[MAX_DST_IP_STR];
short src_tcp_port;
short dest_tcp_port;
- char tcp_md5_str[TCP_MD5SIG_MAXKEYLEN]; /* RFC 2385 */
+ char tcp_md5_str[PCEP_MD5SIG_MAXKEYLEN]; /* RFC 2385 */
bool is_ipv6;
bool eventpoll; /* poll for pcep_event's, or use callback (default) */
};
struct pcep_versioning *pcep_msg_versioning;
- char tcp_authentication_str[TCP_MD5SIG_MAXKEYLEN];
+ char tcp_authentication_str[PCEP_MD5SIG_MAXKEYLEN];
bool is_tcp_auth_md5; /* true: RFC 2385, false: RFC 5925 */
} pcep_configuration;
int received_bytes;
bool close_after_write;
void *external_socket_data; /* used for external socket infra */
- char tcp_authentication_str[TCP_MD5SIG_MAXKEYLEN
- + 1]; /* should be used with is_tcp_auth_md5
- flag */
+ /* should be used with is_tcp_auth_md5 flag */
+ char tcp_authentication_str[PCEP_MD5SIG_MAXKEYLEN + 1];
+
bool is_tcp_auth_md5; /* flag to distinguish between rfc 2385 (md5) and
rfc 5925 (tcp-ao) */