|
Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
|
A listener set is unique on (EncapType, localAddress) More...
#include <hicn/io/listener.h>

Go to the source code of this file.
Typedefs | |
| typedef struct listener_set | ListenerSet |
Functions | |
| ListenerSet * | listenerSet_Create (void) |
| void | listenerSet_Destroy (ListenerSet **setPtr) |
| bool | listenerSet_Add (ListenerSet *set, ListenerOps *ops) |
| size_t | listenerSet_Length (const ListenerSet *set) |
| ListenerOps * | listenerSet_Get (const ListenerSet *set, size_t index) |
| ListenerOps * | listenerSet_Find (const ListenerSet *set, EncapType encapType, const Address *localAddress) |
| ListenerOps * | listenerSet_FindById (const ListenerSet *set, unsigned id) |
| int | listenerSet_FindIdByListenerName (const ListenerSet *set, const char *listenerName) |
| void | listenerSet_RemoveById (const ListenerSet *set, unsigned id) |
A listener set is unique on (EncapType, localAddress)
Keeps track of all the running listeners. The set is unique on the encapsulation type and the local address. For example, with TCP encapsulation and local address 127.0.0.1 or Ethernet encapsulation and MAC address 00:11:22:33:44:55.
NOTE: This does not allow multiple EtherType on the same interface because the Address for a LINK address does not include an EtherType.
| bool listenerSet_Add | ( | ListenerSet * | set, |
| ListenerOps * | ops | ||
| ) |
@function listenerSet_Add @abstract Adds the listener to the set @discussion Unique set based on pair (EncapType, localAddress). Takes ownership of the ops memory if added.
| < | param1::> |
| ListenerSet* listenerSet_Create | ( | void | ) |
<#One Line Description#>
<#Paragraphs Of Explanation#>
| [< | in | out in,out#>] <#name#> <#description#> |
| <::value::> | <#explanation#> |
Example:
| void listenerSet_Destroy | ( | ListenerSet ** | setPtr | ) |
<#One Line Description#>
<#Paragraphs Of Explanation#>
| [< | in | out in,out#>] <#name#> <#description#> |
| <::value::> | <#explanation#> |
Example:
| ListenerOps* listenerSet_Find | ( | const ListenerSet * | set, |
| EncapType | encapType, | ||
| const Address * | localAddress | ||
| ) |
Looks up a listener by its key (EncapType, LocalAddress)
<#Paragraphs Of Explanation#>
| [in] | set | An allocated listener set |
| [in] | encapType | the listener type |
| [in] | localAddress | The local bind address (e.g. MAC address or TCP socket) |
| non-null | The listener matching the query |
| null | Does not exist |
Example:
| ListenerOps* listenerSet_FindById | ( | const ListenerSet * | set, |
| unsigned | id | ||
| ) |
Looks up a listener by its id
<#Paragraphs Of Explanation#>
| [in] | set | An allocated listener set |
| [in] | id | of the listener |
| non-null | The listener matching the query |
| null | Does not exist |
Example:
| int listenerSet_FindIdByListenerName | ( | const ListenerSet * | set, |
| const char * | listenerName | ||
| ) |
Looks up a listener by its id
<#Paragraphs Of Explanation#>
| [in] | set | An allocated listener set |
| [in] | name | of the listener |
| greater | or equal to 0 The listener matching the query |
| -1 | Does not exist |
Example:
| ListenerOps* listenerSet_Get | ( | const ListenerSet * | set, |
| size_t | index | ||
| ) |
Returns the listener at the given index
<#Paragraphs Of Explanation#>
| [in] | set | An allocated listener set |
| [in] | index | The index position (0 <= index < listenerSet_Lenght) |
| non-null | The listener at index |
| null | An error |
Example:
| size_t listenerSet_Length | ( | const ListenerSet * | set | ) |
The number of listeners in the set
<#Paragraphs Of Explanation#>
| [in] | set | An allocated listener set |
| <::value::> | <#explanation#> |
Example:
| void listenerSet_RemoveById | ( | const ListenerSet * | set, |
| unsigned | id | ||
| ) |
Remove up a listener by its id
<#Paragraphs Of Explanation#>
| [in] | set | An allocated listener set |
| [in] | id | of the listener |
Example:
1.8.17