MCPcopy Create free account
hub / github.com/apache/trafficserver / ConnectionAttributes

Class ConnectionAttributes

tools/gdb-helpers.py:146–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144
145
146class ConnectionAttributes:
147
148 def __init__(self, val):
149 self.val = val
150
151 def http_version(self):
152 v = self.val['http_version']['m_version']
153 return (v >> 16, v & 0xffff)
154
155 def src_addr(self):
156 ip = self.val['src_addr']
157 s = struct.pack('!I', socket.ntohl(int(ip['sin']['sin_addr']['s_addr'])))
158 return socket.inet_ntoa(s)
159
160 def dst_addr(self):
161 ip = self.val['dst_addr']
162 s = struct.pack('!I', socket.ntohl(int(ip['sin']['sin_addr']['s_addr'])))
163 return socket.inet_ntoa(s)
164
165
166class HttpSM:

Callers 3

client_infoMethod · 0.70
parent_infoMethod · 0.70
server_infoMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected