|
Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
|
Executes the set of rules dictated by the PacketType. More...
#include <hicn/content_store/contentStoreInterface.h>#include <hicn/core/forwarder.h>#include <hicn/core/message.h>#include <hicn/utils/commands.h>
Go to the source code of this file.
Typedefs | |
| typedef struct message_processor | MessageProcessor |
Functions | |
| MessageProcessor * | messageProcessor_Create (Forwarder *forwarder) |
| void | messageProcessor_Destroy (MessageProcessor **processorPtr) |
| void | messageProcessor_Receive (MessageProcessor *procesor, Message *message) |
| bool | messageProcessor_AddOrUpdateRoute (MessageProcessor *processor, add_route_command *control, unsigned ifidx) |
| bool | messageProcessor_RemoveRoute (MessageProcessor *processor, remove_route_command *control, unsigned ifidx) |
| void | messageProcessor_RemoveConnectionIdFromRoutes (MessageProcessor *processor, unsigned connectionId) |
| FibEntryList * | messageProcessor_GetFibEntries (MessageProcessor *processor) |
| void | messageProcessor_SetContentObjectStoreSize (MessageProcessor *processor, size_t maximumContentStoreSize) |
| ContentStoreInterface * | messageProcessor_GetContentObjectStore (const MessageProcessor *processor) |
| void | messageProcessor_SetCacheStoreFlag (MessageProcessor *processor, bool val) |
| bool | messageProcessor_GetCacheStoreFlag (MessageProcessor *processor) |
| void | messageProcessor_SetCacheServeFlag (MessageProcessor *processor, bool val) |
| bool | messageProcessor_GetCacheServeFlag (MessageProcessor *processor) |
| void | messageProcessor_ClearCache (MessageProcessor *processor) |
| void | processor_SetStrategy (MessageProcessor *processor, Name *prefix, strategy_type strategy, unsigned related_prefixes_len, Name **related_prefixes) |
Executes the set of rules dictated by the PacketType.
This is a "run-to-completion" handling of a message based on the PacketType.
The MessageProcessor also owns the PIT and FIB tables.
| bool messageProcessor_AddOrUpdateRoute | ( | MessageProcessor * | processor, |
| add_route_command * | control, | ||
| unsigned | ifidx | ||
| ) |
Adds or updates a route in the FIB
If the route already exists, it is replaced
| [in] | procesor | An allocated message processor |
| [in] | route | The route to update |
| true | added or updated |
| false | An error |
| MessageProcessor* messageProcessor_Create | ( | Forwarder * | forwarder | ) |
Allocates a MessageProcessor along with PIT, FIB and ContentStore tables
The hicn-light pointer is primarily used for logging (forwarder_Log), getting the configuration, and accessing the connection table.
| [in] | Pointer | to owning hicn-light process |
| non-null | An allocated message processor |
| null | An error |
| void messageProcessor_Destroy | ( | MessageProcessor ** | processorPtr | ) |
Deallocates a message processor an all internal tables
| [in,out] | processorPtr | Pointer to message processor to de-allocate, will be NULL'd. |
| ContentStoreInterface* messageProcessor_GetContentObjectStore | ( | const MessageProcessor * | processor | ) |
Return the interface to the currently instantiated ContentStore, if any.
| [in] | processor | the MessageProcessor from which to return the ContentStoreInterface. |
| FibEntryList* messageProcessor_GetFibEntries | ( | MessageProcessor * | processor | ) |
Returns a list of all FIB entries
You must destroy the list.
| non-null | The list of FIB entries |
| null | An error |
| void messageProcessor_Receive | ( | MessageProcessor * | procesor, |
| Message * | message | ||
| ) |
@function messageProcessor_Receive @abstract Process the message, takes ownership of the memory. @discussion Will call destroy on the memory when done with it, so if the caller wants to keep it, make a reference counted copy.
Receive may modify some fields in the message, such as the HopLimit field.
| void messageProcessor_RemoveConnectionIdFromRoutes | ( | MessageProcessor * | processor, |
| unsigned | connectionId | ||
| ) |
Removes a given connection id from all FIB entries
Iterates the FIB and removes the given connection ID from every route.
| bool messageProcessor_RemoveRoute | ( | MessageProcessor * | processor, |
| remove_route_command * | control, | ||
| unsigned | ifidx | ||
| ) |
Removes a route from the FIB
Removes a specific nexthop for a route. If there are no nexthops left after the removal, the entire route is deleted from the FIB.
| [in] | procesor | An allocated message processor |
| [in] | route | The route to remove |
| true | Route completely removed |
| false | There is still a nexthop for the route |
| void messageProcessor_SetContentObjectStoreSize | ( | MessageProcessor * | processor, |
| size_t | maximumContentStoreSize | ||
| ) |
Adjusts the ContentStore to the given size.
This will destroy and re-create the content store, so any cached objects will be lost.
1.8.17