Make enum transport_type match the networkProtocol enumeration
This means no conversion is necessary between the transport_type and the networkProtocol field of the PortAddress struct. Not currently an issue, but will be needed for implementing the CLOCK_DESCRIPTION management TLV.master
parent
7607774f30
commit
5c47cbfedf
|
@ -56,6 +56,8 @@ int transport_peer(struct transport *t, struct fdarray *fda, int event,
|
|||
struct transport *transport_create(enum transport_type type)
|
||||
{
|
||||
switch (type) {
|
||||
case TRANS_UDS:
|
||||
return uds_transport_create();
|
||||
case TRANS_UDP_IPV4:
|
||||
return udp_transport_create();
|
||||
case TRANS_UDP_IPV6:
|
||||
|
@ -66,8 +68,6 @@ struct transport *transport_create(enum transport_type type)
|
|||
case TRANS_CONTROLNET:
|
||||
case TRANS_PROFINET:
|
||||
break;
|
||||
case TRANS_UDS:
|
||||
return uds_transport_create();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -24,14 +24,16 @@
|
|||
|
||||
#include "fd.h"
|
||||
|
||||
/* Values from networkProtocol enumeration 7.4.1 Table 3 */
|
||||
enum transport_type {
|
||||
TRANS_UDP_IPV4,
|
||||
/* 0 is Reserved in spec. Use it for UDS */
|
||||
TRANS_UDS = 0,
|
||||
TRANS_UDP_IPV4 = 1,
|
||||
TRANS_UDP_IPV6,
|
||||
TRANS_IEEE_802_3,
|
||||
TRANS_DEVICENET,
|
||||
TRANS_CONTROLNET,
|
||||
TRANS_PROFINET,
|
||||
TRANS_UDS,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue