inpcb: remove unused KPIs to manipulate inpcbs

These KPIs were added in 9d29c635da and through 15 years had zero use.
They slightly remind what IfAPI does for struct ifnet.  But IfAPI does
that for the sake of large collection of NIC drivers not being aware of
struct ifnet.  For the inpcb it is unclear what could be a large
collection of externally written kernel modules that need extensively use
inpcb and not be aware of its internals at the same time. This isolation
of a structure knowledge requires a lot of work, and just throwing in a
few KPIs isn't helpful.

Reviewed by:		kib, bz, markj
Differential Revision:	https://reviews.freebsd.org/D44310
This commit is contained in:
Gleb Smirnoff
2024-03-18 08:49:39 -07:00
parent e600fc7295
commit 027fda80fe
3 changed files with 1 additions and 26 deletions
-22
View File
@@ -2835,28 +2835,6 @@ inp_inpcbtosocket(struct inpcb *inp)
return (inp->inp_socket);
}
struct tcpcb *
inp_inpcbtotcpcb(struct inpcb *inp)
{
INP_WLOCK_ASSERT(inp);
return ((struct tcpcb *)inp->inp_ppcb);
}
int
inp_ip_tos_get(const struct inpcb *inp)
{
return (inp->inp_ip_tos);
}
void
inp_ip_tos_set(struct inpcb *inp, int val)
{
inp->inp_ip_tos = val;
}
void
inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp,
uint32_t *faddr, uint16_t *fp)
-4
View File
@@ -479,12 +479,8 @@ void inp_unlock_assert(struct inpcb *);
void inp_apply_all(struct inpcbinfo *, void (*func)(struct inpcb *, void *),
void *arg);
int inp_ip_tos_get(const struct inpcb *inp);
void inp_ip_tos_set(struct inpcb *inp, int val);
struct socket *
inp_inpcbtosocket(struct inpcb *inp);
struct tcpcb *
inp_inpcbtotcpcb(struct inpcb *inp);
void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp,
uint32_t *faddr, uint16_t *fp);
+1
View File
@@ -36,6 +36,7 @@
#include <netinet/tcp.h>
#include <sys/_eventhandler.h>
struct tcpcb;
struct tcpopt;
struct tcphdr;
struct in_conninfo;