mirror of
https://github.com/openharmony/kernel_common_modules_newip.git
synced 2026-07-19 16:43:31 -04:00
@@ -19,9 +19,8 @@
|
||||
struct net;
|
||||
struct nip_addr;
|
||||
DECLARE_HOOK(ninet_ehashfn_hook,
|
||||
TP_PROTO(const struct net *net, const struct nip_addr *laddr, const u16 lport,
|
||||
const struct nip_addr *faddr, const __be16 fport, u32 *ret),
|
||||
TP_ARGS(net, laddr, lport, faddr, fport, ret)
|
||||
TP_PROTO(const struct sock *sk, u32 *ret),
|
||||
TP_ARGS(sk, ret)
|
||||
);
|
||||
|
||||
struct net_device;
|
||||
|
||||
@@ -11,11 +11,10 @@
|
||||
#include <net/if_ninet.h>
|
||||
#include <trace/hooks/nip_hooks.h>
|
||||
|
||||
void ninet_ehashfn_hook(void *data, const struct net *net,
|
||||
const struct nip_addr *laddr, const u16 lport,
|
||||
const struct nip_addr *faddr, const __be16 fport, u32 *ret)
|
||||
void ninet_ehashfn_hook(void *data, const struct sock *sk, u32 *ret)
|
||||
{
|
||||
*ret = ninet_ehashfn(net, laddr, lport, faddr, fport);
|
||||
*ret = ninet_ehashfn(sock_net(sk), &sk->sk_nip_rcv_saddr,
|
||||
sk->sk_num, &sk->sk_nip_daddr, sk->sk_dport);
|
||||
}
|
||||
|
||||
void ninet_gifconf_hook(void *data, struct net_device *dev,
|
||||
|
||||
Reference in New Issue
Block a user