Contiki 2.5
|
Files | |
file | agent.c |
file | agent.h |
file | bundleslot.c |
Bundle Slot memory management. | |
file | bundleslot.h |
Header for Bundle Slot memory management. | |
file | delivery.c |
file | delivery.h |
Headerfile for Bundle delivery. | |
file | dispatching.c |
file | dispatching.h |
Bundle dispatching module. | |
file | registration.h |
Handle Service Registrations. | |
Data Structures | |
struct | registration |
structure of registration More... | |
Macros | |
#define | LOG_NET 0 |
uDTN log domains | |
Functions | |
void | agent_init (void) |
Bundle Protocols initialisation. More... | |
void | delivery_unblock_service (struct mmem *bundlemem) |
unblocks a service that was previously delivering a bundle More... | |
int | delivery_deliver_bundle (struct mmem *bundlemem) |
Delivers bundle to a local service. More... | |
int | dispatching_check_report (struct mmem *bundlemem) |
This function checks, whether an incoming admin record is a bundle delivery report. More... | |
int | dispatching_dispatch_bundle (struct mmem *bundlemem) |
Handles Admin Records, custody bundles and regular bundles. More... | |
void | registration_init (void) |
called by agent at startup | |
int | registration_new_application (uint32_t app_id, struct process *application_process, uint32_t node_id) |
registers a new service More... | |
void | registration_remove_application (uint32_t app_id, uint32_t node_id) |
deletes registration of service More... | |
int | registration_set_active (uint32_t app_id, uint32_t node_id) |
sets state of service active More... | |
int | registration_set_passive (uint32_t app_id, uint32_t node_id) |
sets state of service passive More... | |
int | registration_return_status (uint32_t app_id, uint32_t node_id) |
Returns the status of a registred service. More... | |
struct process * | registration_get_process (uint32_t app_id, uint32_t node_id) |
returns the process struct for a specific registration More... | |
uint32_t | registration_get_application_id (struct process *application_process) |
provides the endpoint id of a registred process (if any) More... | |
uint8_t | registration_is_local (uint32_t app_id, uint32_t node_id) |
Checks whether the bundle is for a local process. More... | |
void agent_init | ( | void | ) |
Bundle Protocols initialisation.
called by contikis main function
Definition at line 47 of file agent.c.
References NULL, process_is_running(), and process_start().
int delivery_deliver_bundle | ( | struct mmem * | bundlemem | ) |
Delivers bundle to a local service.
delivers bundle to a registered service
bundlemem | Pointer to the MMEM bundle representation |
bundlemem | Pointer to MMEM structure |
Definition at line 77 of file delivery.c.
References bundle_decrement(), BUNDLE_STORAGE, clock_time(), CUSTODY, list_head(), list_item_next(), MMEM_PTR, NO_ADDITIONAL_INFORMATION, NULL, process_post(), statistics_bundle_delivered(), STATUSREPORT, and submit_data_to_application_event.
Referenced by routing_epidemic_send_to_local(), and routing_flooding_send_to_local().
void delivery_unblock_service | ( | struct mmem * | bundlemem | ) |
unblocks a service that was previously delivering a bundle
bundlemem | Pointer to MMEM structure |
Definition at line 34 of file delivery.c.
References bundle_decrement(), BUNDLE_STORAGE, list_head(), list_item_next(), MMEM_PTR, and NULL.
Referenced by routing_epidemic_bundle_delivered_locally(), and routing_flooding_bundle_delivered_locally().
int dispatching_check_report | ( | struct mmem * | bundlemem | ) |
This function checks, whether an incoming admin record is a bundle delivery report.
If so, the corresponding bundle is deleted from storage
bundlemem | Pointer to the MMEM struct containing the bundle |
Definition at line 39 of file dispatching.c.
References bundle_get_payload_block(), bundle_number, BUNDLE_STORAGE, HASH, MMEM_PTR, NULL, and TYPE_CODE_BUNDLE_STATUS_REPORT.
Referenced by dispatching_dispatch_bundle().
int dispatching_dispatch_bundle | ( | struct mmem * | bundlemem | ) |
Handles Admin Records, custody bundles and regular bundles.
bundlemem | Pointer to MMEM structure |
Definition at line 91 of file dispatching.c.
References bundle_decrement(), bundle_number, BUNDLE_STORAGE, CUSTODY, dispatching_check_report(), HASH, MMEM_PTR, NO_ADDITIONAL_INFORMATION, NODE_RECEIVED_BUNDLE, NULL, process_post(), REDUNDANCE, and STATUSREPORT.
uint32_t registration_get_application_id | ( | struct process * | application_process | ) |
provides the endpoint id of a registred process (if any)
application_process | Pointer to the process |
Definition at line 174 of file registration.c.
References list_head(), list_item_next(), and NULL.
|
read |
returns the process struct for a specific registration
app_id | Service identifier |
node_id | Node ID |
Definition at line 81 of file registration.c.
References list_head(), list_item_next(), and NULL.
uint8_t registration_is_local | ( | uint32_t | app_id, |
uint32_t | node_id | ||
) |
Checks whether the bundle is for a local process.
app_id | Service Identifier |
node_id | Node Identifier |
Definition at line 187 of file registration.c.
References list_head(), list_item_next(), and NULL.
Referenced by routing_epidemic_new_bundle(), and routing_flooding_new_bundle().
int registration_new_application | ( | uint32_t | app_id, |
struct process * | application_process, | ||
uint32_t | node_id | ||
) |
registers a new service
app_id | id of service |
application_process | pointer to service |
node_id | Node ID |
Definition at line 46 of file registration.c.
References list_add(), list_head(), list_item_next(), memb_alloc(), and NULL.
void registration_remove_application | ( | uint32_t | app_id, |
uint32_t | node_id | ||
) |
deletes registration of service
app_id | service id |
node_id | Node ID |
Definition at line 98 of file registration.c.
References list_head(), list_item_next(), list_remove(), memb_free(), and NULL.
int registration_return_status | ( | uint32_t | app_id, |
uint32_t | node_id | ||
) |
Returns the status of a registred service.
app_id | id of service |
node_id | Node ID |
Definition at line 157 of file registration.c.
References list_head(), list_item_next(), and NULL.
int registration_set_active | ( | uint32_t | app_id, |
uint32_t | node_id | ||
) |
sets state of service active
app_id | id of service |
node_id | Node ID |
Definition at line 114 of file registration.c.
References list_head(), list_item_next(), and NULL.
int registration_set_passive | ( | uint32_t | app_id, |
uint32_t | node_id | ||
) |
sets state of service passive
app_id | id of service |
node_id | Node ID |
Definition at line 135 of file registration.c.
References list_head(), list_item_next(), and NULL.