1818 from dissect .target .target import Target
1919
2020NetSocketRecord = TargetRecordDescriptor (
21- "linux/proc/sockets " ,
21+ "linux/proc/socket/net " ,
2222 [
2323 ("string" , "protocol" ),
2424 ("uint32" , "rx_queue" ),
3737)
3838
3939UnixSocketRecord = TargetRecordDescriptor (
40- "linux/proc/sockets " ,
40+ "linux/proc/socket/unix " ,
4141 [
4242 ("string" , "protocol" ),
4343 ("uint32" , "ref" ),
44- ("string" , "flags " ),
44+ ("string" , "socket_flags " ),
4545 ("string" , "type" ),
4646 ("string" , "state" ),
4747 ("uint32" , "inode" ),
5050)
5151
5252PacketSocketRecord = TargetRecordDescriptor (
53- "linux/proc/sockets " ,
53+ "linux/proc/socket/packet " ,
5454 [
5555 ("string" , "protocol" ),
5656 ("string" , "protocol_type" ),
57- ("string" , "sk" ),
57+ ("uint32" , "socket_type" ),
58+ ("uint32" , "sk" ),
5859 ("uint32" , "ref" ),
59- ("uint32" , "type" ),
6060 ("uint32" , "iface" ),
6161 ("uint32" , "r" ),
6262 ("uint32" , "rmem" ),
63- ("uint32" , "user " ),
63+ ("uint32" , "uid " ),
6464 ("string" , "owner" ),
6565 ("uint32" , "inode" ),
6666 ("uint32" , "pid" ),
@@ -93,14 +93,14 @@ def packet(self) -> Iterator[PacketSocketRecord]:
9393
9494 hostname (string): The target hostname.
9595 domain (string): The target domain.
96- protocol (int ): The captured protocol i.e. 0003 is ETH_P_ALL
97- protocol_type (str): The canonical name of the captured protocol.
98- sk (string ): The socket number .
99- type (int): The integer type of the socket (packet) .
96+ protocol (str ): packet.
97+ protocol_type (str): The canonical name of the captured protocol i.e. ETH_P_ALL .
98+ socket_type (int ): The integer type of the socket (packet) .
99+ sk (int): The socket number .
100100 iface (int): The interface index of the socket.
101101 r (int): The number of bytes that have been received by the socket and are waiting to be processed.
102102 rmem (int): The size of the receive buffer for the socket.
103- user (int): The user ID of the process that created the socket.
103+ uid (int): The user ID of the process that created the socket.
104104 inode (int): The inode associated to the socket.
105105 pid (int): The pid associated with this socket.
106106 name (string): The process name associated to this socket.
@@ -120,7 +120,7 @@ def unix(self) -> Iterator[UnixSocketRecord]:
120120 hostname (string): The target hostname.
121121 domain (string): The target domain.
122122 protocol (string): The protocol used by the socket.
123- flags (bytes): The flags associated with the socket.
123+ socket_flags (bytes): The flags associated with the socket.
124124 type (string): The stream type of the socket.
125125 state (string): The state of the socket.
126126 inode (int): The inode associated to the socket.
@@ -210,7 +210,7 @@ def _generate_unix_socket_record(self, data: UnixSocket) -> UnixSocketRecord:
210210 return UnixSocketRecord (
211211 protocol = data .protocol_string ,
212212 ref = data .ref ,
213- flags = data .flags ,
213+ socket_flags = data .flags ,
214214 type = data .stream_type_string ,
215215 state = data .state_string ,
216216 inode = data .inode ,
@@ -222,13 +222,13 @@ def _generate_packet_socket_record(self, data: PacketSocket) -> PacketSocketReco
222222 return PacketSocketRecord (
223223 protocol = data .protocol_string ,
224224 protocol_type = data .protocol_type ,
225+ socket_type = data .type ,
225226 sk = data .sk ,
226227 ref = data .ref ,
227- type = data .type ,
228228 iface = data .iface ,
229229 r = data .r ,
230230 rmem = data .rmem ,
231- user = data .user ,
231+ uid = data .user ,
232232 inode = data .inode ,
233233 pid = data .pid ,
234234 name = data .name ,
0 commit comments