LCOV - code coverage report
Current view: top level - source4/torture/smb2 - oplock_break_handler.h (source / functions) Hit Total Coverage
Test: coverage report for master 6248eab5 Lines: 4 4 100.0 %
Date: 2021-08-25 13:27:56 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :  * Unix SMB/CIFS implementation.
       3             :  *
       4             :  * test suite for SMB2 replay
       5             :  *
       6             :  * Copyright (C) Anubhav Rakshit 2014
       7             :  * Copyright (C) Stefan Metzmacher 2014
       8             :  *
       9             :  * This program is free software; you can redistribute it and/or modify
      10             :  * it under the terms of the GNU General Public License as published by
      11             :  * the Free Software Foundation; either version 3 of the License, or
      12             :  * (at your option) any later version.
      13             :  *
      14             :  * This program is distributed in the hope that it will be useful,
      15             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17             :  * GNU General Public License for more details.
      18             :  *
      19             :  * You should have received a copy of the GNU General Public License
      20             :  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
      21             :  */
      22             : 
      23             : #ifndef __OPLOCK_BREAK_HANDLER_H__
      24             : #define __OPLOCK_BREAK_HANDLER_H__
      25             : 
      26             : struct break_info {
      27             :         struct torture_context *tctx;
      28             :         bool oplock_skip_ack;
      29             :         struct smb2_handle handle;
      30             :         uint8_t level;
      31             :         struct smb2_break br;
      32             :         int count;
      33             :         int failures;
      34             :         NTSTATUS failure_status;
      35             :         struct smb2_transport *received_transport;
      36             : };
      37             : 
      38             : extern struct break_info break_info;
      39             : 
      40             : bool torture_oplock_ack_handler(struct smb2_transport *transport,
      41             :                                 const struct smb2_handle *handle,
      42             :                                 uint8_t level,
      43             :                                 void *private_data);
      44             : bool torture_oplock_ignore_handler(struct smb2_transport *transport,
      45             :                                 const struct smb2_handle *handle,
      46             :                                 uint8_t level,
      47             :                                 void *private_data);
      48             : void torture_wait_for_oplock_break(struct torture_context *tctx);
      49             : 
      50         308 : static inline void torture_reset_break_info(struct torture_context *tctx,
      51             :                               struct break_info *r)
      52             : {
      53         308 :         ZERO_STRUCTP(r);
      54         308 :         r->tctx = tctx;
      55         308 : }
      56             : 
      57             : #endif /* __OPLOCK_BREAK_HANDLER_H__ */

Generated by: LCOV version 1.13