Correctly format forwarding.c
//=========================== prototypes ======================================
-void forwarding_getNextHop(
- open_addr_t* destination,
- open_addr_t* addressToWrite
-);
+void forwarding_getNextHop(open_addr_t *destination, open_addr_t *addressToWrite);
+
owerror_t forwarding_send_internal_RoutingTable(
OpenQueueEntry_t *msg,
ipv6_header_iht *ipv6_outer_header,
@@ -31,6 +29,7 @@ owerror_t forwarding_send_internal_RoutingTable(
uint32_t *flow_label,
uint8_t fw_SendOrfw_Rcv
);
+
owerror_t forwarding_send_internal_SourceRouting(
OpenQueueEntry_t *msg,
ipv6_header_iht *ipv6_outer_header,
@@ -40,15 +39,11 @@ owerror_t forwarding_send_internal_SourceRouting(
#endif
rpl_option_ht *rpl_option
);
-void forwarding_createRplOption(
- rpl_option_ht* rpl_option,
- uint8_t flags
-);
+
+void forwarding_createRplOption(rpl_option_ht *rpl_option, uint8_t flags);
#ifdef DEADLINE_OPTION_ENABLED
-void forwarding_createDeadlineOption(
- deadline_option_ht* deadline_option
-);
+void forwarding_createDeadlineOption( deadline_option_ht* deadline_option);
#endif
//=========================== public ==========================================
@@ -117,7 +112,8 @@ owerror_t forwarding_send(OpenQueueEntry_t* msg) {
myprefix = &temp_src_prefix;
sac = IPHC_SAC_STATELESS;
dac = IPHC_DAC_STATELESS;
- } else if (packetfunctions_sameAddress(&temp_dest_prefix,idmanager_getMyID(ADDR_PREFIX))==FALSE && packetfunctions_isBroadcastMulticast(&(msg->l3_destinationAdd))==FALSE) {
+ } else if (packetfunctions_sameAddress(&temp_dest_prefix, idmanager_getMyID(ADDR_PREFIX)) == FALSE &&
+ packetfunctions_isBroadcastMulticast(&(msg->l3_destinationAdd)) == FALSE) {
myprefix = idmanager_getMyID(ADDR_PREFIX);
sac = IPHC_SAC_STATELESS;
dac = IPHC_DAC_STATELESS;
@@ -502,7 +498,8 @@ owerror_t forwarding_send_internal_RoutingTable(
) {
if (neighbors_isStableNeighbor(&(msg->l3_destinationAdd)) || msg->is_cjoin_response) {
// IP destination is 1-hop neighbor, send directly
- packetfunctions_ip128bToMac64b(&(msg->l3_destinationAdd),&temp_prefix64btoWrite,&(msg->l2_nextORpreviousHop));
+ packetfunctions_ip128bToMac64b(&(msg->l3_destinationAdd), &temp_prefix64btoWrite,
+ &(msg->l2_nextORpreviousHop));
}
} else {
forwarding_getNextHop(&(msg->l3_destinationAdd), &(msg->l2_nextORpreviousHop));
