summaryrefslogtreecommitdiff
path: root/src/base/inet.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/inet.cc')
-rw-r--r--src/base/inet.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/base/inet.cc b/src/base/inet.cc
index b8da12a99..8c3240fa6 100644
--- a/src/base/inet.cc
+++ b/src/base/inet.cc
@@ -206,4 +206,25 @@ TcpOpt::sack(vector<SackRange> &vec) const
return false;
}
+int
+hsplit(const EthPacketPtr &ptr)
+{
+ int split_point = 0;
+
+ IpPtr ip(ptr);
+ if (ip) {
+ split_point = ip.pstart();
+
+ TcpPtr tcp(ip);
+ if (tcp)
+ split_point = tcp.pstart();
+
+ UdpPtr udp(ip);
+ if (udp)
+ split_point = udp.pstart();
+ }
+ return split_point;
+}
+
+
/* namespace Net */ }