LCOV - code coverage report
Current view: top level - bpfilter/xlate/nft - nft.c (source / functions) Coverage Total Hit
Test: coverage.lcov Lines: 80.0 % 10 8
Test Date: 2025-11-24 12:34:34 Functions: 80.0 % 5 4
Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : /* SPDX-License-Identifier: GPL-2.0-only */
       2                 :             : /*
       3                 :             :  * Copyright (c) 2022 Meta Platforms, Inc. and affiliates.
       4                 :             :  */
       5                 :             : 
       6                 :             : #include <errno.h>
       7                 :             : 
       8                 :             : #include <bpfilter/helper.h>
       9                 :             : #include <bpfilter/pack.h>
      10                 :             : #include <bpfilter/request.h>
      11                 :             : #include <bpfilter/response.h>
      12                 :             : 
      13                 :             : #include "xlate/front.h"
      14                 :             : 
      15                 :          20 : static int _bf_nft_setup(void)
      16                 :             : {
      17                 :          20 :     return 0;
      18                 :             : }
      19                 :             : 
      20                 :          19 : static int _bf_nft_teardown(void)
      21                 :             : {
      22                 :          19 :     return 0;
      23                 :             : }
      24                 :             : 
      25                 :          77 : static int _bf_nft_pack(bf_wpack_t *pack)
      26                 :             : {
      27                 :             :     UNUSED(pack);
      28                 :             : 
      29                 :          77 :     return 0;
      30                 :             : }
      31                 :             : 
      32                 :           2 : static int _bf_nft_unpack(bf_rpack_node_t node)
      33                 :             : {
      34                 :             :     UNUSED(node);
      35                 :             : 
      36                 :           2 :     return 0;
      37                 :             : }
      38                 :             : 
      39                 :           0 : static int _bf_nft_request_handler(const struct bf_request *request,
      40                 :             :                                    struct bf_response **response)
      41                 :             : {
      42                 :             :     UNUSED(request);
      43                 :             : 
      44                 :             :     bf_assert(response);
      45                 :             : 
      46                 :           0 :     return bf_response_new_failure(response, -ENOTSUP);
      47                 :             : }
      48                 :             : 
      49                 :             : const struct bf_front_ops nft_front = {
      50                 :             :     .setup = _bf_nft_setup,
      51                 :             :     .teardown = _bf_nft_teardown,
      52                 :             :     .request_handler = _bf_nft_request_handler,
      53                 :             :     .pack = _bf_nft_pack,
      54                 :             :     .unpack = _bf_nft_unpack,
      55                 :             : };
        

Generated by: LCOV version 2.0-1