File: //usr/src/file_protector-1.1-1599/network/udp_socket_manager.h
/**
@file udp_socket_manager.h
@brief Manager for UDP socket flow
@details Copyright (c) 2025 Acronis International GmbH
@author Denis Kopyrin (denis.kopyrin@acronis.com)
@since $Id: $
*/
#pragma once
#include <linux/dcache.h>
#include <linux/fs.h>
#ifdef KERNEL_MOCK
#include "mock/mock_net.h"
#endif
#include <linux/net.h>
#include <linux/socket.h>
#include "task_info_map.h"
int udp_socket_manager_init(void);
void udp_socket_manager_deinit(void);
void udp_socket_manager_activate(void);
void udp_socket_manager_deactivate(void);
// This hook is used to ensure that inode for sb is free'd
void udp_socket_manager_inode_free_security(const struct inode *inode);
// sockets passed here must refer to SOCK_DGRAM protocol (and probably be not loopback'd)
// Check if the socket was sniffed from the UDP flow from and send the event if needed.
void udp_socket_manager_sendmsg(task_info_t* task_info, struct socket *sock, struct msghdr *msg, int size);