Move net/uip/uip_checksum.c to net/utils/net_chksum.c; fix missing Make.defs include in net/Makefile

This commit is contained in:
Gregory Nutt 2014-06-27 15:42:21 -06:00
parent 081ff02ec9
commit d30217eb63
5 changed files with 10 additions and 9 deletions

View File

@ -94,6 +94,7 @@ include udp/Make.defs
include pkt/Make.defs include pkt/Make.defs
include uip/Make.defs include uip/Make.defs
include route/Make.defs include route/Make.defs
include utils/Make.defs
endif endif
ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS) ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS)

View File

@ -38,7 +38,7 @@ ifeq ($(CONFIG_NET),y)
# Common IP source files # Common IP source files
NET_CSRCS += uip_initialize.c uip_setipid.c uip_input.c uip_send.c NET_CSRCS += uip_initialize.c uip_setipid.c uip_input.c uip_send.c
NET_CSRCS += uip_poll.c uip_chksum.c uip_callback.c NET_CSRCS += uip_poll.c uip_callback.c
# I/O buffer chain support required? # I/O buffer chain support required?

View File

@ -35,7 +35,7 @@
ifeq ($(CONFIG_NET),y) ifeq ($(CONFIG_NET),y)
NET_CSRCS += net_dsec2timeval.c NET_CSRCS += net_dsec2timeval.c net_chksum.c
# Non-interrupt level support required? # Non-interrupt level support required?
@ -49,4 +49,3 @@ DEPPATH += --dep-path utils
VPATH += :utils VPATH += :utils
endif endif
endif

View File

@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* net/uip/uip_chksum.c * net/utils/net_chksum.c
* *
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@ -48,7 +48,7 @@
#include <nuttx/net/netdev.h> #include <nuttx/net/netdev.h>
#include <nuttx/net/icmp.h> #include <nuttx/net/icmp.h>
#include "uip/uip.h" #include "utils/utils.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
@ -142,10 +142,6 @@ static uint16_t icmp_6chksum(FAR struct uip_driver_s *dev)
#endif /* UIP_ARCH_CHKSUM */ #endif /* UIP_ARCH_CHKSUM */
/****************************************************************************
* Public Functions
****************************************************************************/
/* Calculate the Internet checksum over a buffer. */ /* Calculate the Internet checksum over a buffer. */
#if !UIP_ARCH_ADD32 #if !UIP_ARCH_ADD32
@ -174,6 +170,10 @@ static inline void uip_carry32(FAR uint8_t *sum, uint16_t op16)
} }
} }
/****************************************************************************
* Public Functions
****************************************************************************/
void uip_incr32(FAR uint8_t *op32, uint16_t op16) void uip_incr32(FAR uint8_t *op32, uint16_t op16)
{ {
op32[3] += (op16 & 0xff); op32[3] += (op16 & 0xff);

View File

@ -84,6 +84,7 @@ extern "C"
* *
****************************************************************************/ ****************************************************************************/
struct timeval;
void net_dsec2timeval(uint16_t dsec, FAR struct timeval *tv); void net_dsec2timeval(uint16_t dsec, FAR struct timeval *tv);
#undef EXTERN #undef EXTERN