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:
parent
081ff02ec9
commit
d30217eb63
@ -94,6 +94,7 @@ include udp/Make.defs
|
||||
include pkt/Make.defs
|
||||
include uip/Make.defs
|
||||
include route/Make.defs
|
||||
include utils/Make.defs
|
||||
endif
|
||||
|
||||
ASRCS = $(SOCK_ASRCS) $(NETDEV_ASRCS) $(NET_ASRCS)
|
||||
|
@ -38,7 +38,7 @@ ifeq ($(CONFIG_NET),y)
|
||||
# Common IP source files
|
||||
|
||||
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?
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
ifeq ($(CONFIG_NET),y)
|
||||
|
||||
NET_CSRCS += net_dsec2timeval.c
|
||||
NET_CSRCS += net_dsec2timeval.c net_chksum.c
|
||||
|
||||
# Non-interrupt level support required?
|
||||
|
||||
@ -49,4 +49,3 @@ DEPPATH += --dep-path utils
|
||||
VPATH += :utils
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* net/uip/uip_chksum.c
|
||||
* net/utils/net_chksum.c
|
||||
*
|
||||
* Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -48,7 +48,7 @@
|
||||
#include <nuttx/net/netdev.h>
|
||||
#include <nuttx/net/icmp.h>
|
||||
|
||||
#include "uip/uip.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -142,10 +142,6 @@ static uint16_t icmp_6chksum(FAR struct uip_driver_s *dev)
|
||||
|
||||
#endif /* UIP_ARCH_CHKSUM */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/* Calculate the Internet checksum over a buffer. */
|
||||
|
||||
#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)
|
||||
{
|
||||
op32[3] += (op16 & 0xff);
|
@ -84,6 +84,7 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct timeval;
|
||||
void net_dsec2timeval(uint16_t dsec, FAR struct timeval *tv);
|
||||
|
||||
#undef EXTERN
|
||||
|
Loading…
Reference in New Issue
Block a user