[PATCHv2,09/16] api: odp_packet_flags.h: updated return descriptions

Message ID 1422610133-20756-10-git-send-email-ola.liljedahl@linaro.org
State New
Headers show

Commit Message

Ola Liljedahl Jan. 30, 2015, 9:28 a.m.
Updated doxygen descriptions, particularly the @return/@retval descriptions.
No change of implementation necessary.

Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org>
---
(This document/code contribution attached is provided under the terms of
agreement LES-LTM-21309)

 .../linux-generic/include/api/odp_packet_flags.h   | 57 ++++++++++++++--------
 1 file changed, 38 insertions(+), 19 deletions(-)

Patch

diff --git a/platform/linux-generic/include/api/odp_packet_flags.h b/platform/linux-generic/include/api/odp_packet_flags.h
index 24c4065..399a0bf 100644
--- a/platform/linux-generic/include/api/odp_packet_flags.h
+++ b/platform/linux-generic/include/api/odp_packet_flags.h
@@ -32,7 +32,8 @@  extern "C" {
  * Checks all error flags at once.
  *
  * @param pkt Packet handle
- * @return 1 if packet has errors, 0 otherwise
+ * @retval 1 if packet has errors
+ * @retval 0 if packet has no errors
  */
 int odp_packet_error(odp_packet_t pkt);
 
@@ -40,7 +41,8 @@  int odp_packet_error(odp_packet_t pkt);
  * Check if error was 'frame length' error
  *
  * @param pkt Packet handle
- * @return 1 if frame length error detected, 0 otherwise
+ * @retval 1 if frame length error detected
+ * @retval 0 if frame length error not detected
  */
 int odp_packet_errflag_frame_len(odp_packet_t pkt);
 
@@ -48,7 +50,8 @@  int odp_packet_errflag_frame_len(odp_packet_t pkt);
  * Check for L2 header, e.g. ethernet
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a valid & known L2 header, 0 otherwise
+ * @retval 1 if packet contains a valid & known L2 header
+ * @retval 0 if packet does not contain a valid & known L2 header
  */
 int odp_packet_has_l2(odp_packet_t pkt);
 
@@ -56,7 +59,8 @@  int odp_packet_has_l2(odp_packet_t pkt);
  * Check for L3 header, e.g. IPv4, IPv6
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a valid & known L3 header, 0 otherwise
+ * @retval 1 if packet contains a valid & known L3 header
+ * @retval 0 if packet does not contain a valid & known L3 header
  */
 int odp_packet_has_l3(odp_packet_t pkt);
 
@@ -64,7 +68,8 @@  int odp_packet_has_l3(odp_packet_t pkt);
  * Check for L4 header, e.g. UDP, TCP, SCTP (also ICMP)
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a valid & known L4 header, 0 otherwise
+ * @retval 1 if packet contains a valid & known L4 header
+ * @retval 0 if packet does not contain a valid & known L4 header
  */
 int odp_packet_has_l4(odp_packet_t pkt);
 
@@ -72,7 +77,8 @@  int odp_packet_has_l4(odp_packet_t pkt);
  * Check for Ethernet header
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a valid eth header, 0 otherwise
+ * @retval 1 if packet contains a valid eth header
+ * @retval 0 if packet does not contain a valid & known eth header
  */
 int odp_packet_has_eth(odp_packet_t pkt);
 
@@ -80,7 +86,8 @@  int odp_packet_has_eth(odp_packet_t pkt);
  * Check for jumbo frame
  *
  * @param pkt Packet handle
- * @return 1 if packet contains jumbo frame, 0 otherwise
+ * @retval 1 if packet contains a jumbo frame
+ * @retval 0 if packet does not contain a jumbo frame
  */
 int odp_packet_has_jumbo(odp_packet_t pkt);
 
@@ -88,7 +95,8 @@  int odp_packet_has_jumbo(odp_packet_t pkt);
  * Check for VLAN
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a VLAN header, 0 otherwise
+ * @retval 1 if packet contains a VLAN header
+ * @retval 0 if packet does not contain a VLAN header
  */
 int odp_packet_has_vlan(odp_packet_t pkt);
 
@@ -96,7 +104,8 @@  int odp_packet_has_vlan(odp_packet_t pkt);
  * Check for VLAN QinQ (stacked VLAN)
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a VLAN QinQ header, 0 otherwise
+ * @retval 1 if packet contains a VLAN QinQ header
+ * @retval 0 if packet does not contain a VLAN QinQ header
  */
 int odp_packet_has_vlan_qinq(odp_packet_t pkt);
 
@@ -104,7 +113,8 @@  int odp_packet_has_vlan_qinq(odp_packet_t pkt);
  * Check for ARP
  *
  * @param pkt Packet handle
- * @return 1 if packet contains an ARP header, 0 otherwise
+ * @retval 1 if packet contains an ARP message
+ * @retval 0 if packet does not contain an ARP message
  */
 int odp_packet_has_arp(odp_packet_t pkt);
 
@@ -112,7 +122,8 @@  int odp_packet_has_arp(odp_packet_t pkt);
  * Check for IPv4
  *
  * @param pkt Packet handle
- * @return 1 if packet contains an IPv4 header, 0 otherwise
+ * @retval 1 if packet contains an IPv4 header
+ * @retval 0 if packet does not contain an IPv4 header
  */
 int odp_packet_has_ipv4(odp_packet_t pkt);
 
@@ -120,7 +131,8 @@  int odp_packet_has_ipv4(odp_packet_t pkt);
  * Check for IPv6
  *
  * @param pkt Packet handle
- * @return 1 if packet contains an IPv6 header, 0 otherwise
+ * @retval 1 if packet contains an IPv6 header
+ * @retval 0 if packet does not contain an IPv6 header
  */
 int odp_packet_has_ipv6(odp_packet_t pkt);
 
@@ -128,7 +140,8 @@  int odp_packet_has_ipv6(odp_packet_t pkt);
  * Check for IP fragment
  *
  * @param pkt Packet handle
- * @return 1 if packet is an IP fragment, 0 otherwise
+ * @retval 1 if packet is an IP fragment
+ * @retval 0 if packet is not an IP fragment
  */
 int odp_packet_has_ipfrag(odp_packet_t pkt);
 
@@ -136,7 +149,8 @@  int odp_packet_has_ipfrag(odp_packet_t pkt);
  * Check for IP options
  *
  * @param pkt Packet handle
- * @return 1 if packet contains IP options, 0 otherwise
+ * @retval 1 if packet contains IP options
+ * @retval 0 if packet does not contain IP options
  */
 int odp_packet_has_ipopt(odp_packet_t pkt);
 
@@ -144,7 +158,8 @@  int odp_packet_has_ipopt(odp_packet_t pkt);
  * Check for IPSec
  *
  * @param pkt Packet handle
- * @return 1 if packet requires IPSec processing, 0 otherwise
+ * @retval 1 if packet requires IPSec processing
+ * @retval 0 if packet does not require IPSec processing
  */
 int odp_packet_has_ipsec(odp_packet_t pkt);
 
@@ -152,7 +167,8 @@  int odp_packet_has_ipsec(odp_packet_t pkt);
  * Check for UDP
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a UDP header, 0 otherwise
+ * @retval 1 if packet contains a UDP header
+ * @retval 0 if packet does not contain a UDP header
  */
 int odp_packet_has_udp(odp_packet_t pkt);
 
@@ -160,7 +176,8 @@  int odp_packet_has_udp(odp_packet_t pkt);
  * Check for TCP
  *
  * @param pkt Packet handle
- * @return 1 if packet contains a TCP header, 0 otherwise
+ * @retval 1 if packet contains a TCP header
+ * @retval 0 if packet does not contain a TCP header
  */
 int odp_packet_has_tcp(odp_packet_t pkt);
 
@@ -168,7 +185,8 @@  int odp_packet_has_tcp(odp_packet_t pkt);
  * Check for SCTP
  *
  * @param pkt Packet handle
- * @return 1 if packet contains an SCTP header, 0 otherwise
+ * @retval 1 if packet contains a SCTP header
+ * @retval 0 if packet does not contain a SCTP header
  */
 int odp_packet_has_sctp(odp_packet_t pkt);
 
@@ -176,7 +194,8 @@  int odp_packet_has_sctp(odp_packet_t pkt);
  * Check for ICMP
  *
  * @param pkt Packet handle
- * @return 1 if packet contains an ICMP header, 0 otherwise
+ * @retval 1 if packet contains an ICMP header
+ * @retval 0 if packet does not contain an ICMP header
  */
 int odp_packet_has_icmp(odp_packet_t pkt);