Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P3870
tfo.stp
Active
Public
Actions
Authored by
•
ema
on Aug 22 2016, 11:25 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Tags
None
Referenced Files
F4384472: tfo.stp
Aug 22 2016, 11:25 AM
2016-08-22 11:25:24 (UTC+0)
Subscribers
None
#! /usr/bin/env stap
function printconn(skb) {
iphdr = __get_skb_iphdr(skb)
tcphdr = __get_skb_tcphdr(skb)
daddr = format_ipaddr(__ip_skb_daddr(iphdr), AF_INET())
saddr = format_ipaddr(__ip_skb_saddr(iphdr), AF_INET())
dport = __tcp_skb_dport(tcphdr)
sport = __tcp_skb_sport(tcphdr)
printf(" TFO connection %s:%d -> %s:%d\n", saddr, sport, daddr, dport);
}
probe kernel.function("tcp_try_fastopen").return {
if ($foc->len > 0) {
if ($return) {
printf("Successful");
} else {
printf("Failed");
}
printconn($skb);
}
}
Event Timeline
•
ema
created this paste.
Aug 22 2016, 11:25 AM
2016-08-22 11:25:24 (UTC+0)
Log In to Comment