net: Rename arp_arpin to arp_input

align with other similar function(e.g. ipv4_input and ipv6_input)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-12-04 15:01:53 +08:00 committed by archer
parent 62004a28a6
commit c6e9edcbb6
55 changed files with 63 additions and 63 deletions

View File

@ -217,7 +217,7 @@ include/nuttx/net/netstats.h
include/nuttx/net/tcp.h
include/nuttx/net/tun.h
include/nuttx/net/udp.h
net/arp/arp_arpin.c
net/arp/arp_input.c
net/arp/arp_dump.c
net/arp/arp_format.c
net/arp/arp_ipin.c

View File

@ -1338,7 +1338,7 @@ static void c5471_receive(struct c5471_driver_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(dev);
arp_input(dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1710,7 +1710,7 @@ static void gd32_receive(struct gd32_enet_mac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -813,7 +813,7 @@ static inline void imx_dispatch(struct imx_driver_s *priv)
if (BUF->type == HTONS(ETHTYPE_ARP))
{
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -855,7 +855,7 @@ static inline void imxrt_dispatch(struct imxrt_driver_s *priv)
if (BUF->type == HTONS(ETHTYPE_ARP))
{
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -646,7 +646,7 @@ static void kinetis_receive(struct kinetis_driver_s *priv)
if (BUF->type == HTONS(ETHTYPE_ARP))
{
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -962,7 +962,7 @@ static void lpc17_40_rxdone_work(void *arg)
if (BUF->type == HTONS(ETHTYPE_ARP))
{
NETDEV_RXARP(&priv->lp_dev);
arp_arpin(&priv->lp_dev);
arp_input(&priv->lp_dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the field d_len will

View File

@ -1642,7 +1642,7 @@ static void lpc43_receive(struct lpc43_ethmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -951,7 +951,7 @@ static void lpc54_eth_rxdispatch(struct lpc54_ethdriver_s *priv)
/* Dispatch the ARP packet to the network layer */
arp_arpin(dev);
arp_input(dev);
NETDEV_RXARP(dev);
/* If the above function invocation resulted in data that should be

View File

@ -150,7 +150,7 @@ void amebaz_netdev_notify_receive(struct amebaz_dev_s *priv,
#ifdef CONFIG_NET_ARP
if (hdr->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->dev);
arp_input(&priv->dev);
NETDEV_RXARP(&priv->dev);
if (priv->dev.d_len > 0)
{

View File

@ -698,7 +698,7 @@ static inline void s32k1xx_dispatch(struct s32k1xx_driver_s *priv)
if (BUF->type == HTONS(ETHTYPE_ARP))
{
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -1391,7 +1391,7 @@ static void s32k3xx_receive(struct s32k3xx_driver_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -1227,7 +1227,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1290,7 +1290,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1601,7 +1601,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1236,7 +1236,7 @@ static void sam_receive(struct sam_gmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a

View File

@ -1219,7 +1219,7 @@ static void sam_receive(struct sam_gmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1925,7 +1925,7 @@ static void sam_receive(struct sam_emac_s *priv, int qid)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1771,7 +1771,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1852,7 +1852,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1961,7 +1961,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -814,7 +814,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
ninfo("ARP packet received (%02x)\n", BUF->type);
NETDEV_RXARP(dev);
arp_arpin(dev);
arp_input(dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1745,7 +1745,7 @@ static void tiva_receive(struct tiva_ethmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -296,7 +296,7 @@ static void emac_receive(FAR struct emac_driver_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->d_dev);
arp_input(&priv->d_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1431,7 +1431,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv)
/* Handle the incoming ARP packet */
NETDEV_RXARP(&priv->pd_dev);
arp_arpin(&priv->pd_dev);
arp_input(&priv->pd_dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the field d_len will

View File

@ -1542,7 +1542,7 @@ static void pic32mz_rxdone(struct pic32mz_driver_s *priv)
/* Handle the incoming ARP packet */
NETDEV_RXARP(&priv->pd_dev);
arp_arpin(&priv->pd_dev);
arp_input(&priv->pd_dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the field d_len will

View File

@ -413,7 +413,7 @@ static void misoc_net_receive(struct misoc_net_driver_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->misoc_net_dev);
arp_input(&priv->misoc_net_dev);
NETDEV_RXARP(&priv->misoc_net_dev);
/* If the above function invocation resulted in data that should be

View File

@ -1577,7 +1577,7 @@ static void rx65n_receive(FAR struct rx65n_ethmac_s *priv)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data
* that should be sent out on the network, the field

View File

@ -530,7 +530,7 @@ static void bl602_net_receive(struct bl602_net_driver_s *priv)
{
/* Dispatch ARP packet to the network layer */
arp_arpin(&priv->net_dev);
arp_input(&priv->net_dev);
NETDEV_RXARP(&priv->net_dev);
if (priv->net_dev.d_len > 0)

View File

@ -768,7 +768,7 @@ static void wlan_rxpoll(void *arg)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data
* that should be sent out on the network, the field

View File

@ -615,7 +615,7 @@ static void litex_receive(struct litex_emac_s *priv)
{
ninfo("ARP frame\n");
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should
* be sent out on the network, the field d_len will set to a

View File

@ -885,7 +885,7 @@ static void mpfs_receive(struct mpfs_ethmac_s *priv, unsigned int queue)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a

View File

@ -227,7 +227,7 @@ static void netdriver_recv_work(void *arg)
ninfo("ARP frame\n");
NETDEV_RXARP(dev);
arp_arpin(dev);
arp_input(dev);
/* If the above function invocation resulted in data that
* should be sent out on the network, the global variable

View File

@ -1416,7 +1416,7 @@ static void emac_rx_interrupt_work(void *arg)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0

View File

@ -765,7 +765,7 @@ static void wlan_rxpoll(void *arg)
/* Handle ARP packet */
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data
* that should be sent out on the network, the field

View File

@ -1420,7 +1420,7 @@ static int ez80emac_receive(FAR struct ez80emac_driver_s *priv)
ninfo("ARP packet received (%02x)\n", BUF->type);
EMAC_STAT(priv, rx_arp);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value >

View File

@ -946,7 +946,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->dm_dev);
arp_input(&priv->dm_dev);
NETDEV_RXARP(&priv->dm_dev);
/* If the above function invocation resulted in data that

View File

@ -1391,7 +1391,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
ninfo("ARP packet received (%02x)\n", BUF->type);
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, d_len field will set to a value > 0.

View File

@ -1488,7 +1488,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
ninfo("ARP packet received (%02x)\n", BUF->type);
NETDEV_RXARP(&priv->dev);
arp_arpin(&priv->dev);
arp_input(&priv->dev);
/* ARP packets are freed immediately */

View File

@ -695,7 +695,7 @@ static void ftmac100_receive(FAR struct ftmac100_driver_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->ft_dev);
arp_input(&priv->ft_dev);
/* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value

View File

@ -663,7 +663,7 @@ static void lan91c111_receive(FAR struct net_driver_s *dev)
/* Dispatch ARP packet to the network layer */
arp_arpin(dev);
arp_input(dev);
/* Check for a reply to the ARP packet */

View File

@ -538,7 +538,7 @@ static int net_rpmsg_drv_transfer_handler(FAR struct rpmsg_endpoint *ept,
/* Dispatch ARP packet to the network layer */
arp_arpin(dev);
arp_input(dev);
/* Check for a reply to the ARP packet */

View File

@ -379,7 +379,7 @@ static void skel_receive(FAR struct skel_driver_s *priv)
{
/* Dispatch ARP packet to the network layer */
arp_arpin(&priv->sk_dev);
arp_input(&priv->sk_dev);
NETDEV_RXARP(&priv->sk_dev);
/* If the above function invocation resulted in data that should be

View File

@ -495,7 +495,7 @@ static void tun_net_receive_tap(FAR struct tun_device_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->dev);
arp_input(&priv->dev);
NETDEV_RXARP(&priv->dev);
/* If the above function invocation resulted in data that should be

View File

@ -1410,7 +1410,7 @@ static void w5500_receive(FAR struct w5500_driver_s *self)
/* Dispatch ARP packet to the network layer */
arp_arpin(&self->w_dev);
arp_input(&self->w_dev);
NETDEV_RXARP(&self->w_dev);
/* If the above function invocation resulted in data that should be

View File

@ -461,7 +461,7 @@ static void cdcecm_receive(FAR struct cdcecm_driver_s *self)
{
/* Dispatch ARP packet to the network layer */
arp_arpin(&self->dev);
arp_input(&self->dev);
NETDEV_RXARP(&self->dev);
/* If the above function invocation resulted in data that should be

View File

@ -904,7 +904,7 @@ static void rndis_rxdispatch(FAR void *arg)
{
NETDEV_RXARP(&priv->netdev);
arp_arpin(&priv->netdev);
arp_input(&priv->netdev);
if (priv->netdev.d_len > 0)
{

View File

@ -550,7 +550,7 @@ static void virtnet_rxdispatch(FAR struct virtnet_driver_s *priv)
{
/* Dispatch ARP packet to the network layer */
arp_arpin(&priv->vnet_dev);
arp_input(&priv->vnet_dev);
NETDEV_RXARP(&priv->vnet_dev);
/* If the above function invocation resulted in data that should be

View File

@ -341,7 +341,7 @@ static void bcmf_receive(FAR struct bcmf_dev_s *priv)
#ifdef CONFIG_NET_ARP
if (BUF->type == HTONS(ETHTYPE_ARP))
{
arp_arpin(&priv->bc_dev);
arp_input(&priv->bc_dev);
NETDEV_RXARP(&priv->bc_dev);
/* If the above function invocation resulted in data that should be

View File

@ -131,7 +131,7 @@ void arp_ipin(FAR struct net_driver_s *dev);
#endif
/****************************************************************************
* Name: arp_arpin
* Name: arp_input
*
* Description:
* This function should be called by the Ethernet device driver when an ARP
@ -154,7 +154,7 @@ void arp_ipin(FAR struct net_driver_s *dev);
*
****************************************************************************/
void arp_arpin(FAR struct net_driver_s *dev);
void arp_input(FAR struct net_driver_s *dev);
/****************************************************************************
* Name: arp_out
@ -190,7 +190,7 @@ void arp_out(FAR struct net_driver_s *dev);
/* If ARP is disabled, stub out all ARP interfaces */
# define arp_ipin(dev)
# define arp_arpin(dev)
# define arp_input(dev)
# define arp_out(dev)
#endif /* CONFIG_NET_ARP */

View File

@ -494,7 +494,7 @@ typedef CODE int (*devif_poll_callback_t)(FAR struct net_driver_s *dev);
* }
* else if (ETHBUF->type == HTONS(ETHTYPE_ARP))
* {
* arp_arpin();
* arp_input();
* if (dev->d_len > 0)
* {
* devicedriver_send();

View File

@ -21,7 +21,7 @@
# ARP support is available for Ethernet only
ifeq ($(CONFIG_NET_ARP),y)
NET_CSRCS += arp_arpin.c arp_out.c arp_format.c arp_table.c
NET_CSRCS += arp_input.c arp_out.c arp_format.c arp_table.c
ifeq ($(CONFIG_NET_ARP_IPIN),y)
NET_CSRCS += arp_ipin.c

View File

@ -301,7 +301,7 @@ int arp_wait(FAR struct arp_notify_s *notify, unsigned int timeout);
*
* Assumptions:
* This function is called from the MAC device driver indirectly through
* arp_arpin() and will execute with the network locked.
* arp_input() and will execute with the network locked.
*
****************************************************************************/

View File

@ -1,5 +1,5 @@
/****************************************************************************
* net/arp/arp_arpin.c
* net/arp/arp_input.c
*
* Copyright (C) 2007-2011, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -61,7 +61,7 @@
****************************************************************************/
/****************************************************************************
* Name: arp_input
* Name: arp_in
*
* Description:
* This function should be called by the Ethernet device driver when an
@ -84,7 +84,7 @@
*
****************************************************************************/
static int arp_input(FAR struct net_driver_s *dev)
static int arp_in(FAR struct net_driver_s *dev)
{
FAR struct arp_hdr_s *arp = ARPBUF;
in_addr_t ipaddr;
@ -163,7 +163,7 @@ static int arp_input(FAR struct net_driver_s *dev)
****************************************************************************/
/****************************************************************************
* Name: arp_arpin
* Name: arp_input
*
* Description:
* This function should be called by the Ethernet device driver when an
@ -186,7 +186,7 @@ static int arp_input(FAR struct net_driver_s *dev)
*
****************************************************************************/
void arp_arpin(FAR struct net_driver_s *dev)
void arp_input(FAR struct net_driver_s *dev)
{
FAR uint8_t *buf;
@ -198,13 +198,13 @@ void arp_arpin(FAR struct net_driver_s *dev)
dev->d_buf = &dev->d_iob->io_data[CONFIG_NET_LL_GUARDSIZE -
NET_LL_HDRLEN(dev)];
arp_input(dev);
arp_in(dev);
dev->d_buf = buf;
return;
}
netdev_input(dev, arp_input, true);
netdev_input(dev, arp_in, true);
}
#endif /* CONFIG_NET_ARP */

View File

@ -176,7 +176,7 @@ int arp_wait(FAR struct arp_notify_s *notify, unsigned int timeout)
*
* Assumptions:
* This function is called from the MAC device driver indirectly through
* arp_arpin() will execute with the network locked.
* arp_input() will execute with the network locked.
*
****************************************************************************/