Source code for mcgdb.interaction.linux_socket_utils

import re
import gdb

from mcgdb.toolbox.target import my_access

PROC_NETTCP_LINE = "\s+(\d+):\s+(\S+):(\S+)\s+(\S+):" \
                   "(\S+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+\s+(\S+)"
(PROC_NETTCP_LINE_ID, PROC_NETTCP_LOCAL_ADDR, PROC_NETTCP_LOCAL_PORT, 
 PROC_NETTCP_REMOT_ADDR, PROC_NETTCP_REMOT_PORT, 
 PROC_NETTCP_INODE) = range (1, 7)

[docs]class cmd_info_nettcp (gdb.Command): """Communication Socket prefix""" def __init__ (self): gdb.Command.__init__ (self, "info nettcp", gdb.COMMAND_NONE)
[docs] def invoke(self, args, from_tty): print_net_tcp(args)
[docs]def initialize(): cmd_info_nettcp() print ("[SocketSystem functions enabled]")