diff options
105 files changed, 567 insertions, 566 deletions
diff --git a/apps/examples/thttpd/content/netstat/netstat.c b/apps/examples/thttpd/content/netstat/netstat.c index 0124e5393..19c8ca871 100644 --- a/apps/examples/thttpd/content/netstat/netstat.c +++ b/apps/examples/thttpd/content/netstat/netstat.c @@ -81,7 +81,7 @@ * dangerous to reference global variables in the callback function. */ -/* static */ int netdev_callback(FAR struct uip_driver_s *dev, void *arg) +/* static */ int netdev_callback(FAR struct net_driver_s *dev, void *arg) { struct in_addr addr; diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c index d6acad88b..d0213bb54 100644 --- a/apps/nshlib/nsh_netcmds.c +++ b/apps/nshlib/nsh_netcmds.c @@ -279,7 +279,7 @@ static inline void net_statistics(FAR struct nsh_vtbl_s *vtbl) * Name: ifconfig_callback ****************************************************************************/ -int ifconfig_callback(FAR struct uip_driver_s *dev, void *arg) +int ifconfig_callback(FAR struct net_driver_s *dev, void *arg) { struct nsh_vtbl_s *vtbl = (struct nsh_vtbl_s*)arg; struct in_addr addr; diff --git a/nuttx/Documentation/NuttX.png b/nuttx/Documentation/NuttX.png Binary files differindex 360e657dd..93c8aa586 100644 --- a/nuttx/Documentation/NuttX.png +++ b/nuttx/Documentation/NuttX.png diff --git a/nuttx/Documentation/NuttX2-b.png b/nuttx/Documentation/NuttX2-b.png Binary files differindex 5bdab5c29..8dc51072f 100644 --- a/nuttx/Documentation/NuttX2-b.png +++ b/nuttx/Documentation/NuttX2-b.png diff --git a/nuttx/Documentation/NuttX2.png b/nuttx/Documentation/NuttX2.png Binary files differindex 422d1191f..4ce69ec5f 100644 --- a/nuttx/Documentation/NuttX2.png +++ b/nuttx/Documentation/NuttX2.png diff --git a/nuttx/Documentation/NuttX320.png b/nuttx/Documentation/NuttX320.png Binary files differindex f736c4130..090245e3f 100644 --- a/nuttx/Documentation/NuttX320.png +++ b/nuttx/Documentation/NuttX320.png diff --git a/nuttx/Documentation/NuttXScreenShot.jpg b/nuttx/Documentation/NuttXScreenShot.jpg Binary files differindex f5a9dc1fe..62af41ea0 100644 --- a/nuttx/Documentation/NuttXScreenShot.jpg +++ b/nuttx/Documentation/NuttXScreenShot.jpg diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index b156c1137..f8f59cb82 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -2926,13 +2926,13 @@ void board_led_off(int led); <p> <b><code>include/nuttx/net/netdev.h</code></b>. All structures and APIs needed to work with Ethernet drivers are provided in this header file. - The structure <code>struct uip_driver_s</code> defines the interface and is passed to uIP via + The structure <code>struct net_driver_s</code> defines the interface and is passed to uIP via <code>netdev_register()</code>. </p> </li> <li> <p> - <b><code>int netdev_register(FAR struct uip_driver_s *dev);</code></b>. + <b><code>int netdev_register(FAR struct net_driver_s *dev);</code></b>. Each Ethernet driver registers itself by calling <code>netdev_register()</code>. </p> </li> diff --git a/nuttx/Documentation/acronyms.txt b/nuttx/Documentation/acronyms.txt index eb78239ce..31a95dfe9 100755 --- a/nuttx/Documentation/acronyms.txt +++ b/nuttx/Documentation/acronyms.txt @@ -1,43 +1,43 @@ -AIC Advanced Interrupt Controller (Atmel SAM)
-ADC Analog to Digital Conversion
-ARP Address Resolution Protocol (networking)
-BCH Block to Character
-CAN Controller Area Network
-DEVIF Device Interface (networking)
-DAC Digital to Analog Conversion
-DEV Device
-DRAM Dynamic RAM
-FAT File Allocation Table
-FTL FLASH Translation Layer
-I2C Inter-Integrated Circuit
-I2S Inter IC Sound
-ICMP Internet Control Message Protocol (networking)
-IOB I/O Buffer (networking)
-LIBC The "C" Library
-MM Memory Management/Manager
-MMC Multi-Media Card
-MMCSD See MMC and SD
-MTD Memory Technology Device
-NFS Network File System
-NETDEV Network Device (networking)
-NSH NuttShell
-NX NuttX, the NuttX Graphics server (graphics)
-NXFFS NuttX Flash File System
-NXWM The NuttX Window Manager (graphics)
-PID Peripheral ID (Atmel SAM)
-PWM Pulse Width Modulation
-PKT "Raw" Packet socket (networking)
-RAM Random Access Memory
-SAIC Secure Advanced Interrupt Controller (Atmel SAM)
-SD Secure Digital
-SPI Serial Periperhal Interface
-TCP Transmission Control Protocol (networking)
-TSC Touchscreen Controller
-TWI Two-Wire Interface
-UDP User Datagram Protocol (networking)
-UART Universal Asynchronous Receiver/Transmitter
-USB Universal Serial Bus
-USART Universal Synchronous/Asynchronous Receiver/Transmitter
-WDT Watchdog Timer
-
-
+AIC Advanced Interrupt Controller (Atmel SAM) +ADC Analog to Digital Conversion +ARP Address Resolution Protocol (networking) +BCH Block to Character +CAN Controller Area Network +DEVIF Device Interface (networking) +DAC Digital to Analog Conversion +DEV Device +DRAM Dynamic RAM +FAT File Allocation Table +FTL FLASH Translation Layer +I2C Inter-Integrated Circuit +I2S Inter IC Sound +ICMP Internet Control Message Protocol (networking) +IOB I/O Buffer (networking) +LIBC The "C" Library +MM Memory Management/Manager +MMC Multi-Media Card +MMCSD See MMC and SD +MTD Memory Technology Device +NFS Network File System +NETDEV Network Device (networking) +NSH NuttShell +NX NuttX, the NuttX Graphics server (graphics) +NXFFS NuttX Flash File System +NXWM The NuttX Window Manager (graphics) +PID Peripheral ID (Atmel SAM) +PWM Pulse Width Modulation +PKT "Raw" Packet socket (networking) +RAM Random Access Memory +SAIC Secure Advanced Interrupt Controller (Atmel SAM) +SD Secure Digital +SPI Serial Periperhal Interface +TCP Transmission Control Protocol (networking) +TSC Touchscreen Controller +TWI Two-Wire Interface +UDP User Datagram Protocol (networking) +UART Universal Asynchronous Receiver/Transmitter +USB Universal Serial Bus +USART Universal Synchronous/Asynchronous Receiver/Transmitter +WDT Watchdog Timer + + diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c index 8220d606b..eace9d8d0 100644 --- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c +++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c @@ -330,7 +330,7 @@ struct c5471_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s c_dev; /* Interface understood by uIP */ + struct net_driver_s c_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -359,7 +359,7 @@ static inline void c5471_incrxcpu(struct c5471_driver_s *c5471); /* Common TX logic */ static int c5471_transmit(struct c5471_driver_s *c5471); -static int c5471_uiptxpoll(struct uip_driver_s *dev); +static int c5471_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -380,12 +380,12 @@ static void c5471_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int c5471_ifup(struct uip_driver_s *dev); -static int c5471_ifdown(struct uip_driver_s *dev); -static int c5471_txavail(struct uip_driver_s *dev); +static int c5471_ifup(struct net_driver_s *dev); +static int c5471_ifdown(struct net_driver_s *dev); +static int c5471_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int c5471_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int c5471_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int c5471_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization functions */ @@ -844,7 +844,7 @@ static inline void c5471_incrxcpu(struct c5471_driver_s *c5471) static int c5471_transmit(struct c5471_driver_s *c5471) { - struct uip_driver_s *dev = &c5471->c_dev; + struct net_driver_s *dev = &c5471->c_dev; volatile uint16_t *packetmem; uint16_t framelen; bool bfirstframe; @@ -974,7 +974,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471) * ****************************************************************************/ -static int c5471_uiptxpoll(struct uip_driver_s *dev) +static int c5471_uiptxpoll(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; @@ -1126,7 +1126,7 @@ static void c5471_rxstatus(struct c5471_driver_s *c5471) static void c5471_receive(struct c5471_driver_s *c5471) { - struct uip_driver_s *dev = &c5471->c_dev; + struct net_driver_s *dev = &c5471->c_dev; uint16_t *packetmem; bool bmore = true; int packetlen = 0; @@ -1580,7 +1580,7 @@ static void c5471_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int c5471_ifup(struct uip_driver_s *dev) +static int c5471_ifup(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; volatile uint32_t clearbits; @@ -1640,7 +1640,7 @@ static int c5471_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int c5471_ifdown(struct uip_driver_s *dev) +static int c5471_ifdown(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; @@ -1695,7 +1695,7 @@ static int c5471_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int c5471_txavail(struct uip_driver_s *dev) +static int c5471_txavail(struct net_driver_s *dev) { struct c5471_driver_s *c5471 = (struct c5471_driver_s *)dev->d_private; irqstate_t flags; @@ -1742,7 +1742,7 @@ static int c5471_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int c5471_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int c5471_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)dev->d_private; @@ -1772,7 +1772,7 @@ static int c5471_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int c5471_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int c5471_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct c5471_driver_s *priv = (FAR struct c5471_driver_s *)dev->d_private; @@ -2066,7 +2066,7 @@ static void c5471_reset(struct c5471_driver_s *c5471) static void c5471_macassign(struct c5471_driver_s *c5471) { - struct uip_driver_s *dev = &c5471->c_dev; + struct net_driver_s *dev = &c5471->c_dev; uint8_t *mptr = dev->d_mac.ether_addr_octet; register uint32_t tmp; diff --git a/nuttx/arch/arm/src/kinetis/kinetis_enet.c b/nuttx/arch/arm/src/kinetis/kinetis_enet.c index 6b5a7ef00..92c411453 100644 --- a/nuttx/arch/arm/src/kinetis/kinetis_enet.c +++ b/nuttx/arch/arm/src/kinetis/kinetis_enet.c @@ -178,7 +178,7 @@ struct kinetis_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Statistics */ @@ -224,7 +224,7 @@ static inline uint16_t kinesis_swap16(uint16_t value); static bool kinetics_txringfull(FAR struct kinetis_driver_s *priv); static int kinetis_transmit(FAR struct kinetis_driver_s *priv); -static int kinetis_uiptxpoll(struct uip_driver_s *dev); +static int kinetis_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -239,12 +239,12 @@ static void kinetis_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int kinetis_ifup(struct uip_driver_s *dev); -static int kinetis_ifdown(struct uip_driver_s *dev); -static int kinetis_txavail(struct uip_driver_s *dev); +static int kinetis_ifup(struct net_driver_s *dev); +static int kinetis_ifdown(struct net_driver_s *dev); +static int kinetis_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int kinetis_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int kinetis_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int kinetis_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* PHY/MII support */ @@ -434,7 +434,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv) * ****************************************************************************/ -static int kinetis_uiptxpoll(struct uip_driver_s *dev) +static int kinetis_uiptxpoll(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; @@ -783,7 +783,7 @@ static void kinetis_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int kinetis_ifup(struct uip_driver_s *dev) +static int kinetis_ifup(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; uint32_t regval; @@ -896,7 +896,7 @@ static int kinetis_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int kinetis_ifdown(struct uip_driver_s *dev) +static int kinetis_ifdown(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; irqstate_t flags; @@ -948,7 +948,7 @@ static int kinetis_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int kinetis_txavail(struct uip_driver_s *dev) +static int kinetis_txavail(struct net_driver_s *dev) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; irqstate_t flags; @@ -1000,7 +1000,7 @@ static int kinetis_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int kinetis_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int kinetis_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; @@ -1029,7 +1029,7 @@ static int kinetis_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int kinetis_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int kinetis_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct kinetis_driver_s *priv = (FAR struct kinetis_driver_s *)dev->d_private; diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c index f52ba6572..3712d91bd 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -281,7 +281,7 @@ struct lpc17_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s lp_dev; /* Interface understood by uIP */ + struct net_driver_s lp_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -325,7 +325,7 @@ static void lpc17_putreg(uint32_t val, uint32_t addr); static int lpc17_txdesc(struct lpc17_driver_s *priv); static int lpc17_transmit(struct lpc17_driver_s *priv); -static int lpc17_uiptxpoll(struct uip_driver_s *dev); +static int lpc17_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -341,12 +341,12 @@ static void lpc17_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int lpc17_ifup(struct uip_driver_s *dev); -static int lpc17_ifdown(struct uip_driver_s *dev); -static int lpc17_txavail(struct uip_driver_s *dev); +static int lpc17_ifup(struct net_driver_s *dev); +static int lpc17_ifdown(struct net_driver_s *dev); +static int lpc17_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int lpc17_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int lpc17_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int lpc17_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* Initialization functions */ @@ -666,7 +666,7 @@ static int lpc17_transmit(struct lpc17_driver_s *priv) * ****************************************************************************/ -static int lpc17_uiptxpoll(struct uip_driver_s *dev) +static int lpc17_uiptxpoll(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; int ret = OK; @@ -1250,7 +1250,7 @@ static void lpc17_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int lpc17_ifup(struct uip_driver_s *dev) +static int lpc17_ifup(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; uint32_t regval; @@ -1419,7 +1419,7 @@ static int lpc17_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int lpc17_ifdown(struct uip_driver_s *dev) +static int lpc17_ifdown(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; irqstate_t flags; @@ -1461,7 +1461,7 @@ static int lpc17_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int lpc17_txavail(struct uip_driver_s *dev) +static int lpc17_txavail(struct net_driver_s *dev) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; irqstate_t flags; @@ -1509,7 +1509,7 @@ static int lpc17_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int lpc17_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int lpc17_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; @@ -1539,7 +1539,7 @@ static int lpc17_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int lpc17_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int lpc17_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct lpc17_driver_s *priv = (struct lpc17_driver_s *)dev->d_private; diff --git a/nuttx/arch/arm/src/sam34/sam_emac.c b/nuttx/arch/arm/src/sam34/sam_emac.c index e5d527b07..58ed1e7be 100644 --- a/nuttx/arch/arm/src/sam34/sam_emac.c +++ b/nuttx/arch/arm/src/sam34/sam_emac.c @@ -259,7 +259,7 @@ struct sam_emac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -345,7 +345,7 @@ static void sam_buffer_free(struct sam_emac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_emac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_emac_s *priv); /* Interrupt handling */ @@ -362,12 +362,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -695,7 +695,7 @@ static void sam_buffer_free(struct sam_emac_s *priv) static int sam_transmit(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct emac_txdesc_s *txdesc; uint32_t regval; uint32_t status; @@ -808,7 +808,7 @@ static int sam_transmit(struct sam_emac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -863,7 +863,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -903,7 +903,7 @@ static void sam_dopoll(struct sam_emac_s *priv) static int sam_recvframe(struct sam_emac_s *priv) { struct emac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uint32_t rxndx; @@ -1108,7 +1108,7 @@ static int sam_recvframe(struct sam_emac_s *priv) static void sam_receive(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * EMAC frames. @@ -1507,7 +1507,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1542,7 +1542,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; @@ -1612,7 +1612,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1662,7 +1662,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1707,7 +1707,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -1741,7 +1741,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -2697,7 +2697,7 @@ static void sam_emac_reset(struct sam_emac_s *priv) static void sam_macaddress(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/nuttx/arch/arm/src/sama5/sam_emaca.c b/nuttx/arch/arm/src/sama5/sam_emaca.c index 77d1fc742..3ec595cdf 100644 --- a/nuttx/arch/arm/src/sama5/sam_emaca.c +++ b/nuttx/arch/arm/src/sama5/sam_emaca.c @@ -264,7 +264,7 @@ struct sam_emac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -350,7 +350,7 @@ static void sam_buffer_free(struct sam_emac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_emac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_emac_s *priv); /* Interrupt handling */ @@ -367,12 +367,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -700,7 +700,7 @@ static void sam_buffer_free(struct sam_emac_s *priv) static int sam_transmit(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct emac_txdesc_s *txdesc; uintptr_t virtaddr; uint32_t regval; @@ -818,7 +818,7 @@ static int sam_transmit(struct sam_emac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -873,7 +873,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -913,7 +913,7 @@ static void sam_dopoll(struct sam_emac_s *priv) static int sam_recvframe(struct sam_emac_s *priv) { struct emac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uintptr_t physaddr; @@ -1148,7 +1148,7 @@ static int sam_recvframe(struct sam_emac_s *priv) static void sam_receive(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * EMAC frames. @@ -1548,7 +1548,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1583,7 +1583,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; @@ -1653,7 +1653,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1703,7 +1703,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -1748,7 +1748,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -1782,7 +1782,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -2747,7 +2747,7 @@ static void sam_emac_reset(struct sam_emac_s *priv) static void sam_macaddress(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/nuttx/arch/arm/src/sama5/sam_emacb.c b/nuttx/arch/arm/src/sama5/sam_emacb.c index 7df889bad..70f505b8b 100644 --- a/nuttx/arch/arm/src/sama5/sam_emacb.c +++ b/nuttx/arch/arm/src/sama5/sam_emacb.c @@ -387,7 +387,7 @@ struct sam_emac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Constant and configured attributes of the EMAC */ @@ -438,7 +438,7 @@ static void sam_buffer_free(struct sam_emac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_emac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_emac_s *priv); /* Interrupt handling */ @@ -461,12 +461,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -1009,7 +1009,7 @@ static void sam_buffer_free(struct sam_emac_s *priv) static int sam_transmit(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct emac_txdesc_s *txdesc; uintptr_t virtaddr; uint32_t regval; @@ -1127,7 +1127,7 @@ static int sam_transmit(struct sam_emac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -1182,7 +1182,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1222,7 +1222,7 @@ static void sam_dopoll(struct sam_emac_s *priv) static int sam_recvframe(struct sam_emac_s *priv) { struct emac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uintptr_t physaddr; @@ -1457,7 +1457,7 @@ static int sam_recvframe(struct sam_emac_s *priv) static void sam_receive(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * EMAC frames. @@ -1887,7 +1887,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_emac_s *priv = (struct sam_emac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1922,7 +1922,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; int ret; @@ -1992,7 +1992,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -2042,7 +2042,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; irqstate_t flags; @@ -2087,7 +2087,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -2121,7 +2121,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_emac_s *priv = (struct sam_emac_s *)dev->d_private; @@ -3350,7 +3350,7 @@ static void sam_emac_reset(struct sam_emac_s *priv) static void sam_macaddress(struct sam_emac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/nuttx/arch/arm/src/sama5/sam_gmac.c b/nuttx/arch/arm/src/sama5/sam_gmac.c index f30b52726..2c2d0415a 100644 --- a/nuttx/arch/arm/src/sama5/sam_gmac.c +++ b/nuttx/arch/arm/src/sama5/sam_gmac.c @@ -190,7 +190,7 @@ struct sam_gmac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -275,7 +275,7 @@ static void sam_buffer_free(struct sam_gmac_s *priv); /* Common TX logic */ static int sam_transmit(struct sam_gmac_s *priv); -static int sam_uiptxpoll(struct uip_driver_s *dev); +static int sam_uiptxpoll(struct net_driver_s *dev); static void sam_dopoll(struct sam_gmac_s *priv); /* Interrupt handling */ @@ -292,12 +292,12 @@ static void sam_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int sam_ifup(struct uip_driver_s *dev); -static int sam_ifdown(struct uip_driver_s *dev); -static int sam_txavail(struct uip_driver_s *dev); +static int sam_ifup(struct net_driver_s *dev); +static int sam_ifdown(struct net_driver_s *dev); +static int sam_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY Initialization */ @@ -631,7 +631,7 @@ static void sam_buffer_free(struct sam_gmac_s *priv) static int sam_transmit(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; volatile struct gmac_txdesc_s *txdesc; uintptr_t virtaddr; uint32_t regval; @@ -750,7 +750,7 @@ static int sam_transmit(struct sam_gmac_s *priv) * ****************************************************************************/ -static int sam_uiptxpoll(struct uip_driver_s *dev) +static int sam_uiptxpoll(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; @@ -805,7 +805,7 @@ static int sam_uiptxpoll(struct uip_driver_s *dev) static void sam_dopoll(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -845,7 +845,7 @@ static void sam_dopoll(struct sam_gmac_s *priv) static int sam_recvframe(struct sam_gmac_s *priv) { volatile struct gmac_rxdesc_s *rxdesc; - struct uip_driver_s *dev; + struct net_driver_s *dev; const uint8_t *src; uint8_t *dest; uintptr_t physaddr; @@ -1078,7 +1078,7 @@ static int sam_recvframe(struct sam_gmac_s *priv) static void sam_receive(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while sam_recvframe() successfully retrieves valid * GMAC frames. @@ -1500,7 +1500,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...) static void sam_polltimer(int argc, uint32_t arg, ...) { struct sam_gmac_s *priv = (struct sam_gmac_s *)arg; - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Check if the there are any free TX descriptors. We cannot perform the * TX poll if we do not have buffering for another packet. @@ -1535,7 +1535,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int sam_ifup(struct uip_driver_s *dev) +static int sam_ifup(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; int ret; @@ -1608,7 +1608,7 @@ static int sam_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_ifdown(struct uip_driver_s *dev) +static int sam_ifdown(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; irqstate_t flags; @@ -1658,7 +1658,7 @@ static int sam_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int sam_txavail(struct uip_driver_s *dev) +static int sam_txavail(struct net_driver_s *dev) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; irqstate_t flags; @@ -1703,7 +1703,7 @@ static int sam_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; @@ -1737,7 +1737,7 @@ static int sam_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int sam_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int sam_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct sam_gmac_s *priv = (struct sam_gmac_s *)dev->d_private; @@ -2801,7 +2801,7 @@ static void sam_gmac_reset(struct sam_gmac_s *priv) static void sam_macaddress(struct sam_gmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c index 0d86cd605..a17d140db 100644 --- a/nuttx/arch/arm/src/stm32/stm32_eth.c +++ b/nuttx/arch/arm/src/stm32/stm32_eth.c @@ -572,7 +572,7 @@ struct stm32_ethmac_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Used to track transmit and receive descriptors */ @@ -627,7 +627,7 @@ static inline bool stm32_isfreebuffer(FAR struct stm32_ethmac_s *priv); /* Common TX logic */ static int stm32_transmit(FAR struct stm32_ethmac_s *priv); -static int stm32_uiptxpoll(struct uip_driver_s *dev); +static int stm32_uiptxpoll(struct net_driver_s *dev); static void stm32_dopoll(FAR struct stm32_ethmac_s *priv); /* Interrupt handling */ @@ -650,12 +650,12 @@ static void stm32_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int stm32_ifup(struct uip_driver_s *dev); -static int stm32_ifdown(struct uip_driver_s *dev); -static int stm32_txavail(struct uip_driver_s *dev); +static int stm32_ifup(struct net_driver_s *dev); +static int stm32_ifdown(struct net_driver_s *dev); +static int stm32_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int stm32_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int stm32_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int stm32_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Descriptor Initialization */ @@ -1159,7 +1159,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) * ****************************************************************************/ -static int stm32_uiptxpoll(struct uip_driver_s *dev) +static int stm32_uiptxpoll(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; @@ -1240,7 +1240,7 @@ static int stm32_uiptxpoll(struct uip_driver_s *dev) static void stm32_dopoll(FAR struct stm32_ethmac_s *priv) { - FAR struct uip_driver_s *dev = &priv->dev; + FAR struct net_driver_s *dev = &priv->dev; /* Check if the next TX descriptor is owned by the Ethernet DMA or * CPU. We cannot perform the TX poll if we are unable to accept @@ -1503,7 +1503,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) if ((rxdesc->rdes0 & ETH_RDES0_ES) == 0) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Get the Frame Length of the received packet: substruct 4 * bytes of the CRC @@ -1587,7 +1587,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv) static void stm32_receive(FAR struct stm32_ethmac_s *priv) { - struct uip_driver_s *dev = &priv->dev; + struct net_driver_s *dev = &priv->dev; /* Loop while while stm32_recvframe() successfully retrieves valid * Ethernet frames. @@ -1964,7 +1964,7 @@ static void stm32_txtimeout(int argc, uint32_t arg, ...) static void stm32_polltimer(int argc, uint32_t arg, ...) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)arg; - FAR struct uip_driver_s *dev = &priv->dev; + FAR struct net_driver_s *dev = &priv->dev; /* Check if the next TX descriptor is owned by the Ethernet DMA or CPU. We * cannot perform the timer poll if we are unable to accept another packet @@ -2031,7 +2031,7 @@ static void stm32_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int stm32_ifup(struct uip_driver_s *dev) +static int stm32_ifup(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; int ret; @@ -2077,7 +2077,7 @@ static int stm32_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int stm32_ifdown(struct uip_driver_s *dev) +static int stm32_ifdown(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; irqstate_t flags; @@ -2127,7 +2127,7 @@ static int stm32_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int stm32_txavail(struct uip_driver_s *dev) +static int stm32_txavail(struct net_driver_s *dev) { FAR struct stm32_ethmac_s *priv = (FAR struct stm32_ethmac_s *)dev->d_private; irqstate_t flags; @@ -2216,7 +2216,7 @@ static uint32_t stm32_calcethcrc(const uint8_t *data, size_t length) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int stm32_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int stm32_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { uint32_t crc; uint32_t hashindex; @@ -2273,7 +2273,7 @@ static int stm32_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int stm32_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int stm32_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { uint32_t crc; uint32_t hashindex; @@ -3303,7 +3303,7 @@ static int stm32_macconfig(FAR struct stm32_ethmac_s *priv) static void stm32_macaddress(FAR struct stm32_ethmac_s *priv) { - FAR struct uip_driver_s *dev = &priv->dev; + FAR struct net_driver_s *dev = &priv->dev; uint32_t regval; nllvdbg("%s MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", diff --git a/nuttx/arch/arm/src/tiva/tiva_ethernet.c b/nuttx/arch/arm/src/tiva/tiva_ethernet.c index adb9a8312..773e6cbb3 100644 --- a/nuttx/arch/arm/src/tiva/tiva_ethernet.c +++ b/nuttx/arch/arm/src/tiva/tiva_ethernet.c @@ -207,7 +207,7 @@ struct tiva_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s ld_dev; /* Interface understood by uIP */ + struct net_driver_s ld_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -238,7 +238,7 @@ static uint16_t tiva_phyread(struct tiva_driver_s *priv, int regaddr); /* Common TX logic */ static int tiva_transmit(struct tiva_driver_s *priv); -static int tiva_uiptxpoll(struct uip_driver_s *dev); +static int tiva_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -253,12 +253,12 @@ static void tiva_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int tiva_ifup(struct uip_driver_s *dev); -static int tiva_ifdown(struct uip_driver_s *dev); -static int tiva_txavail(struct uip_driver_s *dev); +static int tiva_ifup(struct net_driver_s *dev); +static int tiva_ifdown(struct net_driver_s *dev); +static int tiva_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int tiva_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int tiva_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int tiva_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -593,7 +593,7 @@ static int tiva_transmit(struct tiva_driver_s *priv) * ****************************************************************************/ -static int tiva_uiptxpoll(struct uip_driver_s *dev) +static int tiva_uiptxpoll(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; int ret = OK; @@ -1024,7 +1024,7 @@ static void tiva_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int tiva_ifup(struct uip_driver_s *dev) +static int tiva_ifup(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; irqstate_t flags; @@ -1180,7 +1180,7 @@ static int tiva_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int tiva_ifdown(struct uip_driver_s *dev) +static int tiva_ifdown(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; irqstate_t flags; @@ -1265,7 +1265,7 @@ static int tiva_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int tiva_txavail(struct uip_driver_s *dev) +static int tiva_txavail(struct net_driver_s *dev) { struct tiva_driver_s *priv = (struct tiva_driver_s *)dev->d_private; irqstate_t flags; @@ -1311,7 +1311,7 @@ static int tiva_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int tiva_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int tiva_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct tiva_driver_s *priv = (FAR struct tiva_driver_s *)dev->d_private; @@ -1341,7 +1341,7 @@ static int tiva_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int tiva_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int tiva_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct tiva_driver_s *priv = (FAR struct tiva_driver_s *)dev->d_private; diff --git a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c index 759c2819d..6d572503b 100644 --- a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c @@ -96,7 +96,7 @@ struct emac_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s d_dev; /* Interface understood by uIP */ + struct net_driver_s d_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -112,7 +112,7 @@ static struct emac_driver_s g_emac[CONFIG_HCS12_NINTERFACES]; /* Common TX logic */ static int emac_transmit(FAR struct emac_driver_s *priv); -static int emac_uiptxpoll(struct uip_driver_s *dev); +static int emac_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -127,12 +127,12 @@ static void emac_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int emac_ifup(struct uip_driver_s *dev); -static int emac_ifdown(struct uip_driver_s *dev); -static int emac_txavail(struct uip_driver_s *dev); +static int emac_ifup(struct net_driver_s *dev); +static int emac_ifdown(struct net_driver_s *dev); +static int emac_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -202,7 +202,7 @@ static int emac_transmit(FAR struct emac_driver_s *priv) * ****************************************************************************/ -static int emac_uiptxpoll(struct uip_driver_s *dev) +static int emac_uiptxpoll(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; @@ -452,7 +452,7 @@ static void emac_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int emac_ifup(struct uip_driver_s *dev) +static int emac_ifup(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; @@ -489,7 +489,7 @@ static int emac_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int emac_ifdown(struct uip_driver_s *dev) +static int emac_ifdown(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; irqstate_t flags; @@ -535,7 +535,7 @@ static int emac_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int emac_txavail(struct uip_driver_s *dev) +static int emac_txavail(struct net_driver_s *dev) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; irqstate_t flags; @@ -580,7 +580,7 @@ static int emac_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; @@ -609,7 +609,7 @@ static int emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct emac_driver_s *priv = (FAR struct emac_driver_s *)dev->d_private; diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c b/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c index 6288e6b52..808aba4ce 100644 --- a/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -353,7 +353,7 @@ struct pic32mx_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s pd_dev; /* Interface understood by uIP */ + struct net_driver_s pd_dev; /* Interface understood by uIP */ /* Descriptors and packet buffers */ @@ -410,7 +410,7 @@ static struct pic32mx_rxdesc_s *pic32mx_rxdesc(struct pic32mx_driver_s *priv); /* Common TX logic */ static int pic32mx_transmit(struct pic32mx_driver_s *priv); -static int pic32mx_uiptxpoll(struct uip_driver_s *dev); +static int pic32mx_uiptxpoll(struct net_driver_s *dev); static void pic32mx_poll(struct pic32mx_driver_s *priv); static void pic32mx_timerpoll(struct pic32mx_driver_s *priv); @@ -428,12 +428,12 @@ static void pic32mx_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int pic32mx_ifup(struct uip_driver_s *dev); -static int pic32mx_ifdown(struct uip_driver_s *dev); -static int pic32mx_txavail(struct uip_driver_s *dev); +static int pic32mx_ifup(struct net_driver_s *dev); +static int pic32mx_ifdown(struct net_driver_s *dev); +static int pic32mx_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int pic32mx_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int pic32mx_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int pic32mx_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /* PHY initialization functions */ @@ -1132,7 +1132,7 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv) * ****************************************************************************/ -static int pic32mx_uiptxpoll(struct uip_driver_s *dev) +static int pic32mx_uiptxpoll(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; int ret = OK; @@ -1864,7 +1864,7 @@ static void pic32mx_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int pic32mx_ifup(struct uip_driver_s *dev) +static int pic32mx_ifup(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; uint32_t regval; @@ -2166,7 +2166,7 @@ static int pic32mx_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int pic32mx_ifdown(struct uip_driver_s *dev) +static int pic32mx_ifdown(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; irqstate_t flags; @@ -2212,7 +2212,7 @@ static int pic32mx_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int pic32mx_txavail(struct uip_driver_s *dev) +static int pic32mx_txavail(struct net_driver_s *dev) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; irqstate_t flags; @@ -2262,7 +2262,7 @@ static int pic32mx_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int pic32mx_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int pic32mx_addmac(struct net_driver_s *dev, const uint8_t *mac) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; @@ -2292,7 +2292,7 @@ static int pic32mx_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int pic32mx_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int pic32mx_rmmac(struct net_driver_s *dev, const uint8_t *mac) { struct pic32mx_driver_s *priv = (struct pic32mx_driver_s *)dev->d_private; diff --git a/nuttx/arch/sim/src/up_uipdriver.c b/nuttx/arch/sim/src/up_uipdriver.c index 9693bc0d2..340b9ebf2 100644 --- a/nuttx/arch/sim/src/up_uipdriver.c +++ b/nuttx/arch/sim/src/up_uipdriver.c @@ -84,7 +84,7 @@ struct timer ****************************************************************************/ static struct timer g_periodic_timer; -static struct uip_driver_s g_sim_dev; +static struct net_driver_s g_sim_dev; /**************************************************************************** * Private Functions @@ -115,7 +115,7 @@ static inline int up_comparemac(uint8_t *paddr1, struct ether_addr *paddr2) } #endif -static int sim_uiptxpoll(struct uip_driver_s *dev) +static int sim_uiptxpoll(struct net_driver_s *dev) { /* If the polling resulted in data that should be sent out on the network, * the field d_len is set to a value > 0. diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h index a4fe041bc..c65a5226e 100644 --- a/nuttx/arch/z80/src/common/up_internal.h +++ b/nuttx/arch/z80/src/common/up_internal.h @@ -208,7 +208,7 @@ void up_timerhook(void); int up_netinitialize(void); void up_netuninitialize(void); # ifdef CONFIG_ARCH_MCFILTER -int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable); +int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, bool enable); # else # define up_multicastfilter(dev, mac, enable) # endif diff --git a/nuttx/arch/z80/src/ez80/ez80_emac.c b/nuttx/arch/z80/src/ez80/ez80_emac.c index 8b343c5c0..68de2457e 100644 --- a/nuttx/arch/z80/src/ez80/ez80_emac.c +++ b/nuttx/arch/z80/src/ez80/ez80_emac.c @@ -319,7 +319,7 @@ struct ez80emac_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -355,7 +355,7 @@ static void ez80emac_machash(FAR uint8_t *mac, int *ndx, int *bitno) /* TX/RX logic */ static int ez80emac_transmit(struct ez80emac_driver_s *priv); -static int ez80emac_uiptxpoll(struct uip_driver_s *dev); +static int ez80emac_uiptxpoll(struct net_driver_s *dev); static inline FAR struct ez80emac_desc_s *ez80emac_rwp(void); static inline FAR struct ez80emac_desc_s *ez80emac_rrp(void); @@ -374,12 +374,12 @@ static void ez80emac_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int ez80emac_ifup(struct uip_driver_s *dev); -static int ez80emac_ifdown(struct uip_driver_s *dev); -static int ez80emac_txavail(struct uip_driver_s *dev); +static int ez80emac_ifup(struct net_driver_s *dev); +static int ez80emac_ifdown(struct net_driver_s *dev); +static int ez80emac_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int ez80emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int ez80emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int ez80emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int ez80emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization */ @@ -1064,7 +1064,7 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv) * ****************************************************************************/ -static int ez80emac_uiptxpoll(struct uip_driver_s *dev) +static int ez80emac_uiptxpoll(struct net_driver_s *dev) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)dev->d_private; int ret = 0; @@ -1628,7 +1628,7 @@ static void ez80emac_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int ez80emac_ifup(FAR struct uip_driver_s *dev) +static int ez80emac_ifup(FAR struct net_driver_s *dev) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->d_private; uint8_t regval; @@ -1723,7 +1723,7 @@ static int ez80emac_ifup(FAR struct uip_driver_s *dev) * ****************************************************************************/ -static int ez80emac_ifdown(struct uip_driver_s *dev) +static int ez80emac_ifdown(struct net_driver_s *dev) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)dev->d_private; irqstate_t flags; @@ -1775,7 +1775,7 @@ static int ez80emac_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int ez80emac_txavail(struct uip_driver_s *dev) +static int ez80emac_txavail(struct net_driver_s *dev) { struct ez80emac_driver_s *priv = (struct ez80emac_driver_s *)dev->d_private; irqstate_t flags; @@ -1817,7 +1817,7 @@ static int ez80emac_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int ez80emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int ez80emac_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->d_private; @@ -1847,7 +1847,7 @@ static int ez80emac_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int ez80emac_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int ez80emac_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->d_private; @@ -2173,7 +2173,7 @@ errout: ****************************************************************************/ #ifdef CONFIG_ARCH_MCFILTER -int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable) +int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, bool enable) { FAR struct ez80emac_driver_s *priv = (FAR struct ez80emac_driver_s *)dev->priv; uint8_t regval; diff --git a/nuttx/drivers/net/cs89x0.c b/nuttx/drivers/net/cs89x0.c index b588f7167..f0bad4600 100644 --- a/nuttx/drivers/net/cs89x0.c +++ b/nuttx/drivers/net/cs89x0.c @@ -116,7 +116,7 @@ static void cs89x0_putppreg(struct cs89x0_driver_s *cs89x0, int addr, /* Common TX logic */ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0); -static int cs89x0_uiptxpoll(struct uip_driver_s *dev); +static int cs89x0_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -134,12 +134,12 @@ static void cs89x0_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int cs89x0_ifup(struct uip_driver_s *dev); -static int cs89x0_ifdown(struct uip_driver_s *dev); -static int cs89x0_txavail(struct uip_driver_s *dev); +static int cs89x0_ifup(struct net_driver_s *dev); +static int cs89x0_ifdown(struct net_driver_s *dev); +static int cs89x0_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int cs89x0_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int cs89x0_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int cs89x0_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int cs89x0_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -327,7 +327,7 @@ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0) * ****************************************************************************/ -static int cs89x0_uiptxpoll(struct uip_driver_s *dev) +static int cs89x0_uiptxpoll(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; @@ -716,7 +716,7 @@ static void cs89x0_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int cs89x0_ifup(struct uip_driver_s *dev) +static int cs89x0_ifup(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; @@ -754,7 +754,7 @@ static int cs89x0_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int cs89x0_ifdown(struct uip_driver_s *dev) +static int cs89x0_ifdown(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; irqstate_t flags; @@ -795,7 +795,7 @@ static int cs89x0_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int cs89x0_txavail(struct uip_driver_s *dev) +static int cs89x0_txavail(struct net_driver_s *dev) { struct cs89x0_driver_s *cs89x0 = (struct cs89x0_driver_s *)dev->d_private; irqstate_t flags; @@ -837,7 +837,7 @@ static int cs89x0_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int cs89x0_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int cs89x0_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct cs89x0_driver_s *priv = (FAR struct cs89x0_driver_s *)dev->d_private; @@ -867,7 +867,7 @@ static int cs89x0_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int cs89x0_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int cs89x0_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct cs89x0_driver_s *priv = (FAR struct cs89x0_driver_s *)dev->d_private; diff --git a/nuttx/drivers/net/dm90x0.c b/nuttx/drivers/net/dm90x0.c index 48ec70a5e..2a74ce2cb 100644 --- a/nuttx/drivers/net/dm90x0.c +++ b/nuttx/drivers/net/dm90x0.c @@ -322,7 +322,7 @@ struct dm9x_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dm_dev; + struct net_driver_s dm_dev; }; /**************************************************************************** @@ -376,7 +376,7 @@ static bool dm9x_rxchecksumready(uint8_t); /* Common TX logic */ static int dm9x_transmit(struct dm9x_driver_s *dm9x); -static int dm9x_uiptxpoll(struct uip_driver_s *dev); +static int dm9x_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -391,12 +391,12 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int dm9x_ifup(struct uip_driver_s *dev); -static int dm9x_ifdown(struct uip_driver_s *dev); -static int dm9x_txavail(struct uip_driver_s *dev); +static int dm9x_ifup(struct net_driver_s *dev); +static int dm9x_ifdown(struct net_driver_s *dev); +static int dm9x_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int dm9x_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int dm9x_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int dm9x_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization functions */ @@ -839,7 +839,7 @@ static int dm9x_transmit(struct dm9x_driver_s *dm9x) * ****************************************************************************/ -static int dm9x_uiptxpoll(struct uip_driver_s *dev) +static int dm9x_uiptxpoll(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; @@ -1360,7 +1360,7 @@ static inline void dm9x_phymode(struct dm9x_driver_s *dm9x) * ****************************************************************************/ -static int dm9x_ifup(struct uip_driver_s *dev) +static int dm9x_ifup(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; uint8_t netstatus; @@ -1425,7 +1425,7 @@ static int dm9x_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int dm9x_ifdown(struct uip_driver_s *dev) +static int dm9x_ifdown(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; irqstate_t flags; @@ -1478,7 +1478,7 @@ static int dm9x_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int dm9x_txavail(struct uip_driver_s *dev) +static int dm9x_txavail(struct net_driver_s *dev) { struct dm9x_driver_s *dm9x = (struct dm9x_driver_s *)dev->d_private; irqstate_t flags; @@ -1525,7 +1525,7 @@ static int dm9x_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int dm9x_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int dm9x_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct dm9x_driver_s *priv = (FAR struct dm9x_driver_s *)dev->d_private; @@ -1555,7 +1555,7 @@ static int dm9x_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int dm9x_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int dm9x_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct dm9x_driver_s *priv = (FAR struct dm9x_driver_s *)dev->d_private; diff --git a/nuttx/drivers/net/e1000.c b/nuttx/drivers/net/e1000.c index 87f993ba3..982ba29f2 100644 --- a/nuttx/drivers/net/e1000.c +++ b/nuttx/drivers/net/e1000.c @@ -125,7 +125,7 @@ struct e1000_dev /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s uip_dev; /* Interface understood by uIP */ + struct net_driver_s uip_dev; /* Interface understood by uIP */ }; struct e1000_dev_head @@ -146,7 +146,7 @@ static struct e1000_dev_head e1000_list = {0}; /* Common TX logic */ static int e1000_transmit(struct e1000_dev *e1000); -static int e1000_uiptxpoll(struct uip_driver_s *dev); +static int e1000_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -159,12 +159,12 @@ static void e1000_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int e1000_ifup(struct uip_driver_s *dev); -static int e1000_ifdown(struct uip_driver_s *dev); -static int e1000_txavail(struct uip_driver_s *dev); +static int e1000_ifup(struct net_driver_s *dev); +static int e1000_ifdown(struct net_driver_s *dev); +static int e1000_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac); -static int e1000_rmmac(struct uip_driver_s *dev, const uint8_t *mac); +static int e1000_addmac(struct net_driver_s *dev, const uint8_t *mac); +static int e1000_rmmac(struct net_driver_s *dev, const uint8_t *mac); #endif /**************************************************************************** @@ -476,7 +476,7 @@ static int e1000_transmit(struct e1000_dev *e1000) * ****************************************************************************/ -static int e1000_uiptxpoll(struct uip_driver_s *dev) +static int e1000_uiptxpoll(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; int tail = e1000->tx_ring.tail; @@ -705,7 +705,7 @@ static void e1000_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int e1000_ifup(struct uip_driver_s *dev) +static int e1000_ifup(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; @@ -749,7 +749,7 @@ static int e1000_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int e1000_ifdown(struct uip_driver_s *dev) +static int e1000_ifdown(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; irqstate_t flags; @@ -799,7 +799,7 @@ static int e1000_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int e1000_txavail(struct uip_driver_s *dev) +static int e1000_txavail(struct net_driver_s *dev) { struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; int tail = e1000->tx_ring.tail; @@ -846,7 +846,7 @@ static int e1000_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac) +static int e1000_addmac(struct net_driver_s *dev, const uint8_t *mac) { /* Add the MAC address to the hardware multicast routing table */ @@ -873,7 +873,7 @@ static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int e1000_rmmac(struct uip_driver_s *dev, const uint8_t *mac) +static int e1000_rmmac(struct net_driver_s *dev, const uint8_t *mac) { /* Add the MAC address to the hardware multicast routing table */ diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c index c657c18c9..52538e575 100644 --- a/nuttx/drivers/net/enc28j60.c +++ b/nuttx/drivers/net/enc28j60.c @@ -247,7 +247,7 @@ struct enc_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Statistics */ @@ -312,7 +312,7 @@ static void enc_wrphy(FAR struct enc_driver_s *priv, uint8_t phyaddr, /* Common TX logic */ static int enc_transmit(FAR struct enc_driver_s *priv); -static int enc_uiptxpoll(struct uip_driver_s *dev); +static int enc_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -335,12 +335,12 @@ static void enc_polltimer(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int enc_ifup(struct uip_driver_s *dev); -static int enc_ifdown(struct uip_driver_s *dev); -static int enc_txavail(struct uip_driver_s *dev); +static int enc_ifup(struct net_driver_s *dev); +static int enc_ifdown(struct net_driver_s *dev); +static int enc_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization */ @@ -1184,7 +1184,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * ****************************************************************************/ -static int enc_uiptxpoll(struct uip_driver_s *dev) +static int enc_uiptxpoll(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -1993,7 +1993,7 @@ static void enc_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int enc_ifup(struct uip_driver_s *dev) +static int enc_ifup(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret; @@ -2063,7 +2063,7 @@ static int enc_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_ifdown(struct uip_driver_s *dev) +static int enc_ifdown(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2120,7 +2120,7 @@ static int enc_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_txavail(struct uip_driver_s *dev) +static int enc_txavail(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2174,7 +2174,7 @@ static int enc_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -2212,7 +2212,7 @@ static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; diff --git a/nuttx/drivers/net/encx24j600.c b/nuttx/drivers/net/encx24j600.c index 8beaf9d7f..28ed6da52 100644 --- a/nuttx/drivers/net/encx24j600.c +++ b/nuttx/drivers/net/encx24j600.c @@ -260,7 +260,7 @@ struct enc_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ /* Statistics */ @@ -328,7 +328,7 @@ static void enc_wrphy(FAR struct enc_driver_s *priv, uint8_t phyaddr, static int enc_txenqueue(FAR struct enc_driver_s *priv); static int enc_transmit(FAR struct enc_driver_s *priv); -static int enc_uiptxpoll(struct uip_driver_s *dev); +static int enc_uiptxpoll(struct net_driver_s *dev); /* Common RX logic */ @@ -355,13 +355,13 @@ static void enc_polltimer(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int enc_ifup(struct uip_driver_s *dev); -static int enc_ifdown(struct uip_driver_s *dev); -static int enc_txavail(struct uip_driver_s *dev); -static int enc_rxavail(struct uip_driver_s *dev); +static int enc_ifup(struct net_driver_s *dev); +static int enc_ifdown(struct net_driver_s *dev); +static int enc_txavail(struct net_driver_s *dev); +static int enc_rxavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /* Initialization */ @@ -1196,7 +1196,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv) * ****************************************************************************/ -static int enc_uiptxpoll(struct uip_driver_s *dev) +static int enc_uiptxpoll(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret = OK; @@ -2165,7 +2165,7 @@ static void enc_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int enc_ifup(struct uip_driver_s *dev) +static int enc_ifup(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; int ret; @@ -2239,7 +2239,7 @@ static int enc_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_ifdown(struct uip_driver_s *dev) +static int enc_ifdown(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2297,7 +2297,7 @@ static int enc_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_txavail(struct uip_driver_s *dev) +static int enc_txavail(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; irqstate_t flags; @@ -2352,7 +2352,7 @@ static int enc_txavail(struct uip_driver_s *dev) * ****************************************************************************/ -static int enc_rxavail(struct uip_driver_s *dev) +static int enc_rxavail(struct net_driver_s *dev) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -2384,7 +2384,7 @@ static int enc_rxavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; @@ -2422,7 +2422,7 @@ static int enc_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int enc_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int enc_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)dev->d_private; diff --git a/nuttx/drivers/net/skeleton.c b/nuttx/drivers/net/skeleton.c index a8283f0fd..6730e6ef1 100644 --- a/nuttx/drivers/net/skeleton.c +++ b/nuttx/drivers/net/skeleton.c @@ -96,7 +96,7 @@ struct skel_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s sk_dev; /* Interface understood by uIP */ + struct net_driver_s sk_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -112,7 +112,7 @@ static struct skel_driver_s g_skel[CONFIG_skeleton_NINTERFACES]; /* Common TX logic */ static int skel_transmit(FAR struct skel_driver_s *skel); -static int skel_uiptxpoll(struct uip_driver_s *dev); +static int skel_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -127,12 +127,12 @@ static void skel_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int skel_ifup(struct uip_driver_s *dev); -static int skel_ifdown(struct uip_driver_s *dev); -static int skel_txavail(struct uip_driver_s *dev); +static int skel_ifup(struct net_driver_s *dev); +static int skel_ifdown(struct net_driver_s *dev); +static int skel_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int skel_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int skel_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int skel_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int skel_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -202,7 +202,7 @@ static int skel_transmit(FAR struct skel_driver_s *skel) * ****************************************************************************/ -static int skel_uiptxpoll(struct uip_driver_s *dev) +static int skel_uiptxpoll(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; @@ -452,7 +452,7 @@ static void skel_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int skel_ifup(struct uip_driver_s *dev) +static int skel_ifup(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; @@ -489,7 +489,7 @@ static int skel_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int skel_ifdown(struct uip_driver_s *dev) +static int skel_ifdown(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; irqstate_t flags; @@ -535,7 +535,7 @@ static int skel_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int skel_txavail(struct uip_driver_s *dev) +static int skel_txavail(struct net_driver_s *dev) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; irqstate_t flags; @@ -580,7 +580,7 @@ static int skel_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int skel_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int skel_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; @@ -609,7 +609,7 @@ static int skel_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int skel_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int skel_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)dev->d_private; diff --git a/nuttx/drivers/net/slip.c b/nuttx/drivers/net/slip.c index c1d669183..1a4873e77 100644 --- a/nuttx/drivers/net/slip.c +++ b/nuttx/drivers/net/slip.c @@ -176,7 +176,7 @@ struct slip_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s dev; /* Interface understood by uIP */ + struct net_driver_s dev; /* Interface understood by uIP */ uint8_t rxbuf[CONFIG_NET_BUFSIZE + 2]; uint8_t txbuf[CONFIG_NET_BUFSIZE + 2]; }; @@ -202,7 +202,7 @@ static void slip_semtake(FAR struct slip_driver_s *priv); static void slip_write(FAR struct slip_driver_s *priv, const uint8_t *buffer, int len); static void slip_putc(FAR struct slip_driver_s *priv, int ch); static int slip_transmit(FAR struct slip_driver_s *priv); -static int slip_uiptxpoll(struct uip_driver_s *dev); +static int slip_uiptxpoll(struct net_driver_s *dev); static void slip_txtask(int argc, char *argv[]); /* Packet receiver task */ @@ -213,12 +213,12 @@ static int slip_rxtask(int argc, char *argv[]); /* NuttX callback functions */ -static int slip_ifup(struct uip_driver_s *dev); -static int slip_ifdown(struct uip_driver_s *dev); -static int slip_txavail(struct uip_driver_s *dev); +static int slip_ifup(struct net_driver_s *dev); +static int slip_ifdown(struct net_driver_s *dev); +static int slip_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int slip_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int slip_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int slip_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int slip_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -419,7 +419,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv) * ****************************************************************************/ -static int slip_uiptxpoll(struct uip_driver_s *dev) +static int slip_uiptxpoll(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -760,7 +760,7 @@ static int slip_rxtask(int argc, char *argv[]) * ****************************************************************************/ -static int slip_ifup(struct uip_driver_s *dev) +static int slip_ifup(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -790,7 +790,7 @@ static int slip_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int slip_ifdown(struct uip_driver_s *dev) +static int slip_ifdown(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -816,7 +816,7 @@ static int slip_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int slip_txavail(struct uip_driver_s *dev) +static int slip_txavail(struct net_driver_s *dev) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -851,7 +851,7 @@ static int slip_txavail(struct uip_driver_s *dev) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int slip_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int slip_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; @@ -880,7 +880,7 @@ static int slip_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int slip_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int slip_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct slip_driver_s *priv = (FAR struct slip_driver_s *)dev->d_private; diff --git a/nuttx/drivers/net/vnet.c b/nuttx/drivers/net/vnet.c index 3770533b4..315111722 100644 --- a/nuttx/drivers/net/vnet.c +++ b/nuttx/drivers/net/vnet.c @@ -103,7 +103,7 @@ struct vnet_driver_s /* This holds the information visible to uIP/NuttX */ struct rgmp_vnet *vnet; - struct uip_driver_s sk_dev; /* Interface understood by uIP */ + struct net_driver_s sk_dev; /* Interface understood by uIP */ }; /**************************************************************************** @@ -119,7 +119,7 @@ static struct vnet_driver_s g_vnet[CONFIG_VNET_NINTERFACES]; /* Common TX logic */ static int vnet_transmit(FAR struct vnet_driver_s *vnet); -static int vnet_uiptxpoll(struct uip_driver_s *dev); +static int vnet_uiptxpoll(struct net_driver_s *dev); /* Interrupt handling */ @@ -132,12 +132,12 @@ static void vnet_txtimeout(int argc, uint32_t arg, ...); /* NuttX callback functions */ -static int vnet_ifup(struct uip_driver_s *dev); -static int vnet_ifdown(struct uip_driver_s *dev); -static int vnet_txavail(struct uip_driver_s *dev); +static int vnet_ifup(struct net_driver_s *dev); +static int vnet_ifdown(struct net_driver_s *dev); +static int vnet_txavail(struct net_driver_s *dev); #ifdef CONFIG_NET_IGMP -static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac); -static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac); +static int vnet_addmac(struct net_driver_s *dev, FAR const uint8_t *mac); +static int vnet_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac); #endif /**************************************************************************** @@ -221,7 +221,7 @@ static int vnet_transmit(FAR struct vnet_driver_s *vnet) * ****************************************************************************/ -static int vnet_uiptxpoll(struct uip_driver_s *dev) +static int vnet_uiptxpoll(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; @@ -441,7 +441,7 @@ static void vnet_polltimer(int argc, uint32_t arg, ...) * ****************************************************************************/ -static int vnet_ifup(struct uip_driver_s *dev) +static int vnet_ifup(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; @@ -475,7 +475,7 @@ static int vnet_ifup(struct uip_driver_s *dev) * ****************************************************************************/ -static int vnet_ifdown(struct uip_driver_s *dev) +static int vnet_ifdown(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; irqstate_t flags; @@ -520,7 +520,7 @@ static int vnet_ifdown(struct uip_driver_s *dev) * ****************************************************************************/ -static int vnet_txavail(struct uip_driver_s *dev) +static int vnet_txavail(struct net_driver_s *dev) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; irqstate_t flags; @@ -572,7 +572,7 @@ out: ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int vnet_addmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; @@ -601,7 +601,7 @@ static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) +static int vnet_rmmac(struct net_driver_s *dev, FAR const uint8_t *mac) { FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; diff --git a/nuttx/include/nuttx/net/arp.h b/nuttx/include/nuttx/net/arp.h index 2a257b8bd..06f54d9d8 100644 --- a/nuttx/include/nuttx/net/arp.h +++ b/nuttx/include/nuttx/net/arp.h @@ -134,7 +134,7 @@ void arp_init(void); ****************************************************************************/ #ifdef CONFIG_NET_ARP_IPIN -void arp_ipin(struct uip_driver_s *dev); +void arp_ipin(struct net_driver_s *dev); #else # define arp_ipin(dev) #endif @@ -152,7 +152,7 @@ void arp_ipin(struct uip_driver_s *dev); * ****************************************************************************/ -void arp_arpin(struct uip_driver_s *dev); +void arp_arpin(struct net_driver_s *dev); /**************************************************************************** * Name: arp_arpin @@ -171,7 +171,7 @@ void arp_arpin(struct uip_driver_s *dev); * ****************************************************************************/ -void arp_out(struct uip_driver_s *dev); +void arp_out(struct net_driver_s *dev); /**************************************************************************** * Function: arp_timer_init diff --git a/nuttx/include/nuttx/net/cs89x0.h b/nuttx/include/nuttx/net/cs89x0.h index 2ba876f9b..f12b364c4 100644 --- a/nuttx/include/nuttx/net/cs89x0.h +++ b/nuttx/include/nuttx/net/cs89x0.h @@ -110,7 +110,7 @@ struct cs89x0_driver_s /* This holds the information visible to uIP/NuttX */ - struct uip_driver_s cs_dev; /* Interface understood by uIP */ + struct net_driver_s cs_dev; /* Interface understood by uIP */ /* Driver statistics */ diff --git a/nuttx/include/nuttx/net/igmp.h b/nuttx/include/nuttx/net/igmp.h index fce07b0a6..67f676c5a 100644 --- a/nuttx/include/nuttx/net/igmp.h +++ b/nuttx/include/nuttx/net/igmp.h @@ -247,10 +247,10 @@ EXTERN uip_ipaddr_t g_allrouters; * ****************************************************************************/ -void igmp_devinit(FAR struct uip_driver_s *dev); -int igmp_joingroup(FAR struct uip_driver_s *dev, +void igmp_devinit(FAR struct net_driver_s *dev); +int igmp_joingroup(FAR struct net_driver_s *dev, FAR const struct in_addr *grpaddr); -int igmp_leavegroup(FAR struct uip_driver_s *dev, +int igmp_leavegroup(FAR struct net_driver_s *dev, FAR const struct in_addr *grpaddr); #undef EXTERN diff --git a/nuttx/include/nuttx/net/net.h b/nuttx/include/nuttx/net/net.h index 64602b073..707a499b0 100644 --- a/nuttx/include/nuttx/net/net.h +++ b/nuttx/include/nuttx/net/net.h @@ -125,8 +125,8 @@ struct socketlist /* Callback from netdev_foreach() */ -struct uip_driver_s; /* Forward reference. Defined in nuttx/net/netdev.h */ -typedef int (*netdev_callback_t)(FAR struct uip_driver_s *dev, void *arg); +struct net_driver_s; /* Forward reference. Defined in nuttx/net/netdev.h */ +typedef int (*netdev_callback_t)(FAR struct net_driver_s *dev, void *arg); /**************************************************************************** * Public Data @@ -294,12 +294,12 @@ int net_vfcntl(int sockfd, int cmd, va_list ap); * addresses */ -int netdev_register(FAR struct uip_driver_s *dev); +int netdev_register(FAR struct net_driver_s *dev); /* netdev-unregister.c *********************************************************/ /* Unregister a network device driver. */ -int netdev_unregister(FAR struct uip_driver_s *dev); +int netdev_unregister(FAR struct net_driver_s *dev); /* net_foreach.c ************************************************************/ /* Enumerates all registered network devices */ diff --git a/nuttx/include/nuttx/net/netdev.h b/nuttx/include/nuttx/net/netdev.h index cc781a77d..194d8ea3d 100644 --- a/nuttx/include/nuttx/net/netdev.h +++ b/nuttx/include/nuttx/net/netdev.h @@ -73,14 +73,14 @@ * of this structure. */ -struct uip_driver_s +struct net_driver_s { /* This link is used to maintain a single-linked list of ethernet drivers. * Must be the first field in the structure due to blink type casting. */ #if CONFIG_NSOCKET_DESCRIPTORS > 0 - FAR struct uip_driver_s *flink; + FAR struct net_driver_s *flink; /* This is the name of network device assigned when netdev_register was called. * This name is only used to support socket ioctl lookups by device name @@ -177,15 +177,15 @@ struct uip_driver_s /* Driver callbacks */ - int (*d_ifup)(struct uip_driver_s *dev); - int (*d_ifdown)(struct uip_driver_s *dev); - int (*d_txavail)(struct uip_driver_s *dev); + int (*d_ifup)(struct net_driver_s *dev); + int (*d_ifdown)(struct net_driver_s *dev); + int (*d_txavail)(struct net_driver_s *dev); #ifdef CONFIG_NET_RXAVAIL - int (*d_rxavail)(struct uip_driver_s *dev); + int (*d_rxavail)(struct net_driver_s *dev); #endif #ifdef CONFIG_NET_IGMP - int (*d_addmac)(struct uip_driver_s *dev, FAR const uint8_t *mac); - int (*d_rmmac)(struct uip_driver_s *dev, FAR const uint8_t *mac); + int (*d_addmac)(struct net_driver_s *dev, FAR const uint8_t *mac); + int (*d_rmmac)(struct net_driver_s *dev, FAR const uint8_t *mac); #endif #ifdef CONFIG_NETDEV_PHY_IOCTL int (*d_ioctl)(int cmd, struct mii_ioctl_data *req); @@ -263,7 +263,7 @@ struct uip_driver_s * } */ -int uip_input(struct uip_driver_s *dev); +int uip_input(struct net_driver_s *dev); /* Polling of connections * @@ -315,9 +315,9 @@ int uip_input(struct uip_driver_s *dev); * } */ -typedef int (*uip_poll_callback_t)(struct uip_driver_s *dev); -int uip_poll(struct uip_driver_s *dev, uip_poll_callback_t callback); -int uip_timer(struct uip_driver_s *dev, uip_poll_callback_t callback, int hsec); +typedef int (*uip_poll_callback_t)(struct net_driver_s *dev); +int uip_poll(struct net_driver_s *dev, uip_poll_callback_t callback); +int uip_timer(struct net_driver_s *dev, uip_poll_callback_t callback, int hsec); /* Carrier detection * Call netdev_carrier_on when the carrier has become available and the device @@ -327,8 +327,8 @@ int uip_timer(struct uip_driver_s *dev, uip_poll_callback_t callback, int hsec); * into non operational state. */ -int netdev_carrier_on(FAR struct uip_driver_s *dev); -int netdev_carrier_off(FAR struct uip_driver_s *dev); +int netdev_carrier_on(FAR struct net_driver_s *dev); +int netdev_carrier_off(FAR struct net_driver_s *dev); /* By defining UIP_ARCH_CHKSUM, the architecture can replace up_incr32 * with hardware assisted solutions. @@ -375,7 +375,7 @@ uint16_t uip_chksum(uint16_t *buf, uint16_t len); * buffer. */ -uint16_t uip_ipchksum(struct uip_driver_s *dev); +uint16_t uip_ipchksum(struct net_driver_s *dev); /* Calculate the TCP checksum of the packet in d_buf and d_appdata. * @@ -390,8 +390,8 @@ uint16_t uip_ipchksum(struct uip_driver_s *dev); * to by d_appdata. */ -uint16_t tcp_chksum(struct uip_driver_s *dev); -uint16_t udp_chksum(struct uip_driver_s *dev); -uint16_t icmp_chksum(struct uip_driver_s *dev, int len); +uint16_t tcp_chksum(struct net_driver_s *dev); +uint16_t udp_chksum(struct net_driver_s *dev); +uint16_t icmp_chksum(struct net_driver_s *dev, int len); #endif /* __INCLUDE_NUTTX_NET_NETDEV_H */ diff --git a/nuttx/include/nuttx/net/pkt.h b/nuttx/include/nuttx/net/pkt.h index 2dfd85d2d..843a756e6 100644 --- a/nuttx/include/nuttx/net/pkt.h +++ b/nuttx/include/nuttx/net/pkt.h @@ -98,7 +98,7 @@ FAR struct pkt_conn_s *pkt_alloc(void); */ void pkt_free(FAR struct pkt_conn_s *conn); -void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn); -int pkt_input(FAR struct uip_driver_s *dev); +void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn); +int pkt_input(FAR struct net_driver_s *dev); #endif /* __INCLUDE_NUTTX_NET_PKT_H */ diff --git a/nuttx/include/nuttx/net/tcp.h b/nuttx/include/nuttx/net/tcp.h index c8c884806..635f67ce1 100644 --- a/nuttx/include/nuttx/net/tcp.h +++ b/nuttx/include/nuttx/net/tcp.h @@ -161,7 +161,7 @@ * file pointers) for the connection. */ -struct uip_driver_s; /* Forward reference */ +struct net_driver_s; /* Forward reference */ struct uip_callback_s; /* Forward reference */ struct tcp_backlog_s; /* Forward reference */ diff --git a/nuttx/include/nuttx/net/udp.h b/nuttx/include/nuttx/net/udp.h index fe777913d..33f68130c 100644 --- a/nuttx/include/nuttx/net/udp.h +++ b/nuttx/include/nuttx/net/udp.h @@ -69,7 +69,7 @@ /* Representation of a uIP UDP connection */ -struct uip_driver_s; /* Forward reference */ +struct net_driver_s; /* Forward reference */ struct uip_callback_s; /* Forward reference */ struct udp_conn_s { diff --git a/nuttx/include/nuttx/net/uip.h b/nuttx/include/nuttx/net/uip.h index 96b443e3c..255c561c7 100644 --- a/nuttx/include/nuttx/net/uip.h +++ b/nuttx/include/nuttx/net/uip.h @@ -217,11 +217,11 @@ struct uip_ip_hdr * are and are not handled by the callback. */ -struct uip_driver_s; /* Forward reference */ +struct net_driver_s; /* Forward reference */ struct uip_callback_s { FAR struct uip_callback_s *flink; - uint16_t (*event)(struct uip_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags); + uint16_t (*event)(struct net_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags); void *priv; uint16_t flags; }; diff --git a/nuttx/net/README.txt b/nuttx/net/README.txt index 7370944c1..f072c0786 100644 --- a/nuttx/net/README.txt +++ b/nuttx/net/README.txt @@ -1,38 +1,38 @@ -README
-======
-
-Directory Structure
-===================
-
- nuttx/
- |
- `- net/
- |
- +- arp - Address resolution protocol
- +- devif - Stack/device interface layer
- +- icmp - Internet Control Message Protocol
- +- iob - I/O buffering logic
- +- netdev - Socket network device interface
- +- pkt - "Raw" packet socket support
- +- socket - BSD socket interface
- +- route - Routing table support
- +- tcp - Transmission Control Protocol
- +- udp - User Datagram Protocol
- `- utils - Miscellaneous utility functions
-
-
- +-------------------------------------------------------------+
- | Application layer |
- +-------------------------------------------------------------+
- +-------------------------------------------------------------+
- | Socket layer (socket/) |
- +-------------------------------------------------------------+
- +------------++-----------------------------------------------+
- | Network || Protocol stacks (arp, icmp, pkt, tcp, udp) |
- | Device |+-----------------------------------------------+
- | Interface |+---------------------------------++------------+
- | (netdev/) ||Network Device Interface (devif/)|| Utilities |
- +------------++---------------------------------++------------+
- +-------------------------------------------------------------+
- | Network Device Drivers |
- +-------------------------------------------------------------+
+README +====== + +Directory Structure +=================== + + nuttx/ + | + `- net/ + | + +- arp - Address resolution protocol + +- devif - Stack/device interface layer + +- icmp - Internet Control Message Protocol + +- iob - I/O buffering logic + +- netdev - Socket network device interface + +- pkt - "Raw" packet socket support + +- socket - BSD socket interface + +- route - Routing table support + +- tcp - Transmission Control Protocol + +- udp - User Datagram Protocol + `- utils - Miscellaneous utility functions + + + +-------------------------------------------------------------+ + | Application layer | + +-------------------------------------------------------------+ + +-------------------------------------------------------------+ + | Socket layer (socket/) | + +-------------------------------------------------------------+ + +------------++-----------------------------------------------+ + | Network || Protocol stacks (arp, icmp, pkt, tcp, udp) | + | Device |+-----------------------------------------------+ + | Interface |+---------------------------------++------------+ + | (netdev/) ||Network Device Interface (devif/)|| Utilities | + +------------++---------------------------------++------------+ + +-------------------------------------------------------------+ + | Network Device Drivers | + +-------------------------------------------------------------+ diff --git a/nuttx/net/arp/arp_inout.c b/nuttx/net/arp/arp_inout.c index d4fb1e0f9..57e081de4 100644 --- a/nuttx/net/arp/arp_inout.c +++ b/nuttx/net/arp/arp_inout.c @@ -195,7 +195,7 @@ static void arp_dump(struct arp_hdr_s *arp) */ #ifdef CONFIG_NET_ARP_IPIN -void arp_ipin(struct uip_driver_s *dev) +void arp_ipin(struct net_driver_s *dev) { in_addr_t srcipaddr; @@ -232,7 +232,7 @@ void arp_ipin(struct uip_driver_s *dev) * variable d_len. */ -void arp_arpin(struct uip_driver_s *dev) +void arp_arpin(struct net_driver_s *dev) { struct arp_hdr_s *parp = ARPBUF; in_addr_t ipaddr; @@ -321,7 +321,7 @@ void arp_arpin(struct uip_driver_s *dev) * buffer, and the length of the packet is in the field d_len. */ -void arp_out(struct uip_driver_s *dev) +void arp_out(struct net_driver_s *dev) { const struct arp_entry *tabptr = NULL; struct arp_hdr_s *parp = ARPBUF; diff --git a/nuttx/net/connect.c b/nuttx/net/connect.c index cb0a1a606..0f3701066 100644 --- a/nuttx/net/connect.c +++ b/nuttx/net/connect.c @@ -80,7 +80,7 @@ static inline int psock_setup_callbacks(FAR struct socket *psock, FAR struct tcp_connect_s *pstate); static inline void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate, int status); -static uint16_t psock_connect_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags); #ifdef CONFIG_NET_IPv6 @@ -181,7 +181,7 @@ static inline void psock_teardown_callbacks(FAR struct tcp_connect_s *pstate, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static uint16_t psock_connect_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_connect_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/nuttx/net/getsockname.c b/nuttx/net/getsockname.c index 7d39f2cb8..fb05eb5af 100644 --- a/nuttx/net/getsockname.c +++ b/nuttx/net/getsockname.c @@ -100,7 +100,7 @@ int getsockname(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen) { FAR struct socket *psock = sockfd_socket(sockfd); - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; #if defined(CONFIG_NET_TCP) || defined(CONFIG_NET_UDP) #ifdef CONFIG_NET_IPv6 diff --git a/nuttx/net/icmp/icmp.h b/nuttx/net/icmp/icmp.h index fe0376781..dd644d9ee 100644 --- a/nuttx/net/icmp/icmp.h +++ b/nuttx/net/icmp/icmp.h @@ -72,18 +72,18 @@ extern "C" /* Defined in icmp_input.c **************************************************/ -void icmp_input(FAR struct uip_driver_s *dev); +void icmp_input(FAR struct net_driver_s *dev); /* Defined in icmp_poll.c ***************************************************/ #ifdef CONFIG_NET_ICMP_PING -void icmp_poll(FAR struct uip_driver_s *dev); +void icmp_poll(FAR struct net_driver_s *dev); #endif /* CONFIG_NET_ICMP_PING */ /* Defined in icmp_send.c ***************************************************/ #ifdef CONFIG_NET_ICMP_PING -void icmp_send(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *destaddr); +void icmp_send(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *destaddr); #endif /* CONFIG_NET_ICMP_PING */ #undef EXTERN diff --git a/nuttx/net/icmp/icmp_input.c b/nuttx/net/icmp/icmp_input.c index 432582b70..2958b323f 100644 --- a/nuttx/net/icmp/icmp_input.c +++ b/nuttx/net/icmp/icmp_input.c @@ -103,7 +103,7 @@ FAR struct uip_callback_s *g_echocallback = NULL; * ****************************************************************************/ -void icmp_input(FAR struct uip_driver_s *dev) +void icmp_input(FAR struct net_driver_s *dev) { FAR struct icmp_iphdr_s *picmp = ICMPBUF; diff --git a/nuttx/net/icmp/icmp_ping.c b/nuttx/net/icmp/icmp_ping.c index 5e46f76ce..0054f2096 100644 --- a/nuttx/net/icmp/icmp_ping.c +++ b/nuttx/net/icmp/icmp_ping.c @@ -152,7 +152,7 @@ static inline int ping_timeout(FAR struct icmp_ping_s *pstate) * ****************************************************************************/ -static uint16_t ping_interrupt(FAR struct uip_driver_s *dev, FAR void *conn, +static uint16_t ping_interrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { FAR struct icmp_ping_s *pstate = (struct icmp_ping_s *)pvpriv; diff --git a/nuttx/net/icmp/icmp_poll.c b/nuttx/net/icmp/icmp_poll.c index 2beab639d..af98e26f3 100644 --- a/nuttx/net/icmp/icmp_poll.c +++ b/nuttx/net/icmp/icmp_poll.c @@ -86,7 +86,7 @@ * ****************************************************************************/ -void icmp_poll(FAR struct uip_driver_s *dev) +void icmp_poll(FAR struct net_driver_s *dev) { /* Setup for the application callback */ diff --git a/nuttx/net/icmp/icmp_send.c b/nuttx/net/icmp/icmp_send.c index a8fe09578..7ee1fb1fa 100644 --- a/nuttx/net/icmp/icmp_send.c +++ b/nuttx/net/icmp/icmp_send.c @@ -89,7 +89,7 @@ * ****************************************************************************/ -void icmp_send(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *destaddr) +void icmp_send(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *destaddr) { FAR struct icmp_iphdr_s *picmp = ICMPBUF; diff --git a/nuttx/net/igmp/igmp.h b/nuttx/net/igmp/igmp.h index 1f33fb872..2285dbd8b 100644 --- a/nuttx/net/igmp/igmp.h +++ b/nuttx/net/igmp/igmp.h @@ -76,18 +76,18 @@ void igmp_initialize(void); /* Defined in igmp_input.c **************************************************/ -void igmp_input(struct uip_driver_s *dev); +void igmp_input(struct net_driver_s *dev); /* Defined in igmp_group.c **************************************************/ void igmp_grpinit(void); -FAR struct igmp_group_s *igmp_grpalloc(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr); -FAR struct igmp_group_s *igmp_grpfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr); -FAR struct igmp_group_s *igmp_grpallocfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr); -void igmp_grpfree(FAR struct uip_driver_s *dev, +void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group); /* Defined in igmp_msg.c ****************************************************/ @@ -97,11 +97,11 @@ void igmp_waitmsg(FAR struct igmp_group_s *group, uint8_t msgid); /* Defined in igmp_poll.c ***************************************************/ -void igmp_poll(FAR struct uip_driver_s *dev); +void igmp_poll(FAR struct net_driver_s *dev); /* Defined in igmp_send.c ***************************************************/ -void igmp_send(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group, +void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group, FAR uip_ipaddr_t *dest); /* Defined in igmp_timer.c **************************************************/ @@ -113,8 +113,8 @@ bool igmp_cmptimer(FAR struct igmp_group_s *group, int maxticks); /* Defined in igmp_mcastmac *************************************************/ -void igmp_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip); -void igmp_removemcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip); +void igmp_addmcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip); +void igmp_removemcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip); #undef EXTERN #ifdef __cplusplus diff --git a/nuttx/net/igmp/igmp_group.c b/nuttx/net/igmp/igmp_group.c index 85bfa1a0c..f0b3e5399 100644 --- a/nuttx/net/igmp/igmp_group.c +++ b/nuttx/net/igmp/igmp_group.c @@ -219,7 +219,7 @@ void igmp_grpinit(void) * ****************************************************************************/ -FAR struct igmp_group_s *igmp_grpalloc(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpalloc(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr) { FAR struct igmp_group_s *group; @@ -282,7 +282,7 @@ FAR struct igmp_group_s *igmp_grpalloc(FAR struct uip_driver_s *dev, * ****************************************************************************/ -FAR struct igmp_group_s *igmp_grpfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr) { FAR struct igmp_group_s *group; @@ -323,7 +323,7 @@ FAR struct igmp_group_s *igmp_grpfind(FAR struct uip_driver_s *dev, * ****************************************************************************/ -FAR struct igmp_group_s *igmp_grpallocfind(FAR struct uip_driver_s *dev, +FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, FAR const uip_ipaddr_t *addr) { FAR struct igmp_group_s *group = igmp_grpfind(dev, addr); @@ -349,7 +349,7 @@ FAR struct igmp_group_s *igmp_grpallocfind(FAR struct uip_driver_s *dev, * ****************************************************************************/ -void igmp_grpfree(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group) +void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) { net_lock_t flags; diff --git a/nuttx/net/igmp/igmp_initialize.c b/nuttx/net/igmp/igmp_initialize.c index 1d751c487..f0ea8c4b5 100644 --- a/nuttx/net/igmp/igmp_initialize.c +++ b/nuttx/net/igmp/igmp_initialize.c @@ -103,7 +103,7 @@ void igmp_initialize(void) * ****************************************************************************/ -void igmp_devinit(struct uip_driver_s *dev) +void igmp_devinit(struct net_driver_s *dev) { nvdbg("IGMP initializing dev %p\n", dev); DEBUGASSERT(dev->grplist.head == NULL); diff --git a/nuttx/net/igmp/igmp_input.c b/nuttx/net/igmp/igmp_input.c index 241294d01..76061bb82 100644 --- a/nuttx/net/igmp/igmp_input.c +++ b/nuttx/net/igmp/igmp_input.c @@ -113,7 +113,7 @@ * ****************************************************************************/ -void igmp_input(struct uip_driver_s *dev) +void igmp_input(struct net_driver_s *dev) { FAR struct igmp_group_s *group; uip_ipaddr_t destipaddr; diff --git a/nuttx/net/igmp/igmp_join.c b/nuttx/net/igmp/igmp_join.c index a8d4a19d3..7e3540e07 100644 --- a/nuttx/net/igmp/igmp_join.c +++ b/nuttx/net/igmp/igmp_join.c @@ -122,7 +122,7 @@ * ****************************************************************************/ -int igmp_joingroup(struct uip_driver_s *dev, FAR const struct in_addr *grpaddr) +int igmp_joingroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) { struct igmp_group_s *group; diff --git a/nuttx/net/igmp/igmp_leave.c b/nuttx/net/igmp/igmp_leave.c index 58e28771c..65cffc108 100644 --- a/nuttx/net/igmp/igmp_leave.c +++ b/nuttx/net/igmp/igmp_leave.c @@ -129,7 +129,7 @@ * ****************************************************************************/ -int igmp_leavegroup(struct uip_driver_s *dev, FAR const struct in_addr *grpaddr) +int igmp_leavegroup(struct net_driver_s *dev, FAR const struct in_addr *grpaddr) { struct igmp_group_s *group; net_lock_t flags; diff --git a/nuttx/net/igmp/igmp_mcastmac.c b/nuttx/net/igmp/igmp_mcastmac.c index b4de341c0..42dbf0407 100644 --- a/nuttx/net/igmp/igmp_mcastmac.c +++ b/nuttx/net/igmp/igmp_mcastmac.c @@ -99,7 +99,7 @@ static void uip_mcastmac(uip_ipaddr_t *ip, FAR uint8_t *mac) * ****************************************************************************/ -void igmp_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip) +void igmp_addmcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip) { uint8_t mcastmac[6]; @@ -119,7 +119,7 @@ void igmp_addmcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip) * ****************************************************************************/ -void igmp_removemcastmac(FAR struct uip_driver_s *dev, FAR uip_ipaddr_t *ip) +void igmp_removemcastmac(FAR struct net_driver_s *dev, FAR uip_ipaddr_t *ip) { uint8_t mcastmac[6]; diff --git a/nuttx/net/igmp/igmp_poll.c b/nuttx/net/igmp/igmp_poll.c index bcc689523..48b4f39dc 100644 --- a/nuttx/net/igmp/igmp_poll.c +++ b/nuttx/net/igmp/igmp_poll.c @@ -79,7 +79,7 @@ * ****************************************************************************/ -static inline void uip_schedsend(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group) +static inline void uip_schedsend(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) { uip_ipaddr_t *dest; @@ -142,7 +142,7 @@ static inline void uip_schedsend(FAR struct uip_driver_s *dev, FAR struct igmp_g * ****************************************************************************/ -void igmp_poll(FAR struct uip_driver_s *dev) +void igmp_poll(FAR struct net_driver_s *dev) { FAR struct igmp_group_s *group; diff --git a/nuttx/net/igmp/igmp_send.c b/nuttx/net/igmp/igmp_send.c index 2398215b9..a73c16a86 100644 --- a/nuttx/net/igmp/igmp_send.c +++ b/nuttx/net/igmp/igmp_send.c @@ -120,7 +120,7 @@ static uint16_t igmp_chksum(FAR uint8_t *buffer, int buflen) * ****************************************************************************/ -void igmp_send(FAR struct uip_driver_s *dev, FAR struct igmp_group_s *group, +void igmp_send(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group, FAR uip_ipaddr_t *destipaddr) { nllvdbg("msgid: %02x destipaddr: %08x\n", group->msgid, (int)*destipaddr); diff --git a/nuttx/net/net_close.c b/nuttx/net/net_close.c index 5f5e3d710..a2c57b6ef 100644 --- a/nuttx/net/net_close.c +++ b/nuttx/net/net_close.c @@ -153,7 +153,7 @@ static inline int close_timeout(FAR struct tcp_close_s *pstate) ****************************************************************************/ #ifdef CONFIG_NET_TCP -static uint16_t netclose_interrupt(FAR struct uip_driver_s *dev, +static uint16_t netclose_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/nuttx/net/net_poll.c b/nuttx/net/net_poll.c index f7d27de35..d865631a6 100644 --- a/nuttx/net/net_poll.c +++ b/nuttx/net/net_poll.c @@ -113,7 +113,7 @@ struct net_poll_s ****************************************************************************/ #ifdef HAVE_NETPOLL -static uint16_t poll_interrupt(FAR struct uip_driver_s *dev, FAR void *conn, +static uint16_t poll_interrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { FAR struct net_poll_s *info = (FAR struct net_poll_s *)pvpriv; diff --git a/nuttx/net/net_sendfile.c b/nuttx/net/net_sendfile.c index 6d6a4a7e4..c5f249b51 100644 --- a/nuttx/net/net_sendfile.c +++ b/nuttx/net/net_sendfile.c @@ -144,7 +144,7 @@ static inline int sendfile_timeout(FAR struct sendfile_s *pstate) } #endif /* CONFIG_NET_SOCKOPTS && !CONFIG_DISABLE_CLOCK */ -static uint16_t ack_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, +static uint16_t ack_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { FAR struct sendfile_s *pstate = (FAR struct sendfile_s *)pvpriv; @@ -223,7 +223,7 @@ static uint16_t ack_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, * ****************************************************************************/ -static uint16_t sendfile_interrupt(FAR struct uip_driver_s *dev, FAR void *pvconn, +static uint16_t sendfile_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s*)pvconn; diff --git a/nuttx/net/netdev/netdev.h b/nuttx/net/netdev/netdev.h index 7761051f0..b867a3d5d 100644 --- a/nuttx/net/netdev/netdev.h +++ b/nuttx/net/netdev/netdev.h @@ -70,7 +70,7 @@ extern "C" /* List of registered Ethernet device drivers */ #if CONFIG_NSOCKET_DESCRIPTORS > 0 -EXTERN struct uip_driver_s *g_netdevices; +EXTERN struct net_driver_s *g_netdevices; #endif /**************************************************************************** @@ -88,13 +88,13 @@ void netdev_semgive(void); /* netdev_findbyname.c *******************************************************/ #if CONFIG_NSOCKET_DESCRIPTORS > 0 -FAR struct uip_driver_s *netdev_findbyname(FAR const char *ifname); +FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname); #endif /* netdev_findbyaddr.c *******************************************************/ #if CONFIG_NSOCKET_DESCRIPTORS > 0 -FAR struct uip_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr); +FAR struct net_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr); #endif /* netdev_txnotify.c *********************************************************/ diff --git a/nuttx/net/netdev/netdev_carrier.c b/nuttx/net/netdev/netdev_carrier.c index 07589a64a..fb5e7e4d7 100644 --- a/nuttx/net/netdev/netdev_carrier.c +++ b/nuttx/net/netdev/netdev_carrier.c @@ -94,7 +94,7 @@ * ****************************************************************************/ -int netdev_carrier_on(FAR struct uip_driver_s *dev) +int netdev_carrier_on(FAR struct net_driver_s *dev) { if (dev) { @@ -120,7 +120,7 @@ int netdev_carrier_on(FAR struct uip_driver_s *dev) * ****************************************************************************/ -int netdev_carrier_off(FAR struct uip_driver_s *dev) +int netdev_carrier_off(FAR struct net_driver_s *dev) { if (dev) { diff --git a/nuttx/net/netdev/netdev_count.c b/nuttx/net/netdev/netdev_count.c index 23aac4c99..1a67be883 100644 --- a/nuttx/net/netdev/netdev_count.c +++ b/nuttx/net/netdev/netdev_count.c @@ -91,7 +91,7 @@ int netdev_count(void) { - struct uip_driver_s *dev; + struct net_driver_s *dev; int ndev; netdev_semtake(); diff --git a/nuttx/net/netdev/netdev_findbyaddr.c b/nuttx/net/netdev/netdev_findbyaddr.c index 0abda865c..1966d99f5 100644 --- a/nuttx/net/netdev/netdev_findbyaddr.c +++ b/nuttx/net/netdev/netdev_findbyaddr.c @@ -94,9 +94,9 @@ * ****************************************************************************/ -static FAR struct uip_driver_s *netdev_finddevice(const uip_ipaddr_t addr) +static FAR struct net_driver_s *netdev_finddevice(const uip_ipaddr_t addr) { - struct uip_driver_s *dev; + struct net_driver_s *dev; /* Examine each registered network device */ @@ -147,9 +147,9 @@ static FAR struct uip_driver_s *netdev_finddevice(const uip_ipaddr_t addr) * ****************************************************************************/ -FAR struct uip_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr) +FAR struct net_driver_s *netdev_findbyaddr(const uip_ipaddr_t addr) { - struct uip_driver_s *dev; + struct net_driver_s *dev; #ifdef CONFIG_NET_ROUTE uip_ipaddr_t router; int ret; diff --git a/nuttx/net/netdev/netdev_findbyname.c b/nuttx/net/netdev/netdev_findbyname.c index de351404c..980808652 100644 --- a/nuttx/net/netdev/netdev_findbyname.c +++ b/nuttx/net/netdev/netdev_findbyname.c @@ -90,9 +90,9 @@ * ****************************************************************************/ -FAR struct uip_driver_s *netdev_findbyname(const char *ifname) +FAR struct net_driver_s *netdev_findbyname(const char *ifname) { - struct uip_driver_s *dev; + struct net_driver_s *dev; if (ifname) { netdev_semtake(); diff --git a/nuttx/net/netdev/netdev_foreach.c b/nuttx/net/netdev/netdev_foreach.c index ccec01800..9a5eb491b 100644 --- a/nuttx/net/netdev/netdev_foreach.c +++ b/nuttx/net/netdev/netdev_foreach.c @@ -93,7 +93,7 @@ int netdev_foreach(netdev_callback_t callback, void *arg) { - struct uip_driver_s *dev; + struct net_driver_s *dev; int ret = 0; if (callback) diff --git a/nuttx/net/netdev/netdev_ioctl.c b/nuttx/net/netdev/netdev_ioctl.c index 106476872..af555dda0 100644 --- a/nuttx/net/netdev/netdev_ioctl.c +++ b/nuttx/net/netdev/netdev_ioctl.c @@ -143,7 +143,7 @@ static void ioctl_setipaddr(FAR uip_ipaddr_t *outaddr, FAR const void *inaddr) * ****************************************************************************/ -static void ioctl_ifup(FAR struct uip_driver_s *dev) +static void ioctl_ifup(FAR struct net_driver_s *dev) { /* Make sure that the device supports the d_ifup() method */ @@ -165,7 +165,7 @@ static void ioctl_ifup(FAR struct uip_driver_s *dev) } } -static void ioctl_ifdown(FAR struct uip_driver_s *dev) +static void ioctl_ifdown(FAR struct net_driver_s *dev) { /* Make sure that the device supports the d_ifdown() method */ @@ -201,7 +201,7 @@ static void ioctl_ifdown(FAR struct uip_driver_s *dev) * ****************************************************************************/ -static FAR struct uip_driver_s *netdev_ifrdev(FAR struct ifreq *req) +static FAR struct net_driver_s *netdev_ifrdev(FAR struct ifreq *req) { if (!req) { @@ -236,7 +236,7 @@ static FAR struct uip_driver_s *netdev_ifrdev(FAR struct ifreq *req) static int netdev_ifrioctl(FAR struct socket *psock, int cmd, FAR struct ifreq *req) { - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; int ret = -EINVAL; nvdbg("cmd: %d\n", cmd); @@ -463,7 +463,7 @@ static int netdev_ifrioctl(FAR struct socket *psock, int cmd, ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static FAR struct uip_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) +static FAR struct net_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) { if (!imsf) { @@ -500,7 +500,7 @@ static FAR struct uip_driver_s *netdev_imsfdev(FAR struct ip_msfilter *imsf) static int netdev_imsfioctl(FAR struct socket *psock, int cmd, FAR struct ip_msfilter *imsf) { - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; int ret = -EINVAL; nvdbg("cmd: %d\n", cmd); diff --git a/nuttx/net/netdev/netdev_register.c b/nuttx/net/netdev/netdev_register.c index da48bf7a3..c2e47e3be 100644 --- a/nuttx/net/netdev/netdev_register.c +++ b/nuttx/net/netdev/netdev_register.c @@ -81,7 +81,7 @@ static int g_next_devnum = 0; /* List of registered ethernet device drivers */ -struct uip_driver_s *g_netdevices = NULL; +struct net_driver_s *g_netdevices = NULL; /**************************************************************************** * Private Functions @@ -109,7 +109,7 @@ struct uip_driver_s *g_netdevices = NULL; * ****************************************************************************/ -int netdev_register(FAR struct uip_driver_s *dev) +int netdev_register(FAR struct net_driver_s *dev) { if (dev) { diff --git a/nuttx/net/netdev/netdev_rxnotify.c b/nuttx/net/netdev/netdev_rxnotify.c index 1187cd0d6..5473d934d 100644 --- a/nuttx/net/netdev/netdev_rxnotify.c +++ b/nuttx/net/netdev/netdev_rxnotify.c @@ -96,7 +96,7 @@ void netdev_rxnotify(const uip_ipaddr_t raddr) /* Find the device driver that serves the subnet of the remote address */ - struct uip_driver_s *dev = netdev_findbyaddr(raddr); + struct net_driver_s *dev = netdev_findbyaddr(raddr); if (dev && dev->d_rxavail) { diff --git a/nuttx/net/netdev/netdev_txnotify.c b/nuttx/net/netdev/netdev_txnotify.c index d6aea425a..f044f2d24 100644 --- a/nuttx/net/netdev/netdev_txnotify.c +++ b/nuttx/net/netdev/netdev_txnotify.c @@ -95,7 +95,7 @@ void netdev_txnotify(const uip_ipaddr_t raddr) { /* Find the device driver that serves the subnet of the remote address */ - struct uip_driver_s *dev = netdev_findbyaddr(raddr); + struct net_driver_s *dev = netdev_findbyaddr(raddr); if (dev && dev->d_txavail) { diff --git a/nuttx/net/netdev/netdev_unregister.c b/nuttx/net/netdev/netdev_unregister.c index 35108ba98..150e410f5 100644 --- a/nuttx/net/netdev/netdev_unregister.c +++ b/nuttx/net/netdev/netdev_unregister.c @@ -103,10 +103,10 @@ * ****************************************************************************/ -int netdev_unregister(FAR struct uip_driver_s *dev) +int netdev_unregister(FAR struct net_driver_s *dev) { - struct uip_driver_s *prev; - struct uip_driver_s *curr; + struct net_driver_s *prev; + struct net_driver_s *curr; if (dev) { diff --git a/nuttx/net/pkt/pkt.h b/nuttx/net/pkt/pkt.h index 6404fe748..900f631c2 100644 --- a/nuttx/net/pkt/pkt.h +++ b/nuttx/net/pkt/pkt.h @@ -83,14 +83,14 @@ struct pkt_conn_s *uip_nextpktconn(FAR struct pkt_conn_s *conn); /* Defined in pkt_callback.c ************************************************/ -uint16_t pkt_callback(FAR struct uip_driver_s *dev, +uint16_t pkt_callback(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn, uint16_t flags); /* Defined in pkt_input.c ***************************************************/ /* Defined in pkt_poll.c ****************************************************/ -void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn); +void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn); /**************************************************************************** * Function: psock_pkt_send diff --git a/nuttx/net/pkt/pkt_callback.c b/nuttx/net/pkt/pkt_callback.c index 5e3123628..30dfecaf6 100644 --- a/nuttx/net/pkt/pkt_callback.c +++ b/nuttx/net/pkt/pkt_callback.c @@ -77,7 +77,7 @@ * ****************************************************************************/ -uint16_t pkt_callback(FAR struct uip_driver_s *dev, +uint16_t pkt_callback(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn, uint16_t flags) { nllvdbg("flags: %04x\n", flags); diff --git a/nuttx/net/pkt/pkt_input.c b/nuttx/net/pkt/pkt_input.c index dea9908f1..aaa1e1c89 100644 --- a/nuttx/net/pkt/pkt_input.c +++ b/nuttx/net/pkt/pkt_input.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -int pkt_input(struct uip_driver_s *dev) +int pkt_input(struct net_driver_s *dev) { FAR struct pkt_conn_s *conn; FAR struct eth_hdr_s *pbuf = (struct eth_hdr_s *)dev->d_buf; diff --git a/nuttx/net/pkt/pkt_poll.c b/nuttx/net/pkt/pkt_poll.c index ce6e0ebed..1db880bdb 100644 --- a/nuttx/net/pkt/pkt_poll.c +++ b/nuttx/net/pkt/pkt_poll.c @@ -94,7 +94,7 @@ * ****************************************************************************/ -void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn) +void pkt_poll(FAR struct net_driver_s *dev, FAR struct pkt_conn_s *conn) { nlldbg("IN\n"); diff --git a/nuttx/net/pkt/pkt_send.c b/nuttx/net/pkt/pkt_send.c index f063dc87a..bc2c2b33c 100644 --- a/nuttx/net/pkt/pkt_send.c +++ b/nuttx/net/pkt/pkt_send.c @@ -90,7 +90,7 @@ struct send_s * Function: psock_send_interrupt ****************************************************************************/ -static uint16_t psock_send_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { @@ -246,7 +246,7 @@ ssize_t psock_pkt_send(FAR struct socket *psock, FAR const void *buf, state.snd_cb = pkt_callbackalloc(conn); if (state.snd_cb) { - FAR struct uip_driver_s *dev; + FAR struct net_driver_s *dev; /* Set up the callback in the connection */ diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c index 65f8183ab..9c6c576fd 100644 --- a/nuttx/net/recvfrom.c +++ b/nuttx/net/recvfrom.c @@ -122,7 +122,7 @@ struct recvfrom_s ****************************************************************************/ #if defined(CONFIG_NET_UDP) || defined(CONFIG_NET_TCP) -static size_t recvfrom_newdata(FAR struct uip_driver_s *dev, +static size_t recvfrom_newdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { size_t recvlen; @@ -172,7 +172,7 @@ static size_t recvfrom_newdata(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_PKT -static void recvfrom_newpktdata(FAR struct uip_driver_s *dev, +static void recvfrom_newpktdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { size_t recvlen; @@ -218,7 +218,7 @@ static void recvfrom_newpktdata(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline void recvfrom_newtcpdata(FAR struct uip_driver_s *dev, +static inline void recvfrom_newtcpdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { /* Take as much data from the packet as we can */ @@ -290,7 +290,7 @@ static inline void recvfrom_newtcpdata(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_UDP -static inline void recvfrom_newudpdata(FAR struct uip_driver_s *dev, +static inline void recvfrom_newudpdata(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { /* Take as much data from the packet as we can */ @@ -472,7 +472,7 @@ static int recvfrom_timeout(struct recvfrom_s *pstate) ****************************************************************************/ #ifdef CONFIG_NET_PKT -static inline void recvfrom_pktsender(FAR struct uip_driver_s *dev, +static inline void recvfrom_pktsender(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { } @@ -492,7 +492,7 @@ static inline void recvfrom_pktsender(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_PKT -static uint16_t recvfrom_pktinterrupt(FAR struct uip_driver_s *dev, +static uint16_t recvfrom_pktinterrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { @@ -560,7 +560,7 @@ static uint16_t recvfrom_pktinterrupt(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline void recvfrom_tcpsender(FAR struct uip_driver_s *dev, +static inline void recvfrom_tcpsender(FAR struct net_driver_s *dev, FAR struct recvfrom_s *pstate) { #ifdef CONFIG_NET_IPv6 @@ -604,7 +604,7 @@ static inline void recvfrom_tcpsender(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, +static uint16_t recvfrom_tcpinterrupt(FAR struct net_driver_s *dev, FAR void *conn, FAR void *pvpriv, uint16_t flags) { @@ -807,7 +807,7 @@ static uint16_t recvfrom_tcpinterrupt(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_UDP -static inline void recvfrom_udpsender(struct uip_driver_s *dev, struct recvfrom_s *pstate) +static inline void recvfrom_udpsender(struct net_driver_s *dev, struct recvfrom_s *pstate) { #ifdef CONFIG_NET_IPv6 FAR struct sockaddr_in6 *infrom = pstate->rf_from; @@ -850,7 +850,7 @@ static inline void recvfrom_udpsender(struct uip_driver_s *dev, struct recvfrom_ ****************************************************************************/ #ifdef CONFIG_NET_UDP -static uint16_t recvfrom_udpinterrupt(struct uip_driver_s *dev, void *pvconn, +static uint16_t recvfrom_udpinterrupt(struct net_driver_s *dev, void *pvconn, void *pvpriv, uint16_t flags) { struct recvfrom_s *pstate = (struct recvfrom_s *)pvpriv; diff --git a/nuttx/net/route/netdev_router.c b/nuttx/net/route/netdev_router.c index 81d091ba2..d62fe5f0f 100644 --- a/nuttx/net/route/netdev_router.c +++ b/nuttx/net/route/netdev_router.c @@ -57,7 +57,7 @@ struct route_devmatch_s { - FAR struct uip_driver_s *dev; /* The route must use this device */ + FAR struct net_driver_s *dev; /* The route must use this device */ uip_ipaddr_t target; /* The target IP address on an external network to match */ uip_ipaddr_t router; /* The IP address of the router on one of our networks*/ }; @@ -84,7 +84,7 @@ struct route_devmatch_s static int net_devmatch(FAR struct net_route_s *route, FAR void *arg) { FAR struct route_devmatch_s *match = (FAR struct route_devmatch_s *)arg; - FAR struct uip_driver_s *dev = match->dev; + FAR struct net_driver_s *dev = match->dev; /* To match, (1) the masked target addresses must be the same, and (2) the * router address must like on the network provided by the device. @@ -133,10 +133,10 @@ static int net_devmatch(FAR struct net_route_s *route, FAR void *arg) ****************************************************************************/ #ifdef CONFIG_NET_IPv6 -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, uip_ipaddr_t router) #else -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, FAR uip_ipaddr_t *router) #endif { diff --git a/nuttx/net/route/route.h b/nuttx/net/route/route.h index 140afdf5d..a91db2c47 100644 --- a/nuttx/net/route/route.h +++ b/nuttx/net/route/route.h @@ -229,13 +229,13 @@ int net_router(uip_ipaddr_t target, FAR uip_ipaddr_t *router); * ****************************************************************************/ -struct uip_driver_s; +struct net_driver_s; #ifdef CONFIG_NET_IPv6 -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, uip_ipaddr_t router); #else -void netdev_router(FAR struct uip_driver_s *dev, uip_ipaddr_t target, +void netdev_router(FAR struct net_driver_s *dev, uip_ipaddr_t target, FAR uip_ipaddr_t *router); #endif diff --git a/nuttx/net/sendto.c b/nuttx/net/sendto.c index b51e29874..e88f69175 100644 --- a/nuttx/net/sendto.c +++ b/nuttx/net/sendto.c @@ -163,7 +163,7 @@ static inline int send_timeout(FAR struct sendto_s *pstate) ****************************************************************************/ #ifdef CONFIG_NET_UDP -static uint16_t sendto_interrupt(struct uip_driver_s *dev, void *conn, +static uint16_t sendto_interrupt(struct net_driver_s *dev, void *conn, void *pvpriv, uint16_t flags) { FAR struct sendto_s *pstate = (FAR struct sendto_s *)pvpriv; diff --git a/nuttx/net/tcp/tcp.h b/nuttx/net/tcp/tcp.h index ef75526de..3e4f193d4 100644 --- a/nuttx/net/tcp/tcp.h +++ b/nuttx/net/tcp/tcp.h @@ -90,42 +90,42 @@ void tcp_nextsequence(void); /* Defined in tcp_poll.c ****************************************************/ -void tcp_poll(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn); +void tcp_poll(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn); /* Defined in tcp_timer.c ***************************************************/ -void tcp_timer(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, int hsec); /* Defined in tcp_listen.c **************************************************/ void tcp_listeninit(void); bool tcp_islistener(uint16_t port); -int tcp_accept_connection(FAR struct uip_driver_s *dev, +int tcp_accept_connection(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t portno); /* Defined in tcp_send.c ****************************************************/ -void tcp_send(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_send(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags, uint16_t len); -void tcp_reset(FAR struct uip_driver_s *dev); -void tcp_ack(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_reset(FAR struct net_driver_s *dev); +void tcp_ack(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint8_t ack); /* Defined in tcp_appsend.c *************************************************/ -void tcp_appsend(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result); -void tcp_rexmit(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result); /* Defined in tcp_input.c ***************************************************/ -void tcp_input(FAR struct uip_driver_s *dev); +void tcp_input(FAR struct net_driver_s *dev); /* Defined in tcp_callback.c ************************************************/ -uint16_t tcp_callback(FAR struct uip_driver_s *dev, +uint16_t tcp_callback(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags); #ifdef CONFIG_NET_TCP_READAHEAD uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, diff --git a/nuttx/net/tcp/tcp_appsend.c b/nuttx/net/tcp/tcp_appsend.c index eb4214d55..f02049208 100644 --- a/nuttx/net/tcp/tcp_appsend.c +++ b/nuttx/net/tcp/tcp_appsend.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -void tcp_appsend(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result) { /* Handle the result based on the application response */ @@ -183,7 +183,7 @@ void tcp_appsend(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, * ****************************************************************************/ -void tcp_rexmit(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t result) { nllvdbg("result: %04x d_sndlen: %d conn->unacked: %d\n", diff --git a/nuttx/net/tcp/tcp_callback.c b/nuttx/net/tcp/tcp_callback.c index f09bf995f..bbd886173 100644 --- a/nuttx/net/tcp/tcp_callback.c +++ b/nuttx/net/tcp/tcp_callback.c @@ -77,7 +77,7 @@ ****************************************************************************/ static inline uint16_t -uip_dataevent(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +uip_dataevent(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags) { uint16_t ret; @@ -148,7 +148,7 @@ uip_dataevent(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, * ****************************************************************************/ -uint16_t tcp_callback(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +uint16_t tcp_callback(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags) { /* Preserve the UIP_ACKDATA, UIP_CLOSE, and UIP_ABORT in the response. diff --git a/nuttx/net/tcp/tcp_input.c b/nuttx/net/tcp/tcp_input.c index 634343004..909996a23 100644 --- a/nuttx/net/tcp/tcp_input.c +++ b/nuttx/net/tcp/tcp_input.c @@ -98,7 +98,7 @@ * ****************************************************************************/ -void tcp_input(struct uip_driver_s *dev) +void tcp_input(struct net_driver_s *dev) { struct tcp_conn_s *conn = NULL; struct tcp_iphdr_s *pbuf = BUF; diff --git a/nuttx/net/tcp/tcp_listen.c b/nuttx/net/tcp/tcp_listen.c index 1b48dc2ee..be9324103 100644 --- a/nuttx/net/tcp/tcp_listen.c +++ b/nuttx/net/tcp/tcp_listen.c @@ -247,7 +247,7 @@ bool tcp_islistener(uint16_t portno) * ****************************************************************************/ -int tcp_accept_connection(FAR struct uip_driver_s *dev, +int tcp_accept_connection(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t portno) { FAR struct tcp_conn_s *listener; diff --git a/nuttx/net/tcp/tcp_poll.c b/nuttx/net/tcp/tcp_poll.c index 3fc9609d7..465a3e253 100644 --- a/nuttx/net/tcp/tcp_poll.c +++ b/nuttx/net/tcp/tcp_poll.c @@ -94,7 +94,7 @@ * ****************************************************************************/ -void tcp_poll(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn) +void tcp_poll(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) { uint8_t result; diff --git a/nuttx/net/tcp/tcp_send.c b/nuttx/net/tcp/tcp_send.c index 929ca1c9b..f404e9d59 100644 --- a/nuttx/net/tcp/tcp_send.c +++ b/nuttx/net/tcp/tcp_send.c @@ -91,7 +91,7 @@ * ****************************************************************************/ -static void tcp_sendcomplete(FAR struct uip_driver_s *dev) +static void tcp_sendcomplete(FAR struct net_driver_s *dev) { FAR struct tcp_iphdr_s *pbuf = BUF; @@ -172,7 +172,7 @@ static void tcp_sendcomplete(FAR struct uip_driver_s *dev) * ****************************************************************************/ -static void tcp_sendcommon(FAR struct uip_driver_s *dev, +static void tcp_sendcommon(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) { FAR struct tcp_iphdr_s *pbuf = BUF; @@ -233,7 +233,7 @@ static void tcp_sendcommon(FAR struct uip_driver_s *dev, * ****************************************************************************/ -void tcp_send(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_send(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint16_t flags, uint16_t len) { FAR struct tcp_iphdr_s *pbuf = BUF; @@ -261,7 +261,7 @@ void tcp_send(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, * ****************************************************************************/ -void tcp_reset(FAR struct uip_driver_s *dev) +void tcp_reset(FAR struct net_driver_s *dev) { FAR struct tcp_iphdr_s *pbuf = BUF; uint16_t tmp16; @@ -344,7 +344,7 @@ void tcp_reset(FAR struct uip_driver_s *dev) * ****************************************************************************/ -void tcp_ack(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_ack(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, uint8_t ack) { struct tcp_iphdr_s *pbuf = BUF; diff --git a/nuttx/net/tcp/tcp_send_buffered.c b/nuttx/net/tcp/tcp_send_buffered.c index 37359406f..d51a6efbf 100644 --- a/nuttx/net/tcp/tcp_send_buffered.c +++ b/nuttx/net/tcp/tcp_send_buffered.c @@ -213,7 +213,7 @@ static inline void psock_lost_connection(FAR struct socket *psock, * ****************************************************************************/ -static uint16_t psock_send_interrupt(FAR struct uip_driver_s *dev, +static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/nuttx/net/tcp/tcp_send_unbuffered.c b/nuttx/net/tcp/tcp_send_unbuffered.c index 0736b220c..39474cfc3 100644 --- a/nuttx/net/tcp/tcp_send_unbuffered.c +++ b/nuttx/net/tcp/tcp_send_unbuffered.c @@ -162,7 +162,7 @@ static inline int send_timeout(FAR struct send_s *pstate) * ****************************************************************************/ -static uint16_t tcpsend_interrupt(FAR struct uip_driver_s *dev, +static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, FAR void *pvconn, FAR void *pvpriv, uint16_t flags) { diff --git a/nuttx/net/tcp/tcp_timer.c b/nuttx/net/tcp/tcp_timer.c index 228abf6e3..87083aef6 100644 --- a/nuttx/net/tcp/tcp_timer.c +++ b/nuttx/net/tcp/tcp_timer.c @@ -96,7 +96,7 @@ * ****************************************************************************/ -void tcp_timer(FAR struct uip_driver_s *dev, FAR struct tcp_conn_s *conn, +void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, int hsec) { uint8_t result; diff --git a/nuttx/net/udp/Kconfig b/nuttx/net/udp/Kconfig index 16b535c9c..d52f4f7a2 100644 --- a/nuttx/net/udp/Kconfig +++ b/nuttx/net/udp/Kconfig @@ -46,7 +46,7 @@ config NET_RXAVAIL support retention of UDP packets in that RAM. If the drivers supports such a capability, this option may be enabled to use it. NOTE: If this option is enabled, the driver must support the - rxavail() method in the uip_driver_s structure. + rxavail() method in the net_driver_s structure. endif # NET_UDP endmenu # UDP Networking diff --git a/nuttx/net/udp/udp.h b/nuttx/net/udp/udp.h index 7ebaf19d2..803a28b49 100644 --- a/nuttx/net/udp/udp.h +++ b/nuttx/net/udp/udp.h @@ -81,19 +81,19 @@ FAR struct udp_conn_s *uip_nextudpconn(FAR struct udp_conn_s *conn); /* Defined in udp_poll.c ****************************************************/ -void udp_poll(FAR struct uip_driver_s *dev, FAR struct udp_conn_s *conn); +void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn); /* Defined in udp_send.c ****************************************************/ -void udp_send(FAR struct uip_driver_s *dev, FAR struct udp_conn_s *conn); +void udp_send(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn); /* Defined in udp_input.c ***************************************************/ -int udp_input(FAR struct uip_driver_s *dev); +int udp_input(FAR struct net_driver_s *dev); /* Defined in udp_callback.c ************************************************/ -uint16_t udp_callback(FAR struct uip_driver_s *dev, +uint16_t udp_callback(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, uint16_t flags); #undef EXTERN diff --git a/nuttx/net/udp/udp_callback.c b/nuttx/net/udp/udp_callback.c index 85edd388f..4c57db744 100644 --- a/nuttx/net/udp/udp_callback.c +++ b/nuttx/net/udp/udp_callback.c @@ -77,7 +77,7 @@ * ****************************************************************************/ -uint16_t udp_callback(FAR struct uip_driver_s *dev, +uint16_t udp_callback(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn, uint16_t flags) { nllvdbg("flags: %04x\n", flags); diff --git a/nuttx/net/udp/udp_input.c b/nuttx/net/udp/udp_input.c index 61c1f80ed..43408f4cf 100644 --- a/nuttx/net/udp/udp_input.c +++ b/nuttx/net/udp/udp_input.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -int udp_input(FAR struct uip_driver_s *dev) +int udp_input(FAR struct net_driver_s *dev) { FAR struct udp_conn_s *conn; FAR struct udp_iphdr_s *pbuf = UDPBUF; diff --git a/nuttx/net/udp/udp_poll.c b/nuttx/net/udp/udp_poll.c index cd0360468..6196fca2d 100644 --- a/nuttx/net/udp/udp_poll.c +++ b/nuttx/net/udp/udp_poll.c @@ -93,7 +93,7 @@ * ****************************************************************************/ -void udp_poll(FAR struct uip_driver_s *dev, FAR struct udp_conn_s *conn) +void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn) { /* Verify that the UDP connection is valid */ diff --git a/nuttx/net/udp/udp_send.c b/nuttx/net/udp/udp_send.c index c7dee9374..db9b74dd6 100644 --- a/nuttx/net/udp/udp_send.c +++ b/nuttx/net/udp/udp_send.c @@ -95,7 +95,7 @@ * ****************************************************************************/ -void udp_send(struct uip_driver_s *dev, struct udp_conn_s *conn) +void udp_send(struct net_driver_s *dev, struct udp_conn_s *conn) { FAR struct udp_iphdr_s *pudpbuf = UDPBUF; diff --git a/nuttx/net/uip/uip.h b/nuttx/net/uip/uip.h index 07852e045..c0094f0d0 100644 --- a/nuttx/net/uip/uip.h +++ b/nuttx/net/uip/uip.h @@ -156,7 +156,7 @@ void uip_callbackfree(FAR struct uip_callback_s *cb, * ****************************************************************************/ -uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, FAR void *pvconn, +uint16_t uip_callbackexecute(FAR struct net_driver_s *dev, FAR void *pvconn, uint16_t flags, FAR struct uip_callback_s *list); /**************************************************************************** @@ -183,16 +183,16 @@ uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, FAR void *pvconn, * ****************************************************************************/ -void uip_send(FAR struct uip_driver_s *dev, FAR const void *buf, int len); +void uip_send(FAR struct net_driver_s *dev, FAR const void *buf, int len); #ifdef CONFIG_NET_IOB struct iob_s; -void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *buf, +void uip_iobsend(FAR struct net_driver_s *dev, FAR struct iob_s *buf, unsigned int len, unsigned int offset); #endif #ifdef CONFIG_NET_PKT -void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf, +void uip_pktsend(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len); #endif diff --git a/nuttx/net/uip/uip_callback.c b/nuttx/net/uip/uip_callback.c index e036dc562..585ac0cef 100644 --- a/nuttx/net/uip/uip_callback.c +++ b/nuttx/net/uip/uip_callback.c @@ -220,7 +220,7 @@ void uip_callbackfree(FAR struct uip_callback_s *cb, * ****************************************************************************/ -uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, void *pvconn, +uint16_t uip_callbackexecute(FAR struct net_driver_s *dev, void *pvconn, uint16_t flags, FAR struct uip_callback_s *list) { FAR struct uip_callback_s *next; diff --git a/nuttx/net/uip/uip_input.c b/nuttx/net/uip/uip_input.c index 557023202..eaddac9bf 100644 --- a/nuttx/net/uip/uip_input.c +++ b/nuttx/net/uip/uip_input.c @@ -307,7 +307,7 @@ nullreturn: * ****************************************************************************/ -int uip_input(struct uip_driver_s *dev) +int uip_input(struct net_driver_s *dev) { struct uip_ip_hdr *pbuf = BUF; uint16_t iplen; diff --git a/nuttx/net/uip/uip_iobsend.c b/nuttx/net/uip/uip_iobsend.c index 874e78e7f..ed18cf583 100644 --- a/nuttx/net/uip/uip_iobsend.c +++ b/nuttx/net/uip/uip_iobsend.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *iob, +void uip_iobsend(FAR struct net_driver_s *dev, FAR struct iob_s *iob, unsigned int len, unsigned int offset) { DEBUGASSERT(dev && len > 0 && len < CONFIG_NET_BUFSIZE); diff --git a/nuttx/net/uip/uip_pktsend.c b/nuttx/net/uip/uip_pktsend.c index 379845922..1e5524481 100644 --- a/nuttx/net/uip/uip_pktsend.c +++ b/nuttx/net/uip/uip_pktsend.c @@ -97,7 +97,7 @@ * ****************************************************************************/ -void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf, +void uip_pktsend(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len) { DEBUGASSERT(dev && len > 0 && len < CONFIG_NET_BUFSIZE); diff --git a/nuttx/net/uip/uip_poll.c b/nuttx/net/uip/uip_poll.c index f7c212f99..fef5c0ace 100644 --- a/nuttx/net/uip/uip_poll.c +++ b/nuttx/net/uip/uip_poll.c @@ -74,7 +74,7 @@ ****************************************************************************/ #if defined(CONFIG_NET_PKT) -static int uip_pollpktconnections(struct uip_driver_s *dev, +static int uip_pollpktconnections(struct net_driver_s *dev, uip_poll_callback_t callback) { FAR struct pkt_conn_s *pkt_conn = NULL; @@ -110,7 +110,7 @@ static int uip_pollpktconnections(struct uip_driver_s *dev, ****************************************************************************/ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) -static inline int uip_pollicmp(FAR struct uip_driver_s *dev, +static inline int uip_pollicmp(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { /* Perform the UDP TX poll */ @@ -136,7 +136,7 @@ static inline int uip_pollicmp(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_IGMP -static inline int uip_polligmp(FAR struct uip_driver_s *dev, +static inline int uip_polligmp(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { /* Perform the IGMP TX poll */ @@ -162,7 +162,7 @@ static inline int uip_polligmp(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_UDP -static int uip_polludpconnections(FAR struct uip_driver_s *dev, +static int uip_polludpconnections(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { FAR struct udp_conn_s *conn = NULL; @@ -198,7 +198,7 @@ static int uip_polludpconnections(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline int uip_polltcpconnections(FAR struct uip_driver_s *dev, +static inline int uip_polltcpconnections(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { FAR struct tcp_conn_s *conn = NULL; @@ -237,7 +237,7 @@ static inline int uip_polltcpconnections(FAR struct uip_driver_s *dev, ****************************************************************************/ #ifdef CONFIG_NET_TCP -static inline int uip_polltcptimer(FAR struct uip_driver_s *dev, +static inline int uip_polltcptimer(FAR struct net_driver_s *dev, uip_poll_callback_t callback, int hsec) { FAR struct tcp_conn_s *conn = NULL; @@ -291,7 +291,7 @@ static inline int uip_polltcptimer(FAR struct uip_driver_s *dev, * ****************************************************************************/ -int uip_poll(FAR struct uip_driver_s *dev, uip_poll_callback_t callback) +int uip_poll(FAR struct net_driver_s *dev, uip_poll_callback_t callback) { int bstop; @@ -366,7 +366,7 @@ int uip_poll(FAR struct uip_driver_s *dev, uip_poll_callback_t callback) * ****************************************************************************/ -int uip_timer(FAR struct uip_driver_s *dev, uip_poll_callback_t callback, +int uip_timer(FAR struct net_driver_s *dev, uip_poll_callback_t callback, int hsec) { int bstop; diff --git a/nuttx/net/uip/uip_send.c b/nuttx/net/uip/uip_send.c index f426166b8..515ce8e9c 100644 --- a/nuttx/net/uip/uip_send.c +++ b/nuttx/net/uip/uip_send.c @@ -93,7 +93,7 @@ * ****************************************************************************/ -void uip_send(struct uip_driver_s *dev, const void *buf, int len) +void uip_send(struct net_driver_s *dev, const void *buf, int len) { DEBUGASSERT(dev && len > 0 && len < CONFIG_NET_BUFSIZE); diff --git a/nuttx/net/utils/net_chksum.c b/nuttx/net/utils/net_chksum.c index a48e74935..c6e93873f 100644 --- a/nuttx/net/utils/net_chksum.c +++ b/nuttx/net/utils/net_chksum.c @@ -1,7 +1,7 @@ /**************************************************************************** * net/utils/net_chksum.c * - * Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2010, 2012, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -104,7 +104,7 @@ static uint16_t chksum(uint16_t sum, FAR const uint8_t *data, uint16_t len) return sum; } -static uint16_t upper_layer_chksum(FAR struct uip_driver_s *dev, uint8_t proto) +static uint16_t upper_layer_chksum(FAR struct net_driver_s *dev, uint8_t proto) { struct uip_ip_hdr *pbuf = BUF; uint16_t upper_layer_len; @@ -134,7 +134,7 @@ static uint16_t upper_layer_chksum(FAR struct uip_driver_s *dev, uint8_t proto) } #ifdef CONFIG_NET_IPv6 -static uint16_t icmp_6chksum(FAR struct uip_driver_s *dev) +static uint16_t icmp_6chksum(FAR struct net_driver_s *dev) { return upper_layer_chksum(dev, UIP_PROTO_ICMP6); } @@ -169,18 +169,19 @@ static inline void uip_carry32(FAR uint8_t *sum, uint16_t op16) } } } +#endif /* UIP_ARCH_ADD32 */ /**************************************************************************** * Public Functions ****************************************************************************/ +#if !UIP_ARCH_ADD32 void uip_incr32(FAR uint8_t *op32, uint16_t op16) { op32[3] += (op16 & 0xff); op32[2] += (op16 >> 8); uip_carry32(op32, op16); } - #endif /* UIP_ARCH_ADD32 */ #if !UIP_ARCH_CHKSUM @@ -192,7 +193,7 @@ uint16_t uip_chksum(FAR uint16_t *data, uint16_t len) /* Calculate the IP header checksum of the packet header in d_buf. */ #ifndef UIP_ARCH_IPCHKSUM -uint16_t uip_ipchksum(FAR struct uip_driver_s *dev) +uint16_t uip_ipchksum(FAR struct net_driver_s *dev) { uint16_t sum; @@ -203,7 +204,7 @@ uint16_t uip_ipchksum(FAR struct uip_driver_s *dev) /* Calculate the TCP checksum of the packet in d_buf and d_appdata. */ -uint16_t tcp_chksum(FAR struct uip_driver_s *dev) +uint16_t tcp_chksum(FAR struct net_driver_s *dev) { return upper_layer_chksum(dev, UIP_PROTO_TCP); } @@ -211,7 +212,7 @@ uint16_t tcp_chksum(FAR struct uip_driver_s *dev) /* Calculate the UDP checksum of the packet in d_buf and d_appdata. */ #ifdef CONFIG_NET_UDP_CHECKSUMS -uint16_t udp_chksum(FAR struct uip_driver_s *dev) +uint16_t udp_chksum(FAR struct net_driver_s *dev) { return upper_layer_chksum(dev, UIP_PROTO_UDP); } @@ -220,7 +221,7 @@ uint16_t udp_chksum(FAR struct uip_driver_s *dev) /* Calculate the checksum of the ICMP message */ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) -uint16_t icmp_chksum(FAR struct uip_driver_s *dev, int len) +uint16_t icmp_chksum(FAR struct net_driver_s *dev, int len) { FAR struct icmp_iphdr_s *picmp = ICMPBUF; return uip_chksum((uint16_t*)&picmp->type, len); |