Allow to dynamically allocate a unique multicast address.
The OKS value of the multicast address is allowed to be * instead of a real IP address. In this case the following procedure is used to allocate a unique MC address across all partitions. The network/netmask part of the string should still be defined, e.g. */10.149.0.0/255.255.0.0. The allocate_multicast_address() method of NameService should be called by a single application in the partition (typically the HLT supervisor). It will first iterate over all existing IS objects of type 'MultiCastGroup' in the RunParams IS server of the initial partition. If it finds an entry which matches its own partition, the multicast address from this object will be used. This means that MC groups will be stable as long as the initial partition is up and running. If the method does not find an entry, it will try to insert a new object which contains the multicast address as a string in its name. This guarantees the uniqueness of the object and therefore address. The method will loop over a range of pre-defined multicast address until insertion succeeds. If the range is exhausted an exception CannotAllocateMulticast is thrown. As a final step either the static or dynamically allocated address and network are published in the local partition in all DFConfig IS servers as an object with the fixed name 'MultiCastAddress'. The lookup_multicast_address() method simply looks up the latter object in its appropriate DFConfig IS server and returns it. Note that the IS object contains both the partition name and the network part, but the latter should always be taken straight from OKS for purposes of configuration. The IS object simply contains it as auxilliary information.
Showing
- asyncmsg/NameService.h 35 additions, 2 deletionsasyncmsg/NameService.h
- schema/MsgInfo_is.schema.xml 13 additions, 4 deletionsschema/MsgInfo_is.schema.xml
- src/MultiCastGroup.h 105 additions, 0 deletionssrc/MultiCastGroup.h
- src/MultiCastGroupNamed.h 105 additions, 0 deletionssrc/MultiCastGroupNamed.h
- src/NameService.cxx 84 additions, 0 deletionssrc/NameService.cxx
src/MultiCastGroup.h
0 → 100644
src/MultiCastGroupNamed.h
0 → 100644
Please register or sign in to comment