Skip to content

Commit

Permalink
udp: Delete unused udp_csum function.
Browse files Browse the repository at this point in the history
udp_csum is never referenced anywhere in the tree, not even in a header file.
  • Loading branch information
Joakim Gebart authored and OlegHahm committed Mar 31, 2015
1 parent f4373b8 commit 4341490
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions sys/net/transport_layer/udp/udp.c
Expand Up @@ -37,17 +37,6 @@ msg_t udp_msg_queue[UDP_PKT_RECV_BUF_SIZE];

char udp_stack_buffer[UDP_STACK_SIZE];

uint16_t udp_csum(ipv6_hdr_t *ipv6_header, udp_hdr_t *udp_header)
{
uint16_t sum;
uint16_t len = NTOHS(udp_header->length);

sum = len + IPPROTO_UDP;
sum = net_help_csum(sum, (uint8_t *)&ipv6_header->srcaddr, 2 * sizeof(ipv6_addr_t));
sum = net_help_csum(sum, (uint8_t *)udp_header, len);
return (sum == 0) ? 0xffff : HTONS(sum);
}

socket_internal_t *get_udp_socket(udp_hdr_t *udp_header)
{
uint8_t i = 1;
Expand Down

0 comments on commit 4341490

Please sign in to comment.