35 #ifndef RTI_EXPORT_REDA_SEQUENCE
36 #define RTI_EXPORT_REDA_SEQUENCE
39 #ifndef osapi_config_h
42 #ifndef osapi_thread_h
49 #include "reda/reda_string.h"
51 #ifndef reda_sequence_h
52 #include "reda/reda_sequence.h"
57 #ifndef netio_config_h
60 #ifndef netio_address_h
61 #include "netio/netio_address.h"
64 #include "netio/netio_route.h"
75 struct NETIO_Address local_address;
76 struct NETIO_Address public_address;
79 #define UDP_NatEntry_INITIALIZER \
81 NETIO_Address_INITIALIZER,\
82 NETIO_Address_INITIALIZER,\
85 #define T struct UDP_NatEntry
86 #define TSeq UDP_NatEntrySeq
87 #include <reda/reda_sequence_decl.h>
89 #define UDP_NatEntrySeq_INITIALIZER \
90 REDA_DEFINE_SEQUENCE_INITIALIZER(struct UDP_NatEntry)
92 #define UDP_NAT_INITIALIZER UDP_NatEntrySeq_INITIALIZER,
95 #define UDP_NAT_INITIALIZER
102 #define UDP_INTERFACE_MAX_IFNAME 64
108 #define UDP_INTERFACE_INTERFACE_UP_FLAG 0x1
114 #define UDP_INTERFACE_INTERFACE_MULTICAST_FLAG 0x2
119 #define UDP_INTERFACE_MAX_NETMASK_BITS (32)
124 struct DDSCPPDllExport UDP_InterfaceTableEntry
144 char ifname[UDP_INTERFACE_MAX_IFNAME];
151 #define UDP_InterfaceTableEntry_INITIALIZER \
159 #define T struct UDP_InterfaceTableEntry
160 #define TSeq UDP_InterfaceTableEntrySeq
161 #include <reda/reda_sequence_decl.h>
163 #define UDP_InterfaceTableEntrySeq_INITIALIZER \
164 REDA_DEFINE_SEQUENCE_INITIALIZER(struct UDP_InterfaceTableEntry)
168 MUST_CHECK_RETURN NETIODllExport RTI_BOOL
185 NETIODllExport RTI_BOOL
186 UDP_InterfaceFactoryProperty_initialize(
190 NETIODllExport RTI_BOOL
191 UDP_InterfaceFactoryProperty_finalize(
199 #if UDP_TRANSFORMS_ENABLED
214 struct RT_Component _parent;
225 struct RT_ComponentProperty _parent;
241 #define UDP_TransformProperty_INITIALIZER \
243 RT_ComponentProperty_INITIALIZER,\
260 FUNCTION_MUST_TYPEDEF(
264 void **
const context,
265 const struct NETIO_Address *
const destination,
266 const struct NETIO_Netmask *
const netmask,
284 FUNCTION_MUST_TYPEDEF(
287 void **
const context,
288 const struct NETIO_Address *
const source,
289 const struct NETIO_Netmask *
const netmask,
305 FUNCTION_MUST_TYPEDEF(
309 const struct NETIO_Address *
const destination,
310 const struct NETIO_Netmask *
const netmask,
324 FUNCTION_MUST_TYPEDEF(
328 const struct NETIO_Address *
const source,
329 const struct NETIO_Netmask *
const netmask,
345 FUNCTION_MUST_TYPEDEF(
349 const struct NETIO_Address *
const source,
350 const NETIO_Packet_T *
const in_packet,
351 NETIO_Packet_T **out_packet,
367 FUNCTION_MUST_TYPEDEF(
371 const struct NETIO_Address *
const destination,
372 const NETIO_Packet_T *
const in_packet,
373 NETIO_Packet_T **out_packet,
386 struct RT_ComponentI _parent;
419 #define UDP_Transform_create_destination_transform(\
420 self_,context_,destination_,netmask_,user_data_,property_,ec_) \
421 ((struct UDP_TransformI*)self_->_parent._intf)->\
422 create_destination_transform(self_,context_,\
423 destination_,netmask_,user_data_,property_,ec_)
425 #define UDP_Transform_create_source_transform(\
426 self_,context_,source_,netmask_,user_data_,property_,ec_) \
427 ((struct UDP_TransformI*)self_->_parent._intf)->\
428 create_source_transform(self_,context_,\
429 source_,netmask_,user_data_,property_,ec_)
431 #define UDP_Transform_delete_destination_transform(\
432 self_,context_,destination_,netmask_,ec_) \
433 ((struct UDP_TransformI*)self_->_parent._intf)->\
434 delete_destination_transform(self_,context_,destination_,netmask_,ec_)
436 #define UDP_Transform_delete_source_transform(\
437 self_,context_,source_,netmask_,ec_) \
438 ((struct UDP_TransformI*)self_->_parent._intf)->\
439 delete_source_transform(self_,context_,source_,netmask_,ec_)
441 #define UDP_Transform_transform_source(\
442 self_,context_,source_,in_packet_,out_packet_,ec_) \
443 ((struct UDP_TransformI*)self_->_parent._intf)->\
444 transform_source(self_,context_,source_,\
445 in_packet_,out_packet_,ec_)
447 #define UDP_Transform_transform_destination(\
448 self_,context_,destination_,in_packet_,out_packet_,ec_) \
449 ((struct UDP_TransformI*)self_->_parent._intf)->\
450 transform_destination(self_,context_,destination_,\
451 in_packet_,out_packet_,ec_)
453 struct UDP_TransformRule
455 struct NETIO_Address address;
456 struct NETIO_Netmask netmask;
457 RT_ComponentFactoryId_T transformation;
461 #define T struct UDP_TransformRule
462 #define TSeq UDP_TransformRuleSeq
463 #include <reda/reda_sequence_decl.h>
465 #define UDP_TransformRuleSeq_INITIALIZER \
466 REDA_DEFINE_SEQUENCE_INITIALIZER(struct UDP_TransformRule)
470 MUST_CHECK_RETURN NETIODllExport RTI_BOOL
472 struct UDP_TransformRuleSeq *src_rules,
473 RTI_INT32 ipv4_address,
474 RTI_UINT32 ipv4_netmask,
475 const char *transform_name,
480 MUST_CHECK_RETURN NETIODllExport RTI_BOOL
482 struct UDP_TransformRuleSeq *dst_rules,
483 RTI_INT32 ipv4_address,
484 RTI_UINT32 ipv4_netmask,
485 const char *transform_name,
494 #if UDP_TRANSFORMS_ENABLED
522 struct NETIO_InterfaceFactoryProperty _parent;
527 struct REDA_StringSeq allow_interface;
533 struct REDA_StringSeq deny_interface;
568 struct UDP_NatEntrySeq nat;
574 struct UDP_InterfaceTableEntrySeq if_table;
598 struct OSAPI_ThreadProperty recv_thread;
615 #if UDP_TRANSFORMS_ENABLED
620 struct UDP_TransformRuleSeq source_rules;
626 struct UDP_TransformRuleSeq destination_rules;
653 UDP_InterfaceFactoryProperty_initialize(
this);
659 UDP_InterfaceFactoryProperty_finalize(
this);
670 #if UDP_TRANSFORMS_ENABLED
671 #define UDP_TRANSFORMS_INITIALIZER \
672 ,UDP_TransformRuleSeq_INITIALIZER,\
673 UDP_TransformRuleSeq_INITIALIZER,\
674 UDP_TRANSFORM_UDP_MODE_DISABLED,\
675 NETIO_ADDRESS_KIND_TUDPv4
677 #define UDP_TRANSFORMS_INITIALIZER
683 #define UDP_THREAD_PROPERTY_DEFAULT \
685 OSAPI_THREAD_USE_OSDEFAULT_STACKSIZE, \
686 OSAPI_THREAD_PRIORITY_NORMAL, \
687 OSAPI_THREAD_SUSPEND_ENABLE \
697 #define UDP_InterfaceFactoryProperty_INITIALIZER \
699 NETIO_InterfaceFactoryProperty_INITIALIZER,\
700 REDA_StringSeq_INITIALIZER,\
701 REDA_StringSeq_INITIALIZER,\
707 UDP_NAT_INITIALIZER \
708 UDP_InterfaceTableEntrySeq_INITIALIZER,\
712 UDP_THREAD_PROPERTY_DEFAULT, \
714 UDP_TRANSFORMS_INITIALIZER \
717 #define UDP_INTERFACE_INTERFACE_ID RT_MKINTERFACEID(\
718 RT_COMPONENT_CLASS_NETIO,RT_COMPONENT_INSTANCE_UDP)
720 extern NETIODllVariable
725 MUST_CHECK_RETURN NETIODllExport
struct RT_ComponentFactoryI*
732 #undef RTI_EXPORT_REDA_SEQUENCE