diff --git a/include/villas/nodes/socket.h b/include/villas/nodes/socket.h index b142c12ac..796e90e84 100644 --- a/include/villas/nodes/socket.h +++ b/include/villas/nodes/socket.h @@ -61,12 +61,6 @@ enum socket_layer { SOCKET_LAYER_UDP }; -enum socket_header { - SOCKET_HEADER_DEFAULT, /**> Default header in the payload, (see msg_format.h) */ - SOCKET_HEADER_NONE, /**> No header in the payload, same as HDR_NONE*/ - SOCKET_HEADER_FAKE /**> Same as SOCKET_HEADER_NONE but using the first three data values as: sequence, seconds & nano-seconds. */ -}; - union sockaddr_union { struct sockaddr sa; struct sockaddr_storage ss; @@ -83,13 +77,7 @@ struct socket { int mark; /**< Socket mark for netem, routing and filtering */ int verify_source; /**< Verify the source address of incoming packets against socket::remote. */ - enum { - SOCKET_ENDIAN_LITTLE, - SOCKET_ENDIAN_BIG - } endian; /**< Endianness of the data sent/received by the node */ - enum socket_layer layer; /**< The OSI / IP layer which should be used for this socket */ - enum socket_header header; /**< Payload header type */ union sockaddr_union local; /**< Local address of the socket */ union sockaddr_union remote; /**< Remote address of the socket */ diff --git a/lib/nodes/socket.c b/lib/nodes/socket.c index 30f557be6..c5b2aa8cb 100644 --- a/lib/nodes/socket.c +++ b/lib/nodes/socket.c @@ -27,7 +27,6 @@ #if defined(__linux__) #include - #include #endif #include "nodes/socket.h" @@ -382,9 +381,7 @@ int socket_parse(struct node *n, json_t *cfg) struct socket *s = n->_vd; const char *local, *remote; - const char *endian = NULL; const char *layer = NULL; - const char *header = NULL; const char *format = "msg"; int ret; @@ -394,14 +391,10 @@ int socket_parse(struct node *n, json_t *cfg) /* Default values */ s->layer = SOCKET_LAYER_UDP; - s->header = SOCKET_HEADER_DEFAULT; - s->endian = SOCKET_ENDIAN_BIG; s->verify_source = 0; - ret = json_unpack_ex(cfg, &err, 0, "{ s?: s, s?: s, s?: s, s: s, s: s, s?: b, s?: o, s?: s }", + ret = json_unpack_ex(cfg, &err, 0, "{ s?: s, s: s, s: s, s?: b, s?: o, s?: s }", "layer", &layer, - "header", &header, - "endian", &endian, "remote", &remote, "local", &local, "verify_source", &s->verify_source, @@ -430,27 +423,6 @@ int socket_parse(struct node *n, json_t *cfg) error("Invalid layer '%s' for node %s", layer, node_name(n)); } - /* Application header */ - if (header) { - if (!strcmp(header, "gtnet-skt") || (!strcmp(header, "none"))) - s->header = SOCKET_HEADER_NONE; - else if (!strcmp(header, "gtnet-skt:fake") || (!strcmp(header, "fake"))) - s->header = SOCKET_HEADER_FAKE; - else if (!strcmp(header, "villas") || !strcmp(header, "default")) - s->header = SOCKET_HEADER_DEFAULT; - else - error("Invalid application header type '%s' for node %s", header, node_name(n)); - } - - if (endian) { - if (!strcmp(endian, "big") || !strcmp(endian, "network")) - s->endian = SOCKET_ENDIAN_BIG; - else if (!strcmp(endian, "little")) - s->endian = SOCKET_ENDIAN_LITTLE; - else - error("Invalid endianness type '%s' for node %s", endian, node_name(n)); - } - ret = socket_parse_addr(local, (struct sockaddr *) &s->local, s->layer, AI_PASSIVE); if (ret) { error("Failed to resolve local address '%s' of node %s: %s",