From 47c55c3d9603200e72bfdd1d2522b684b125269e Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 18 Feb 2018 17:49:54 +0100 Subject: [PATCH] Improve documentation for 6LOWPAN and SLIPIF --- doc/doxygen/lwip.Doxyfile | 1 + src/netif/lowpan6.c | 25 +++++++++++++++++++++++++ src/netif/slipif.c | 5 +++++ 3 files changed, 31 insertions(+) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 70d83a46..298fc0d5 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2136,6 +2136,7 @@ PREDEFINED = __DOXYGEN__=1 \ SO_REUSE=1 \ SO_REUSE_RXTOALL=1 \ LWIP_HAVE_SLIPIF=1 \ + SLIP_RX_FROM_ISR=1 \ LWIP_6LOWPAN=1 \ LWIP_TCP_PCB_NUM_EXT_ARGS=1 diff --git a/src/netif/lowpan6.c b/src/netif/lowpan6.c index db786caa..4d9227d0 100644 --- a/src/netif/lowpan6.c +++ b/src/netif/lowpan6.c @@ -577,6 +577,10 @@ lowpan6_frag(struct netif *netif, struct pbuf *p, const struct ieee_802154_addr return err; } +/** + * @ingroup sixlowpan + * Set context + */ err_t lowpan6_set_context(u8_t idx, const ip6_addr_t *context) { @@ -592,6 +596,10 @@ lowpan6_set_context(u8_t idx, const ip6_addr_t *context) } #if LWIP_6LOWPAN_INFER_SHORT_ADDRESS +/** + * @ingroup sixlowpan + * Set short address + */ err_t lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low) { @@ -603,6 +611,10 @@ lowpan6_set_short_addr(u8_t addr_high, u8_t addr_low) #endif /* LWIP_6LOWPAN_INFER_SHORT_ADDRESS */ #if LWIP_IPV4 +/** + * @ingroup sixlowpan + * IPv4 output + */ err_t lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) { @@ -615,6 +627,7 @@ lowpan4_output(struct netif *netif, struct pbuf *q, const ip4_addr_t *ipaddr) #endif /* LWIP_IPV4 */ /** + * @ingroup sixlowpan * Resolve and fill-in IEEE 802.15.4 address header for outgoing IPv6 packet. * * Perform Header Compression and fragment if necessary. @@ -985,6 +998,10 @@ lowpan6_decompress(struct pbuf *p, struct ieee_802154_addr *src, struct ieee_802 return q; } +/** + * @ingroup sixlowpan + * NETIF input function + */ err_t lowpan6_input(struct pbuf *p, struct netif *netif) { @@ -1167,6 +1184,9 @@ lowpan6_input(struct pbuf *p, struct netif *netif) return ip6_input(p, netif); } +/** + * @ingroup sixlowpan + */ err_t lowpan6_if_init(struct netif *netif) { @@ -1188,6 +1208,10 @@ lowpan6_if_init(struct netif *netif) return ERR_OK; } +/** + * @ingroup sixlowpan + * Set PAN ID + */ err_t lowpan6_set_pan_id(u16_t pan_id) { @@ -1198,6 +1222,7 @@ lowpan6_set_pan_id(u16_t pan_id) #if !NO_SYS /** + * @ingroup sixlowpan * Pass a received packet to tcpip_thread for input processing * * @param p the received packet, p->payload pointing to the diff --git a/src/netif/slipif.c b/src/netif/slipif.c index 689877e8..fc5fd182 100644 --- a/src/netif/slipif.c +++ b/src/netif/slipif.c @@ -342,6 +342,7 @@ slipif_loop_thread(void *nf) #endif /* SLIP_USE_RX_THREAD */ /** + * @ingroup slipif * SLIP netif initialization * * Call the arch specific sio_open and remember @@ -414,6 +415,7 @@ slipif_init(struct netif *netif) } /** + * @ingroup slipif * Polls the serial device and feeds the IP layer with incoming packets. * * @param netif The lwip network interface structure for this slipif @@ -436,6 +438,7 @@ slipif_poll(struct netif *netif) #if SLIP_RX_FROM_ISR /** + * @ingroup slipif * Feeds the IP layer with incoming packets that were receive * * @param netif The lwip network interface structure for this slipif @@ -510,6 +513,7 @@ slipif_rxbyte_enqueue(struct netif *netif, u8_t data) } /** + * @ingroup slipif * Process a received byte, completed packets are put on a queue that is * fed into IP through slipif_process_rxqueue(). * @@ -527,6 +531,7 @@ slipif_received_byte(struct netif *netif, u8_t data) } /** + * @ingroup slipif * Process multiple received byte, completed packets are put on a queue that is * fed into IP through slipif_process_rxqueue(). *