Linux jobworks 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:53:05 UTC 2026 x86_64
Apache/2.4.58 (Ubuntu)
Server IP : 10.0.1.5 & Your IP : 216.73.217.52
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
linux-headers-6.8.0-136 /
include /
net /
Delete
Unzip
Name
Size
Permission
Date
Action
9p
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
bluetooth
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
caif
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
iucv
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
mana
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
netfilter
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
netns
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
nfc
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
page_pool
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
phonet
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
sctp
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
tc_act
[ DIR ]
drwxr-xr-x
2026-07-17 06:29
6lowpan.h
10.03
KB
-rw-r--r--
2024-03-10 20:38
Space.h
455
B
-rw-r--r--
2024-03-10 20:38
act_api.h
9.35
KB
-rw-r--r--
2026-07-01 19:48
addrconf.h
14.28
KB
-rw-r--r--
2026-07-01 19:48
af_ieee802154.h
1.19
KB
-rw-r--r--
2024-03-10 20:38
af_rxrpc.h
3.3
KB
-rw-r--r--
2024-03-10 20:38
af_unix.h
3.76
KB
-rw-r--r--
2026-07-01 19:48
af_vsock.h
8.41
KB
-rw-r--r--
2026-07-01 19:48
ah.h
382
B
-rw-r--r--
2024-03-10 20:38
amt.h
8.35
KB
-rw-r--r--
2024-03-10 20:38
arp.h
1.95
KB
-rw-r--r--
2024-03-10 20:38
atmclip.h
1.48
KB
-rw-r--r--
2024-03-10 20:38
ax25.h
14.94
KB
-rw-r--r--
2026-07-01 19:48
ax88796.h
1.43
KB
-rw-r--r--
2024-03-10 20:38
bareudp.h
333
B
-rw-r--r--
2024-03-10 20:38
bond_3ad.h
9.5
KB
-rw-r--r--
2026-07-01 19:48
bond_alb.h
6.1
KB
-rw-r--r--
2024-03-10 20:38
bond_options.h
4.88
KB
-rw-r--r--
2026-07-01 19:48
bonding.h
21.5
KB
-rw-r--r--
2026-07-01 19:48
bpf_sk_storage.h
1.74
KB
-rw-r--r--
2024-03-10 20:38
busy_poll.h
4.28
KB
-rw-r--r--
2026-07-01 19:48
calipso.h
1.55
KB
-rw-r--r--
2024-03-10 20:38
cfg80211-wext.h
1.86
KB
-rw-r--r--
2024-03-10 20:38
cfg80211.h
336.64
KB
-rw-r--r--
2026-07-01 19:48
cfg802154.h
16.68
KB
-rw-r--r--
2026-07-01 19:48
checksum.h
4.98
KB
-rw-r--r--
2026-07-01 19:48
cipso_ipv4.h
7.37
KB
-rw-r--r--
2024-03-10 20:38
cls_cgroup.h
2.04
KB
-rw-r--r--
2026-07-01 19:48
codel.h
5.86
KB
-rw-r--r--
2024-03-10 20:38
codel_impl.h
8.3
KB
-rw-r--r--
2024-03-10 20:38
codel_qdisc.h
2.95
KB
-rw-r--r--
2024-03-10 20:38
compat.h
2.48
KB
-rw-r--r--
2024-03-10 20:38
datalink.h
590
B
-rw-r--r--
2024-03-10 20:38
dcbevent.h
766
B
-rw-r--r--
2024-03-10 20:38
dcbnl.h
4.98
KB
-rw-r--r--
2024-03-10 20:38
devlink.h
70.92
KB
-rw-r--r--
2024-03-10 20:38
dropreason-core.h
14.76
KB
-rw-r--r--
2026-07-01 19:48
dropreason.h
1.36
KB
-rw-r--r--
2024-03-10 20:38
dsa.h
41.09
KB
-rw-r--r--
2026-07-01 19:48
dsa_stubs.h
1.28
KB
-rw-r--r--
2024-03-10 20:38
dsfield.h
1.12
KB
-rw-r--r--
2024-03-10 20:38
dst.h
15.12
KB
-rw-r--r--
2026-07-01 19:48
dst_cache.h
2.96
KB
-rw-r--r--
2024-03-10 20:38
dst_metadata.h
6.34
KB
-rw-r--r--
2024-03-10 20:38
dst_ops.h
2.07
KB
-rw-r--r--
2026-07-01 19:48
erspan.h
9.04
KB
-rw-r--r--
2024-03-10 20:38
esp.h
1.18
KB
-rw-r--r--
2024-03-10 20:38
espintcp.h
966
B
-rw-r--r--
2024-03-10 20:38
ethoc.h
439
B
-rw-r--r--
2024-03-10 20:38
failover.h
1.18
KB
-rw-r--r--
2024-03-10 20:38
fib_notifier.h
1.35
KB
-rw-r--r--
2024-03-10 20:38
fib_rules.h
5.39
KB
-rw-r--r--
2024-03-10 20:38
firewire.h
599
B
-rw-r--r--
2024-03-10 20:38
flow.h
4.96
KB
-rw-r--r--
2024-03-10 20:38
flow_dissector.h
11.95
KB
-rw-r--r--
2024-03-10 20:38
flow_offload.h
17.37
KB
-rw-r--r--
2024-03-10 20:38
fou.h
578
B
-rw-r--r--
2024-03-10 20:38
fq.h
2.41
KB
-rw-r--r--
2024-03-10 20:38
fq_impl.h
7.96
KB
-rw-r--r--
2024-03-10 20:38
garp.h
2.67
KB
-rw-r--r--
2024-03-10 20:38
gen_stats.h
2.99
KB
-rw-r--r--
2024-03-10 20:38
genetlink.h
19.62
KB
-rw-r--r--
2026-07-01 19:48
geneve.h
1.84
KB
-rw-r--r--
2024-03-10 20:38
gre.h
3.29
KB
-rw-r--r--
2024-03-10 20:38
gro.h
13.38
KB
-rw-r--r--
2026-07-01 19:48
gro_cells.h
443
B
-rw-r--r--
2024-03-10 20:38
gso.h
3.2
KB
-rw-r--r--
2024-03-10 20:38
gtp.h
1.46
KB
-rw-r--r--
2024-03-10 20:38
gue.h
3.29
KB
-rw-r--r--
2024-03-10 20:38
handshake.h
1.39
KB
-rw-r--r--
2024-03-10 20:38
hwbm.h
995
B
-rw-r--r--
2024-03-10 20:38
icmp.h
1.87
KB
-rw-r--r--
2024-03-10 20:38
ieee80211_radiotap.h
23.22
KB
-rw-r--r--
2026-07-01 19:48
ieee802154_netdev.h
13.02
KB
-rw-r--r--
2024-03-10 20:38
if_inet6.h
6.6
KB
-rw-r--r--
2024-03-10 20:38
ife.h
1.03
KB
-rw-r--r--
2024-03-10 20:38
inet6_connection_sock.h
794
B
-rw-r--r--
2024-03-10 20:38
inet6_hashtables.h
5.57
KB
-rw-r--r--
2026-07-01 19:48
inet_common.h
2.83
KB
-rw-r--r--
2024-03-10 20:38
inet_connection_sock.h
11.7
KB
-rw-r--r--
2026-07-01 19:48
inet_dscp.h
1.55
KB
-rw-r--r--
2024-03-10 20:38
inet_ecn.h
7.83
KB
-rw-r--r--
2024-03-10 20:38
inet_frag.h
5.25
KB
-rw-r--r--
2026-07-01 19:48
inet_hashtables.h
16.91
KB
-rw-r--r--
2026-07-01 19:48
inet_sock.h
11.36
KB
-rw-r--r--
2026-07-01 19:48
inet_timewait_sock.h
3.71
KB
-rw-r--r--
2026-07-01 19:48
inetpeer.h
3.23
KB
-rw-r--r--
2026-07-01 19:48
ioam6.h
1.24
KB
-rw-r--r--
2026-07-01 19:48
ip.h
23.13
KB
-rw-r--r--
2026-07-01 19:48
ip6_checksum.h
2.3
KB
-rw-r--r--
2024-03-10 20:38
ip6_fib.h
17.6
KB
-rw-r--r--
2026-07-01 19:48
ip6_route.h
10.18
KB
-rw-r--r--
2026-07-01 19:48
ip6_tunnel.h
5.31
KB
-rw-r--r--
2026-07-01 19:48
ip_fib.h
16.13
KB
-rw-r--r--
2026-07-01 19:48
ip_tunnels.h
16.89
KB
-rw-r--r--
2026-07-01 19:48
ip_vs.h
53.83
KB
-rw-r--r--
2024-03-10 20:38
ipcomp.h
737
B
-rw-r--r--
2024-03-10 20:38
ipconfig.h
837
B
-rw-r--r--
2024-03-10 20:38
ipv6.h
37.62
KB
-rw-r--r--
2026-07-01 19:48
ipv6_frag.h
3.38
KB
-rw-r--r--
2024-03-10 20:38
ipv6_stubs.h
3.75
KB
-rw-r--r--
2026-07-01 19:48
iw_handler.h
20.66
KB
-rw-r--r--
2024-03-10 20:38
kcm.h
4.84
KB
-rw-r--r--
2026-07-01 19:48
l3mdev.h
7.03
KB
-rw-r--r--
2026-07-01 19:48
lag.h
409
B
-rw-r--r--
2024-03-10 20:38
lapb.h
4.82
KB
-rw-r--r--
2026-07-01 19:48
lib80211.h
3.92
KB
-rw-r--r--
2024-03-10 20:38
llc.h
4.41
KB
-rw-r--r--
2024-03-10 20:38
llc_c_ac.h
9.32
KB
-rw-r--r--
2024-03-10 20:38
llc_c_ev.h
10.61
KB
-rw-r--r--
2024-03-10 20:38
llc_c_st.h
1.77
KB
-rw-r--r--
2024-03-10 20:38
llc_conn.h
4.11
KB
-rw-r--r--
2024-03-10 20:38
llc_if.h
2.17
KB
-rw-r--r--
2024-03-10 20:38
llc_pdu.h
14.46
KB
-rw-r--r--
2024-03-10 20:38
llc_s_ac.h
1.59
KB
-rw-r--r--
2024-03-10 20:38
llc_s_ev.h
2.22
KB
-rw-r--r--
2024-03-10 20:38
llc_s_st.h
1.03
KB
-rw-r--r--
2024-03-10 20:38
llc_sap.h
1.08
KB
-rw-r--r--
2024-03-10 20:38
lwtunnel.h
6.69
KB
-rw-r--r--
2026-07-01 19:48
mac80211.h
293.31
KB
-rw-r--r--
2026-07-01 19:48
mac802154.h
14.88
KB
-rw-r--r--
2024-03-10 20:38
macsec.h
10.53
KB
-rw-r--r--
2026-07-01 19:48
mctp.h
8.1
KB
-rw-r--r--
2026-07-01 19:48
mctpdevice.h
1.26
KB
-rw-r--r--
2024-03-10 20:38
mip6.h
1016
B
-rw-r--r--
2024-03-10 20:38
mld.h
2.85
KB
-rw-r--r--
2024-03-10 20:38
mpls.h
943
B
-rw-r--r--
2024-03-10 20:38
mpls_iptunnel.h
481
B
-rw-r--r--
2024-03-10 20:38
mptcp.h
7.41
KB
-rw-r--r--
2024-03-10 20:38
mrp.h
3.13
KB
-rw-r--r--
2024-03-10 20:38
ncsi.h
1.94
KB
-rw-r--r--
2024-03-10 20:38
ndisc.h
14.64
KB
-rw-r--r--
2024-03-10 20:38
neighbour.h
16.55
KB
-rw-r--r--
2026-07-01 19:48
net_debug.h
5.08
KB
-rw-r--r--
2026-07-01 19:48
net_failover.h
1023
B
-rw-r--r--
2024-03-10 20:38
net_namespace.h
14.36
KB
-rw-r--r--
2026-07-01 19:48
net_ratelimit.h
220
B
-rw-r--r--
2024-03-10 20:38
net_trackers.h
424
B
-rw-r--r--
2024-03-10 20:38
netdev_queues.h
5.75
KB
-rw-r--r--
2024-03-10 20:38
netdev_rx_queue.h
1.32
KB
-rw-r--r--
2024-03-10 20:38
netevent.h
1.04
KB
-rw-r--r--
2024-03-10 20:38
netkit.h
1.16
KB
-rw-r--r--
2024-03-10 20:38
netlabel.h
20.15
KB
-rw-r--r--
2026-07-01 19:48
netlink.h
64.18
KB
-rw-r--r--
2024-03-10 20:38
netprio_cgroup.h
1.02
KB
-rw-r--r--
2024-03-10 20:38
netrom.h
7.73
KB
-rw-r--r--
2024-03-10 20:38
nexthop.h
11.91
KB
-rw-r--r--
2024-03-10 20:38
nl802154.h
16.04
KB
-rw-r--r--
2024-03-10 20:38
nsh.h
12.3
KB
-rw-r--r--
2024-03-10 20:38
p8022.h
403
B
-rw-r--r--
2024-03-10 20:38
pie.h
3.61
KB
-rw-r--r--
2026-07-01 19:48
ping.h
2.66
KB
-rw-r--r--
2024-03-10 20:38
pkt_cls.h
25.52
KB
-rw-r--r--
2026-07-01 19:48
pkt_sched.h
7.74
KB
-rw-r--r--
2026-07-01 19:48
pptp.h
604
B
-rw-r--r--
2024-03-10 20:38
protocol.h
3.81
KB
-rw-r--r--
2024-03-10 20:38
psample.h
1.06
KB
-rw-r--r--
2024-03-10 20:38
psnap.h
430
B
-rw-r--r--
2024-03-10 20:38
raw.h
2.46
KB
-rw-r--r--
2024-03-10 20:38
rawv6.h
862
B
-rw-r--r--
2024-03-10 20:38
red.h
11.33
KB
-rw-r--r--
2024-03-10 20:38
regulatory.h
9.96
KB
-rw-r--r--
2024-03-10 20:38
request_sock.h
6.5
KB
-rw-r--r--
2024-03-10 20:38
rose.h
8.06
KB
-rw-r--r--
2026-07-01 19:48
route.h
11.32
KB
-rw-r--r--
2026-07-01 19:48
rpl.h
749
B
-rw-r--r--
2024-03-10 20:38
rsi_91x.h
1.67
KB
-rw-r--r--
2024-03-10 20:38
rtnetlink.h
7.58
KB
-rw-r--r--
2026-07-01 19:48
rtnh.h
859
B
-rw-r--r--
2024-03-10 20:38
sch_generic.h
35.08
KB
-rw-r--r--
2026-07-01 19:48
scm.h
5.36
KB
-rw-r--r--
2026-07-01 19:48
secure_seq.h
868
B
-rw-r--r--
2024-03-10 20:38
seg6.h
2.18
KB
-rw-r--r--
2024-03-10 20:38
seg6_hmac.h
1.44
KB
-rw-r--r--
2024-03-10 20:38
seg6_local.h
644
B
-rw-r--r--
2024-03-10 20:38
selftests.h
582
B
-rw-r--r--
2024-03-10 20:38
slhc_vj.h
6.67
KB
-rw-r--r--
2024-03-10 20:38
smc.h
2.5
KB
-rw-r--r--
2026-07-01 19:48
snmp.h
5.14
KB
-rw-r--r--
2024-03-10 20:38
sock.h
85.78
KB
-rw-r--r--
2026-07-01 19:48
sock_reuseport.h
1.83
KB
-rw-r--r--
2024-03-10 20:38
stp.h
412
B
-rw-r--r--
2024-03-10 20:38
strparser.h
4.34
KB
-rw-r--r--
2026-07-01 19:48
switchdev.h
15.1
KB
-rw-r--r--
2024-03-10 20:38
tc_wrapper.h
6.29
KB
-rw-r--r--
2026-07-01 19:48
tcp.h
85.12
KB
-rw-r--r--
2026-07-01 19:48
tcp_ao.h
12.08
KB
-rw-r--r--
2026-07-01 19:48
tcp_states.h
1.3
KB
-rw-r--r--
2024-03-10 20:38
tcx.h
4.3
KB
-rw-r--r--
2026-07-01 19:48
timewait_sock.h
925
B
-rw-r--r--
2024-03-10 20:38
tipc.h
2.35
KB
-rw-r--r--
2024-03-10 20:38
tls.h
13.28
KB
-rw-r--r--
2026-07-01 19:48
tls_prot.h
1.84
KB
-rw-r--r--
2024-03-10 20:38
tls_toe.h
2.94
KB
-rw-r--r--
2024-03-10 20:38
transp_v6.h
1.88
KB
-rw-r--r--
2024-03-10 20:38
tso.h
721
B
-rw-r--r--
2024-03-10 20:38
tun_proto.h
1015
B
-rw-r--r--
2024-03-10 20:38
udp.h
15.88
KB
-rw-r--r--
2026-07-01 19:48
udp_tunnel.h
12.49
KB
-rw-r--r--
2026-07-01 19:48
udplite.h
2.3
KB
-rw-r--r--
2024-03-10 20:38
vsock_addr.h
662
B
-rw-r--r--
2024-03-10 20:38
vxlan.h
15.83
KB
-rw-r--r--
2026-07-01 19:48
wext.h
1.47
KB
-rw-r--r--
2024-03-10 20:38
x25.h
9.46
KB
-rw-r--r--
2024-03-10 20:38
x25device.h
387
B
-rw-r--r--
2024-03-10 20:38
xdp.h
16.93
KB
-rw-r--r--
2026-07-01 19:48
xdp_priv.h
427
B
-rw-r--r--
2024-03-10 20:38
xdp_sock.h
6.3
KB
-rw-r--r--
2026-07-01 19:48
xdp_sock_drv.h
10.15
KB
-rw-r--r--
2026-07-01 19:48
xfrm.h
58.29
KB
-rw-r--r--
2026-07-01 19:48
xsk_buff_pool.h
7.09
KB
-rw-r--r--
2026-07-01 19:48
Save
Rename
/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * Definitions for the IP router. * * Version: @(#)route.h 1.0.4 05/27/93 * * Authors: Ross Biro * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> * Fixes: * Alan Cox : Reformatted. Added ip_rt_local() * Alan Cox : Support for TCP parameters. * Alexey Kuznetsov: Major changes for new routing code. * Mike McLagan : Routing by source * Robert Olsson : Added rt_cache statistics */ #ifndef _ROUTE_H #define _ROUTE_H #include <net/dst.h> #include <net/inetpeer.h> #include <net/flow.h> #include <net/inet_sock.h> #include <net/ip_fib.h> #include <net/arp.h> #include <net/ndisc.h> #include <linux/in_route.h> #include <linux/rtnetlink.h> #include <linux/rcupdate.h> #include <linux/route.h> #include <linux/ip.h> #include <linux/cache.h> #include <linux/security.h> #define RTO_ONLINK 0x01 #define RT_CONN_FLAGS(sk) (RT_TOS(READ_ONCE(inet_sk(sk)->tos)) | sock_flag(sk, SOCK_LOCALROUTE)) #define RT_CONN_FLAGS_TOS(sk,tos) (RT_TOS(tos) | sock_flag(sk, SOCK_LOCALROUTE)) static inline __u8 ip_sock_rt_scope(const struct sock *sk) { if (sock_flag(sk, SOCK_LOCALROUTE)) return RT_SCOPE_LINK; return RT_SCOPE_UNIVERSE; } static inline __u8 ip_sock_rt_tos(const struct sock *sk) { return RT_TOS(READ_ONCE(inet_sk(sk)->tos)); } struct ip_tunnel_info; struct fib_nh; struct fib_info; struct uncached_list; struct rtable { struct dst_entry dst; int rt_genid; unsigned int rt_flags; __u16 rt_type; __u8 rt_is_input; __u8 rt_uses_gateway; int rt_iif; u8 rt_gw_family; /* Info on neighbour */ union { __be32 rt_gw4; struct in6_addr rt_gw6; }; /* Miscellaneous cached information */ u32 rt_mtu_locked:1, rt_pmtu:31; }; #define dst_rtable(_ptr) container_of_const(_ptr, struct rtable, dst) /** * skb_rtable - Returns the skb &rtable * @skb: buffer */ static inline struct rtable *skb_rtable(const struct sk_buff *skb) { return dst_rtable(skb_dst(skb)); } static inline bool rt_is_input_route(const struct rtable *rt) { return rt->rt_is_input != 0; } static inline bool rt_is_output_route(const struct rtable *rt) { return rt->rt_is_input == 0; } static inline __be32 rt_nexthop(const struct rtable *rt, __be32 daddr) { if (rt->rt_gw_family == AF_INET) return rt->rt_gw4; return daddr; } struct ip_rt_acct { __u32 o_bytes; __u32 o_packets; __u32 i_bytes; __u32 i_packets; }; struct rt_cache_stat { unsigned int in_slow_tot; unsigned int in_slow_mc; unsigned int in_no_route; unsigned int in_brd; unsigned int in_martian_dst; unsigned int in_martian_src; unsigned int out_slow_tot; unsigned int out_slow_mc; }; extern struct ip_rt_acct __percpu *ip_rt_acct; struct in_device; int ip_rt_init(void); void rt_cache_flush(struct net *net); void rt_flush_dev(struct net_device *dev); struct rtable *ip_route_output_key_hash(struct net *net, struct flowi4 *flp, const struct sk_buff *skb); struct rtable *ip_route_output_key_hash_rcu(struct net *net, struct flowi4 *flp, struct fib_result *res, const struct sk_buff *skb); static inline struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *flp) { return ip_route_output_key_hash(net, flp, NULL); } struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, const struct sock *sk); struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); static inline struct rtable *ip_route_output_key(struct net *net, struct flowi4 *flp) { return ip_route_output_flow(net, flp, NULL); } static inline struct rtable *ip_route_output(struct net *net, __be32 daddr, __be32 saddr, u8 tos, int oif) { struct flowi4 fl4 = { .flowi4_oif = oif, .flowi4_tos = tos, .daddr = daddr, .saddr = saddr, }; return ip_route_output_key(net, &fl4); } static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi4 *fl4, const struct sock *sk, __be32 daddr, __be32 saddr, __be16 dport, __be16 sport, __u8 proto, __u8 tos, int oif) { flowi4_init_output(fl4, oif, sk ? READ_ONCE(sk->sk_mark) : 0, tos, RT_SCOPE_UNIVERSE, proto, sk ? inet_sk_flowi_flags(sk) : 0, daddr, saddr, dport, sport, sock_net_uid(net, sk)); if (sk) security_sk_classify_flow(sk, flowi4_to_flowi_common(fl4)); return ip_route_output_flow(net, fl4, sk); } static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4 *fl4, __be32 daddr, __be32 saddr, __be32 gre_key, __u8 tos, int oif) { memset(fl4, 0, sizeof(*fl4)); fl4->flowi4_oif = oif; fl4->daddr = daddr; fl4->saddr = saddr; fl4->flowi4_tos = tos; fl4->flowi4_proto = IPPROTO_GRE; fl4->fl4_gre_key = gre_key; return ip_route_output_key(net, fl4); } int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr, u8 tos, struct net_device *dev, struct in_device *in_dev, u32 *itag); int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src, u8 tos, struct net_device *devin); int ip_route_use_hint(struct sk_buff *skb, __be32 dst, __be32 src, u8 tos, struct net_device *devin, const struct sk_buff *hint); static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, dscp_t dscp, struct net_device *devin) { int err; rcu_read_lock(); err = ip_route_input_noref(skb, dst, src, inet_dscp_to_dsfield(dscp), devin); if (!err) { skb_dst_force(skb); if (!skb_dst(skb)) err = -EINVAL; } rcu_read_unlock(); return err; } void ipv4_update_pmtu(struct sk_buff *skb, struct net *net, u32 mtu, int oif, u8 protocol); void ipv4_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, u32 mtu); void ipv4_redirect(struct sk_buff *skb, struct net *net, int oif, u8 protocol); void ipv4_sk_redirect(struct sk_buff *skb, struct sock *sk); void ip_rt_send_redirect(struct sk_buff *skb); unsigned int inet_addr_type(struct net *net, __be32 addr); unsigned int inet_addr_type_table(struct net *net, __be32 addr, u32 tb_id); unsigned int inet_dev_addr_type(struct net *net, const struct net_device *dev, __be32 addr); unsigned int inet_addr_type_dev_table(struct net *net, const struct net_device *dev, __be32 addr); void ip_rt_multicast_event(struct in_device *); int ip_rt_ioctl(struct net *, unsigned int cmd, struct rtentry *rt); void ip_rt_get_source(u8 *src, struct sk_buff *skb, struct rtable *rt); struct rtable *rt_dst_alloc(struct net_device *dev, unsigned int flags, u16 type, bool noxfrm); struct rtable *rt_dst_clone(struct net_device *dev, struct rtable *rt); struct in_ifaddr; void fib_add_ifaddr(struct in_ifaddr *); void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *); void fib_modify_prefix_metric(struct in_ifaddr *ifa, u32 new_metric); void rt_add_uncached_list(struct rtable *rt); void rt_del_uncached_list(struct rtable *rt); int fib_dump_info_fnhe(struct sk_buff *skb, struct netlink_callback *cb, u32 table_id, struct fib_info *fi, int *fa_index, int fa_start, unsigned int flags); static inline void ip_rt_put(struct rtable *rt) { /* dst_release() accepts a NULL parameter. * We rely on dst being first structure in struct rtable */ BUILD_BUG_ON(offsetof(struct rtable, dst) != 0); dst_release(&rt->dst); } #define IPTOS_RT_MASK (IPTOS_TOS_MASK & ~3) extern const __u8 ip_tos2prio[16]; static inline char rt_tos2priority(u8 tos) { return ip_tos2prio[IPTOS_TOS(tos)>>1]; } /* ip_route_connect() and ip_route_newports() work in tandem whilst * binding a socket for a new outgoing connection. * * In order to use IPSEC properly, we must, in the end, have a * route that was looked up using all available keys including source * and destination ports. * * However, if a source port needs to be allocated (the user specified * a wildcard source port) we need to obtain addressing information * in order to perform that allocation. * * So ip_route_connect() looks up a route using wildcarded source and * destination ports in the key, simply so that we can get a pair of * addresses to use for port allocation. * * Later, once the ports are allocated, ip_route_newports() will make * another route lookup if needed to make sure we catch any IPSEC * rules keyed on the port information. * * The callers allocate the flow key on their stack, and must pass in * the same flowi4 object to both the ip_route_connect() and the * ip_route_newports() calls. */ static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32 src, int oif, u8 protocol, __be16 sport, __be16 dport, const struct sock *sk) { __u8 flow_flags = 0; if (inet_test_bit(TRANSPARENT, sk)) flow_flags |= FLOWI_FLAG_ANYSRC; flowi4_init_output(fl4, oif, READ_ONCE(sk->sk_mark), ip_sock_rt_tos(sk), ip_sock_rt_scope(sk), protocol, flow_flags, dst, src, dport, sport, sk->sk_uid); } static inline struct rtable *ip_route_connect(struct flowi4 *fl4, __be32 dst, __be32 src, int oif, u8 protocol, __be16 sport, __be16 dport, const struct sock *sk) { struct net *net = sock_net(sk); struct rtable *rt; ip_route_connect_init(fl4, dst, src, oif, protocol, sport, dport, sk); if (!dst || !src) { rt = __ip_route_output_key(net, fl4); if (IS_ERR(rt)) return rt; ip_rt_put(rt); flowi4_update_output(fl4, oif, fl4->daddr, fl4->saddr); } security_sk_classify_flow(sk, flowi4_to_flowi_common(fl4)); return ip_route_output_flow(net, fl4, sk); } static inline struct rtable *ip_route_newports(struct flowi4 *fl4, struct rtable *rt, __be16 orig_sport, __be16 orig_dport, __be16 sport, __be16 dport, const struct sock *sk) { if (sport != orig_sport || dport != orig_dport) { fl4->fl4_dport = dport; fl4->fl4_sport = sport; ip_rt_put(rt); flowi4_update_output(fl4, sk->sk_bound_dev_if, fl4->daddr, fl4->saddr); security_sk_classify_flow(sk, flowi4_to_flowi_common(fl4)); return ip_route_output_flow(sock_net(sk), fl4, sk); } return rt; } static inline int inet_iif(const struct sk_buff *skb) { struct rtable *rt = skb_rtable(skb); if (rt && rt->rt_iif) return rt->rt_iif; return skb->skb_iif; } static inline int ip4_dst_hoplimit(const struct dst_entry *dst) { int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT); if (hoplimit == 0) { const struct net *net; rcu_read_lock(); net = dev_net_rcu(dst->dev); hoplimit = READ_ONCE(net->ipv4.sysctl_ip_default_ttl); rcu_read_unlock(); } return hoplimit; } static inline struct neighbour *ip_neigh_gw4(struct net_device *dev, __be32 daddr) { struct neighbour *neigh; neigh = __ipv4_neigh_lookup_noref(dev, (__force u32)daddr); if (unlikely(!neigh)) neigh = __neigh_create(&arp_tbl, &daddr, dev, false); return neigh; } static inline struct neighbour *ip_neigh_for_gw(struct rtable *rt, struct sk_buff *skb, bool *is_v6gw) { struct net_device *dev = rt->dst.dev; struct neighbour *neigh; if (likely(rt->rt_gw_family == AF_INET)) { neigh = ip_neigh_gw4(dev, rt->rt_gw4); } else if (rt->rt_gw_family == AF_INET6) { neigh = ip_neigh_gw6(dev, &rt->rt_gw6); *is_v6gw = true; } else { neigh = ip_neigh_gw4(dev, ip_hdr(skb)->daddr); } return neigh; } #endif /* _ROUTE_H */