32 #ifndef osapi_config_h
41 #include "reda/reda_string.h"
44 #ifndef netio_address_h
45 #include "netio/netio_address.h"
48 #ifndef netio_interface_h
66 struct NETIO_AddressResolverProperty
71 RTI_UINT32 max_interfaces;
76 RTI_INT32 default_low_index;
81 RTI_INT32 default_high_index;
86 RTI_INT32 default_base_port;
92 #define NETIO_AddressResolverProperty_INITIALIZER \
103 typedef struct NETIO_AddressResolver
108 struct NETIO_AddressResolverProperty property;
113 DB_Table_T resolver_table;
119 } NETIO_AddressResolver_T;
121 struct NETIO_AddressResolveEntry;
134 typedef struct NETIO_AddressResolveContext
151 RTI_INT32 high_index;
157 RTI_UINT32 base_port;
162 RTI_INT32 current_index;
167 struct NETIO_AddressResolveEntry *r_entry;
179 char out_address_string[NETIO_ADDRESS_TOKEN_MAX_SIZE];
184 RT_ComponentFactoryId_T intfid;
189 NETIO_RouteKind_T kind;
190 } NETIO_AddressResolveContext_T;
195 #define NETIO_AddressResolveContext_INITIALIZER \
211 MUST_CHECK_RETURN NETIODllExport NETIO_AddressResolver_T*
212 NETIO_AddressResolver_new(
const char *name,
214 struct NETIO_AddressResolverProperty *property);
224 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
225 NETIO_AddressResolver_delete(NETIO_AddressResolver_T *nar);
240 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
241 NETIO_AddressResolver_add_interface(NETIO_AddressResolver_T *nar,
243 NETIO_PortCalculateFunc_T port_resolve,
244 void *port_resolve_param,
245 NETIO_Interface_T *intf);
260 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
261 NETIO_AddressResolver_delete_interface(NETIO_AddressResolver_T *nar,
264 NETIO_Interface_T **intf);
278 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
279 NETIO_AddressResolver_lookup_interface(NETIO_AddressResolver_T *nar,
281 NETIO_Interface_T **intf);
304 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
305 NETIO_AddressResolver_resolve(NETIO_AddressResolver_T *nar,
307 NETIO_RouteKind_T kind,
308 const char *address_string,
309 NETIO_AddressResolveContext_T *context);
325 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
326 NETIO_AddressResolver_get_next(NETIO_AddressResolver_T *nar,
327 NETIO_Interface_T **netio_intf,
328 RT_ComponentFactoryId_T *
id,
329 struct NETIO_Address *address,
330 NETIO_AddressResolveContext_T *context,
341 NETIO_AddressResolveContext_init(NETIO_AddressResolveContext_T *c);
355 struct NETIO_RouteResolverProperty
360 RTI_SIZE_T max_routes;
367 #define NETIO_RouteResolverProperty_INITIALIZER \
372 struct NETIO_RouteResolver;
377 typedef struct NETIO_RouteResolver NETIO_RouteResolver_T;
396 MUST_CHECK_RETURN NETIODllExport NETIO_RouteResolver_T*
397 NETIO_RouteResolver_new(DB_Database_T db,NETIO_AddressResolver_T *nar,
398 const char*
const name,
399 struct NETIO_RouteResolverProperty *
const property);
414 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
415 NETIO_RouteResolver_delete(NETIO_RouteResolver_T *r_table);
436 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
437 NETIO_RouteResolver_add_interface(NETIO_RouteResolver_T *r_table,
438 NETIO_Interface_T *intf,
439 struct NETIO_Address *address,
440 struct NETIO_Netmask *netmask,
460 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
461 NETIO_RouteResolver_delete_interface(NETIO_RouteResolver_T *r_table,
462 NETIO_Interface_T *intf,
463 struct NETIO_Address *address,
464 struct NETIO_Netmask *netmask,
491 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
492 NETIO_RouteResolver_add_route(NETIO_RouteResolver_T *r_table,
493 NETIO_Interface_T *src_intf,
494 struct NETIO_Address *dst_reader,
495 struct NETIO_Address *via_address,
496 struct NETIORouteProperty *property,
517 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
518 NETIO_RouteResolver_delete_route(NETIO_RouteResolver_T *r_table,
519 NETIO_Interface_T *src_intf,
520 struct NETIO_Address *dst_reader,
521 struct NETIO_Address *via_address,
554 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
555 NETIO_RouteResolver_add_peer(NETIO_RouteResolver_T *r_table,
556 NETIO_Interface_T *src_intf,
557 struct NETIO_Address *dst_reader,
558 NETIO_RouteKind_T peer_kind,
559 const char *peer_address,
560 struct NETIORouteProperty *property,
593 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
594 NETIO_RouteResolver_delete_peer(NETIO_RouteResolver_T *r_table,
595 NETIO_Interface_T *src_intf,
596 struct NETIO_Address *dst_reader,
597 NETIO_RouteKind_T peer_kind,
598 const char *peer_address,
611 struct NETIO_BindResolver;
616 typedef struct NETIO_BindResolver NETIO_BindResolver_T;
621 struct NETIO_BindResolverProperty
626 RTI_SIZE_T max_routes;
633 #define NETIO_BindResolverProperty_INITIALIZER \
656 MUST_CHECK_RETURN NETIODllExport NETIO_BindResolver_T*
657 NETIO_BindResolver_new(DB_Database_T db,NETIO_AddressResolver_T *nar,
658 const char*
const name,
659 struct NETIO_BindResolverProperty *
const property);
675 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
676 NETIO_BindResolver_delete(NETIO_BindResolver_T* r_table);
697 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
698 NETIO_BindResolver_add_route(NETIO_BindResolver_T *r_table,
699 NETIO_RouteKind_T kind,
700 RT_ComponentFactoryId_T *
id,
701 struct NETIO_Address *address,
702 NETIO_Interface_T *intf,
723 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
724 NETIO_BindResolver_delete_route(NETIO_BindResolver_T *r_table,
725 NETIO_RouteKind_T kind,
726 RT_ComponentFactoryId_T *
id,
727 struct NETIO_Address *address,
752 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
753 NETIO_BindResolver_lookup_by_name(NETIO_BindResolver_T *r_table,
754 NETIO_RouteKind_T kind,
756 const char *
const name,
757 RT_ComponentFactoryId_T *
id,
758 NETIO_Interface_T **intf,
759 struct NETIO_AddressSeq *resolved);
780 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
781 NETIO_BindResolver_lookup_by_address(NETIO_BindResolver_T *r_table,
782 NETIO_RouteKind_T kind,
783 RT_ComponentFactoryId_T *
id,
784 struct NETIO_Address *address,
785 NETIO_Interface_T **intf);
803 SHOULD_CHECK_RETURN NETIODllExport
RTI_BOOL
804 NETIO_BindResolver_release_addresses(NETIO_BindResolver_T* r_table,
805 struct REDA_StringSeq *transport,
806 NETIO_RouteKind_T kind,
807 struct NETIO_AddressSeq *locator_seq);
832 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
833 NETIO_BindResolver_reserve_addresses(NETIO_BindResolver_T* r_table,
835 struct REDA_StringSeq *transport,
836 NETIO_RouteKind_T kind,
837 struct NETIO_AddressSeq *reserved_address,
838 struct NETIO_AddressSeq *mc_locator_seq,
839 struct NETIO_AddressSeq *uc_locator_seq);
861 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
862 NETIO_BindResolver_unbind(NETIO_BindResolver_T* r_table,
863 struct REDA_StringSeq *transport,
864 NETIO_RouteKind_T kind,
865 struct NETIO_Address *from_address,
866 NETIO_Interface_T *to_intf,
867 struct NETIO_Address *to_address,
889 MUST_CHECK_RETURN NETIODllExport
RTI_BOOL
890 NETIO_BindResolver_bind(NETIO_BindResolver_T* r_table,
891 struct REDA_StringSeq *transport,
892 NETIO_RouteKind_T kind,
893 struct NETIO_Address *from_address,
894 NETIO_Interface_T *to_intf,
895 struct NETIO_Address *to_address,