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

          Line data    Source code
       1             : /* $Id: gmp_trace.c 346474 2009-11-14 10:18:58Z ssiano $
       2             :  *
       3             :  * gmp_trace.c - 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             : #include "gmpx_basic_types.h"
      11             : #include "gmp.h"
      12             : #include "gmpx_environment.h"
      13             : #include "gmp_private.h"
      14             : #include "gmp_router.h"
      15             : #include "gmpr_private.h"
      16             : #include "gmp_trace.h"
      17             : 
      18             : 
      19             : /*
      20             :  * gmp_proto_string
      21             :  *
      22             :  * Returns a string, given the protocol (GMP_PROTO_xxxx)
      23             :  */
      24             : const char *
      25           0 : gmp_proto_string (gmp_proto proto)
      26             : {
      27           0 :     switch (proto) {
      28           0 :       case GMP_PROTO_IGMP:
      29           0 :         return "IGMP";
      30           0 :       case GMP_PROTO_MLD:
      31           0 :         return "MLD";
      32           0 :       default:
      33           0 :         return "Invalid";
      34             :     }
      35             : }
      36             : 
      37             : 
      38             : /*
      39             :  * gmp_filter_mode_string
      40             :  *
      41             :  * Returns a string given the filter mode (GMP_FILTER_MODE_xxx)
      42             :  */
      43             : const char *
      44           0 : gmp_filter_mode_string (gmp_filter_mode mode)
      45             : {
      46           0 :     switch (mode) {
      47           0 :       case GMP_FILTER_MODE_EXCLUDE:
      48           0 :         return "Exclude";
      49           0 :       case GMP_FILTER_MODE_INCLUDE:
      50           0 :         return "Include";
      51           0 :       default:
      52           0 :         return "Invalid";
      53             :     }
      54             : }
      55             : 
      56             : 
      57             : /*
      58             :  * gmp_generic_version_string
      59             :  *
      60             :  * Returns a string given the generic packet version.
      61             :  */
      62             : const char *
      63           0 : gmp_generic_version_string (gmp_version ver)
      64             : {
      65           0 :     switch (ver) {
      66           0 :       case GMP_VERSION_BASIC:
      67           0 :         return "Basic";
      68           0 :       case GMP_VERSION_LEAVES:
      69           0 :         return "Leaves";
      70           0 :       case GMP_VERSION_SOURCES:
      71           0 :         return "Sources";
      72           0 :       default:
      73           0 :         return "Invalid";
      74             :     }
      75             : }
      76             : 
      77             : 
      78             : /*
      79             :  * gmp_report_type_string
      80             :  *
      81             :  * Returns a string given the report type
      82             :  */
      83             : const char *
      84           0 : gmp_report_type_string (gmp_report_rectype type)
      85             : {
      86           0 :     switch (type) {
      87           0 :       case GMP_RPT_IS_IN:
      88           0 :         return "IS_IN";
      89           0 :       case GMP_RPT_IS_EX:
      90           0 :         return "IS_EX";
      91           0 :       case GMP_RPT_TO_IN:
      92           0 :         return "TO_IN";
      93           0 :       case GMP_RPT_TO_EX:
      94           0 :         return "TO_EX";
      95           0 :       case GMP_RPT_ALLOW:
      96           0 :         return "ALLOW";
      97           0 :       case GMP_RPT_BLOCK:
      98           0 :         return "BLOCK";
      99           0 :       default:
     100           0 :         return "Invalid";
     101             :     }
     102             : }

Generated by: LCOV version 1.14