Skip to content

Commit

Permalink
Merge pull request RIOT-OS#353 from OlegHahm/rpl_send
Browse files Browse the repository at this point in the history
removed superfluous parameter in rpl_send()
  • Loading branch information
OlegHahm authored and thomaseichinger committed Dec 9, 2013
2 parents b1ef967 + ddaa80a commit dcacf55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions sys/net/rpl/rpl.c
Expand Up @@ -316,7 +316,7 @@ void send_DIO(ipv6_addr_t *destination)


uint16_t plen = ICMPV6_HDR_LEN + DIO_BASE_LEN + opt_hdr_len;
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6, NULL);
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6);
mutex_unlock(&rpl_send_mutex);
}

Expand All @@ -332,7 +332,7 @@ void send_DIS(ipv6_addr_t *destination)
rpl_send_dis_buf = get_rpl_send_dis_buf();

uint16_t plen = ICMPV6_HDR_LEN + DIS_BASE_LEN;
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6, NULL);
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6);
mutex_unlock(&rpl_send_mutex);
}

Expand Down Expand Up @@ -428,7 +428,7 @@ void send_DAO(ipv6_addr_t *destination, uint8_t lifetime, bool default_lifetime,
opt_len += RPL_OPT_TRANSIT_LEN + 2;

uint16_t plen = ICMPV6_HDR_LEN + DAO_BASE_LEN + opt_len;
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6, NULL);
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6);
mutex_unlock(&rpl_send_mutex);

if (continue_index > 1) {
Expand Down Expand Up @@ -459,7 +459,7 @@ void send_DAO_ACK(ipv6_addr_t *destination)
rpl_send_dao_ack_buf->status = 0;

uint16_t plen = ICMPV6_HDR_LEN + DAO_ACK_LEN;
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6, NULL);
rpl_send(destination, (uint8_t *)icmp_send_buf, plen, IPV6_PROTO_NUM_ICMPV6);
mutex_unlock(&rpl_send_mutex);
}

Expand Down Expand Up @@ -890,8 +890,7 @@ void recv_rpl_dao_ack(void)

}

/* TODO: tcp_socket unused? */
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header, void *tcp_socket)
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header)
{
uint8_t *p_ptr;
ipv6_send_buf = get_rpl_send_ipv6_buf();
Expand Down
4 changes: 2 additions & 2 deletions sys/net/rpl/rpl.h
Expand Up @@ -27,7 +27,7 @@
#define CC1100_RADIO_MODE CC1100_MODE_WOR

#define RPL_PKT_RECV_BUF_SIZE 20
#define RPL_PROCESS_STACKSIZE 4096
#define RPL_PROCESS_STACKSIZE KERNEL_CONF_STACKSIZE_DEFAULT

uint8_t rpl_init(transceiver_type_t trans, uint16_t rpl_address);
void rpl_init_root(void);
Expand All @@ -42,7 +42,7 @@ void recv_rpl_dio(void);
void recv_rpl_dis(void);
void recv_rpl_dao(void);
void recv_rpl_dao_ack(void);
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header, void *tcp_socket);
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header);
ipv6_addr_t *rpl_get_next_hop(ipv6_addr_t *addr);
void rpl_add_routing_entry(ipv6_addr_t *addr, ipv6_addr_t *next_hop, uint16_t lifetime);
void rpl_del_routing_entry(ipv6_addr_t *addr);
Expand Down

0 comments on commit dcacf55

Please sign in to comment.