Skip to content
Snippets Groups Projects
Commit 4bba611d authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Move some internal networking function protoypes out of the public...

Move some internal networking function protoypes out of the public include/nuttx/net/arp.h into to the private net/arp/arp.h
parent 482fd2d5
No related branches found
No related tags found
No related merge requests found
......@@ -186,47 +186,6 @@ void arp_arpin(struct net_driver_s *dev);
void arp_out(FAR struct net_driver_s *dev);
/****************************************************************************
* Name: arp_find
*
* Description:
* Find the ARP entry corresponding to this IP address.
*
* Input parameters:
* ipaddr - Refers to an IP address in network order
*
* Assumptions
* Interrupts are disabled; Returned value will become unstable when
* interrupts are re-enabled or if any other uIP APIs are called.
*
****************************************************************************/
FAR struct arp_entry *arp_find(in_addr_t ipaddr);
/****************************************************************************
* Name: arp_delete
*
* Description:
* Remove an IP association from the ARP table
*
* Input parameters:
* ipaddr - Refers to an IP address in network order
*
* Assumptions
* Interrupts are disabled to assure exclusive access to the ARP table
* (and because arp_find() is called).
*
****************************************************************************/
#define arp_delete(ipaddr) \
{ \
struct arp_entry *tabptr = arp_find(ipaddr); \
if (tabptr) \
{ \
tabptr->at_ipaddr = 0; \
} \
}
/****************************************************************************
* Name: arp_update
*
......@@ -234,6 +193,13 @@ FAR struct arp_entry *arp_find(in_addr_t ipaddr);
* Add the IP/HW address mapping to the ARP table -OR- change the IP
* address of an existing association.
*
* NOTE: This is an internal interface withint the networking layer and
* should not be used by application software. This prototype is here
* because there is already a violation of this structureing: The
* apps/netutils/dhcpd logic currently calls arp_update() directly. That
* is bad and needs to be replace with some ioctl interface perhaps hidden
* somewhere in apps/netutils/netlib.
*
* Input parameters:
* pipaddr - Refers to an IP address uint16_t[2] in network order
* ethaddr - Refers to a HW address uint8_t[IFHWADDRLEN]
......
......@@ -281,6 +281,65 @@ int arp_send(in_addr_t ipaddr);
int arp_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback);
#endif
/****************************************************************************
* Name: arp_find
*
* Description:
* Find the ARP entry corresponding to this IP address.
*
* Input parameters:
* ipaddr - Refers to an IP address in network order
*
* Assumptions
* Interrupts are disabled; Returned value will become unstable when
* interrupts are re-enabled or if any other uIP APIs are called.
*
****************************************************************************/
FAR struct arp_entry *arp_find(in_addr_t ipaddr);
/****************************************************************************
* Name: arp_delete
*
* Description:
* Remove an IP association from the ARP table
*
* Input parameters:
* ipaddr - Refers to an IP address in network order
*
* Assumptions
* Interrupts are disabled to assure exclusive access to the ARP table
* (and because arp_find() is called).
*
****************************************************************************/
#define arp_delete(ipaddr) \
{ \
struct arp_entry *tabptr = arp_find(ipaddr); \
if (tabptr) \
{ \
tabptr->at_ipaddr = 0; \
} \
}
/****************************************************************************
* Name: arp_update
*
* Description:
* Add the IP/HW address mapping to the ARP table -OR- change the IP
* address of an existing association.
*
* Input parameters:
* pipaddr - Refers to an IP address uint16_t[2] in network order
* ethaddr - Refers to a HW address uint8_t[IFHWADDRLEN]
*
* Assumptions
* Interrupts are disabled to assure exclusive access to the ARP table.
*
****************************************************************************/
void arp_update(FAR uint16_t *pipaddr, FAR uint8_t *ethaddr);
/****************************************************************************
* Name: arp_dump
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment