1*4f0cafcbSJohn Johansen /* SPDX-License-Identifier: GPL-2.0-only */ 2*4f0cafcbSJohn Johansen /* 3*4f0cafcbSJohn Johansen * AppArmor security module 4*4f0cafcbSJohn Johansen * 5*4f0cafcbSJohn Johansen * This file contains AppArmor inet/inet6 fine grained mediation 6*4f0cafcbSJohn Johansen * 7*4f0cafcbSJohn Johansen * Copyright 2024 Canonical Ltd. 8*4f0cafcbSJohn Johansen * 9*4f0cafcbSJohn Johansen * This program is free software; you can redistribute it and/or 10*4f0cafcbSJohn Johansen * modify it under the terms of the GNU General Public License as 11*4f0cafcbSJohn Johansen * published by the Free Software Foundation, version 2 of the 12*4f0cafcbSJohn Johansen * License. 13*4f0cafcbSJohn Johansen */ 14*4f0cafcbSJohn Johansen #ifndef __AA_AF_INET_H 15*4f0cafcbSJohn Johansen #define __AA_AF_INET_H 16*4f0cafcbSJohn Johansen 17*4f0cafcbSJohn Johansen #include "label.h" 18*4f0cafcbSJohn Johansen 19*4f0cafcbSJohn Johansen int aa_inet_sock_perm(const char *op, u32 request, struct socket *sock); 20*4f0cafcbSJohn Johansen int aa_inet_create_perm(struct aa_label *label, int family, int type, 21*4f0cafcbSJohn Johansen int protocol); 22*4f0cafcbSJohn Johansen int aa_inet_bind_perm(struct socket *sock, struct sockaddr *address, 23*4f0cafcbSJohn Johansen int addrlen); 24*4f0cafcbSJohn Johansen int aa_inet_connect_perm(struct socket *sock, struct sockaddr *address, 25*4f0cafcbSJohn Johansen int addrlen); 26*4f0cafcbSJohn Johansen int aa_inet_listen_perm(struct socket *sock, int backlog); 27*4f0cafcbSJohn Johansen int aa_inet_accept_perm(struct socket *sock, struct socket *newsock); 28*4f0cafcbSJohn Johansen int aa_inet_msg_perm(const char *op, u32 request, struct socket *sock, 29*4f0cafcbSJohn Johansen struct msghdr *msg, int size); 30*4f0cafcbSJohn Johansen int aa_inet_opt_perm(const char *op, u32 request, struct socket *sock, int level, 31*4f0cafcbSJohn Johansen int optname); 32*4f0cafcbSJohn Johansen int aa_inet_file_perm(const struct cred *subj_cred, 33*4f0cafcbSJohn Johansen struct aa_label *label, const char *op, u32 request, 34*4f0cafcbSJohn Johansen struct socket *sock); 35*4f0cafcbSJohn Johansen 36*4f0cafcbSJohn Johansen #endif /* __AA_AF_INET_H */ 37