Skip to content

Commit

Permalink
[SQUASH ME] changed iface ID to kernel_pid_t
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesGalore authored and BytesGalore committed Jan 13, 2015
1 parent 22e837f commit a40c811
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 102 deletions.
18 changes: 9 additions & 9 deletions sys/net/include/fib/fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ extern "C" {
* @brief RRP message content to mangle pointer and size to the address
*/
typedef struct rrp_address_msg_t {
uint8_t *address; /**< The pointer to the address */
uint8_t* address; /**< The pointer to the address */
uint8_t address_size; /**< The address size */
} rrp_address_msg_t;
}rrp_address_msg_t;

/**
* @brief message type used for notifying the RRPs
Expand All @@ -55,7 +55,7 @@ void fib_deinit(void);
/**
* @brief Registration of reactive routing protocol handler function
*/
void fib_register_rrp(void);
void fib_register_rrp( void );

/**
* @brief Adds a new entry in the corresponding FIB table for global destination and next hop
Expand All @@ -70,7 +70,7 @@ void fib_register_rrp(void);
* @return FIB_SUCCESS on success
* FIB_ERROR if the entry cannot be created due to unsufficient RAM
*/
int fib_table_add_entry(uint8_t iface_id, uint8_t *glob_dst, size_t glob_dst_size, uint8_t *next_hop, size_t next_hop_size, uint32_t lifetime);
int fib_table_add_entry( kernel_pid_t iface_id, uint8_t* glob_dst, size_t glob_dst_size, uint8_t* next_hop, size_t next_hop_size, uint32_t lifetime );

/**
* @brief Updates an entry in the corresponding FIB table for global destination and next hop
Expand All @@ -85,15 +85,15 @@ int fib_table_add_entry(uint8_t iface_id, uint8_t *glob_dst, size_t glob_dst_siz
* @return FIB_SUCCESS on success
* FIB_ERROR if the entry cannot be updated due to unsufficient RAM
*/
int fib_table_upd_entry(uint8_t iface_id, uint8_t *glob_dst, size_t glob_dst_size, uint8_t *next_hop, size_t next_hop_size, uint32_t lifetime);
int fib_table_upd_entry( kernel_pid_t iface_id, uint8_t* glob_dst, size_t glob_dst_size, uint8_t* next_hop, size_t next_hop_size, uint32_t lifetime );

/**
* @brief removes an entry from the corresponding FIB table
*
* @param[in] glob_dst the destination address
* @param[in] glob_dst_size the destination address size
*/
void fib_table_rem_entry(uint8_t *glob_dst, size_t glob_dst_size);
void fib_table_rem_entry( uint8_t* glob_dst, size_t glob_dst_size );

/**
* @brief provides a next hop for a given destination
Expand All @@ -110,18 +110,18 @@ void fib_table_rem_entry(uint8_t *glob_dst, size_t glob_dst_size);
* all RRPs are notified before the return
* FIB_ERROR_INSUFICCIENT_OUT_SIZE if the size for the next hop address is insufficient low
*/
int fib_get_next_hop(uint8_t *glob_dst, size_t glob_dst_size, uint8_t *iface_id, uint8_t *next_hop, size_t *next_hop_size);
int fib_get_next_hop( uint8_t* glob_dst, size_t glob_dst_size, kernel_pid_t* iface_id, uint8_t* next_hop, size_t* next_hop_size );

/**
* @brief Prints the kernel_pid_t for all registered RRPs
*/
void fib_print_notify_rrp(void);
void fib_print_notify_rrp( void );

/**
* @brief Prints the content of all FIB tables
* does not print the entries
*/
void fib_print_fib_table(void);
void fib_print_fib_table( void );

#ifdef __cplusplus
}
Expand Down
8 changes: 4 additions & 4 deletions sys/net/include/fib/fib_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ extern "C" {
#endif

typedef struct fib_entry_t {
uint8_t iface_id; /**< interface ID */
kernel_pid_t iface_id; /**< interface ID */
uint32_t lifetime; /**< Lifetime of this entry in ms */
uint8_t global_type; /**< Unique identifier for the type of the global address */
struct universal_address_container_t *global; /**< Pointer to the shared generic address */
struct universal_address_container_t* global; /**< Pointer to the shared generic address */
uint8_t next_hop_type; /**< Unique identifier for the type of the next hop address */
struct universal_address_container_t *next_hop; /**< Pointer to the shared generic address */
} fib_entry_t;
struct universal_address_container_t* next_hop; /**< Pointer to the shared generic address */
}fib_entry_t;

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit a40c811

Please sign in to comment.