LCOV - code coverage report
Current view: top level - vnsw/agent/services/multicast/grpmgmt - gmp_trace.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 2 2 100.0 %
Date: 2026-08-03 02:19:58 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* $Id: gmp_trace.h 346474 2009-11-14 10:18:58Z ssiano $
       2             :  *
       3             :  * gmp_trace.h - GMP role-independent trace support
       4             :  *
       5             :  * Dave Katz, March 2008
       6             :  *
       7             :  * Copyright (c) 2008, Juniper Networks, Inc.
       8             :  * All rights reserved.
       9             :  */
      10             : 
      11             : /* Packet tracing flags */
      12             : 
      13             : #define GMP_TRACE_QUERY        0x00000001 /* Query packets */
      14             : #define GMP_TRACE_QUERY_DETAIL    0x00000002 /* Detailed query packets */
      15             : #define GMP_TRACE_REPORT    0x00000004 /* Report packets */
      16             : #define GMP_TRACE_REPORT_DETAIL 0x00000008 /* Detailed report packets */
      17             : #define GMP_TRACE_LEAVE        0x00000010 /* Leave packets */
      18             : #define GMP_TRACE_LEAVE_DETAIL    0x00000020 /* Detailed leave packets */
      19             : #define GMP_TRACE_PACKET_BAD    0x00000040 /* Bad packets */
      20             : #define GMP_TRACE_PACKET (GMP_TRACE_QUERY | GMP_TRACE_REPORT | \
      21             :               GMP_TRACE_LEAVE) /* Packets */
      22             : #define GMP_TRACE_PACKET_DETAIL (GMP_TRACE_QUERY_DETAIL | \
      23             :                  GMP_TRACE_REPORT_DETAIL | \
      24             :                  GMP_TRACE_LEAVE_DETAIL) /* Detail packets */
      25             : 
      26             : /*
      27             :  * gmp_trace_set
      28             :  *
      29             :  * Returns TRUE if the specified trace flag is in use, or FALSE if not.
      30             :  */
      31             : static inline boolean
      32        1055 : gmp_trace_set (uint32_t traceflags, uint32_t tracebits)
      33             : {
      34        1055 :     return ((traceflags & tracebits) != 0);
      35             : }
      36             : 
      37             : /*
      38             :  * gmp_trace
      39             :  *
      40             :  * Conditionally trace.
      41             :  */
      42             : #define gmp_trace(context, traceflags, flag, ...) \
      43             :     if (gmp_trace_set((traceflags), (flag))) \
      44             :     gmpx_trace((context), __VA_ARGS__)
      45             : 
      46             : extern const char *gmp_proto_string(gmp_proto proto);
      47             : extern const char *gmp_filter_mode_string(gmp_filter_mode mode);
      48             : extern const char *gmp_generic_version_string(gmp_version ver);
      49             : extern const char *gmp_report_type_string(gmp_report_rectype type);

Generated by: LCOV version 1.14