kysdk.Net(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

💖 kysdk.Net(3) — 获取网络信息 ✨

okay bestie, welcome to kysdk.Net, a page straight out of the Library Functions Manual (section 3, if you're keeping track 🎀). It's the Python-side net-info baddie from kysdk.py, and it's here to spill the tea on your ports and your gateway. Let's go 🦋


🌸 NAME

kysdk.Net — 获取网络信息

Mainly used to get the state of a specified network port, the state of a range of ports, gateway info, and firewall info. That's it, that's the whole job, and it ate. 💅


✨ SYNOPSIS

Inherits kysdk.Base. Yeah babe, it's a nepo baby, but a talented one. 👑

🫶 Public Member Functions

def __init__ (self)
def getPortState (self, port)
    获取指定网络端口的状态
def getMultiplePortStat (self, start_port, end_port)
    获取区间端口状态
def getGatewayInfo (self)
    获取网关信息
def getFirewallState (self)
    获取防火墙信息

💜 Additional Inherited Members

(they exist. they're inherited. they're not listed here. iconic of them honestly)


🦋 DESCRIPTION

Detailed Description

获取网络信息.

So basically: it grabs network info. And it's mainly for pulling the state of a specified network port, the state of a port range, gateway info, and firewall info. Four little missions, four little functions, no cap. 🔥


👑 Member Function Documentation

🌈 def kysdk.Net.getFirewallState ( self)

获取防火墙信息 — go fetch the firewall info, bestie.

Returns

  • 防火墙信息列表 — a list of firewall info 🌸

References: kysdk.SessionBase.interface, and kysdk.Base.interface.


💖 def kysdk.Net.getGatewayInfo ( self)

获取网关信息 — gateway info time, let's see where you're routing, main character.

Returns

  • 网关信息网卡名和地址列表 — a list of gateway info NIC names and addresses ✨

References: kysdk.SessionBase.interface, and kysdk.Base.interface.


🎀 def kysdk.Net.getMultiplePortStat ( self, start_port, end_port)

获取区间端口状态 — the whole port range, not just one, because we don't do half measures here.

Parameters

  • start_port — 开始端口 (the starting port)
  • end_port — 结束端口 (the ending port)

Returns

  • 区间端口状态列表 — a list of port states for the range 🫶

References: kysdk.SessionBase.interface, and kysdk.Base.interface.


💅 def kysdk.Net.getPortState ( self, port)

获取指定网络端口的状态 — one port, one vibe check, one answer.

Parameters

  • port — 端口号 (the port number)

Returns

端口状态 (the port state), and here's the full legend so you're never confused, fr fr:

TCP_ESTABLISHED:0x1 TCP_SYN_SENT:0x2 TCP_SYN_RECV:0x3
TCP_FIN_WAIT1:0x4 TCP_FIN_WAIT2:0x5 TCP_TIME_WAIT:0x6 TCP_CLOSE:0x7
TCP_CLOSE_WAIT:0x8 TCP_LAST_ACL:0x9 TCP_LISTEN:0xa TCP_CLOSING:0xb

References: kysdk.SessionBase.interface, and kysdk.Base.interface.


⭐ Author

Generated automatically by Doxygen for kysdk.py from the source code. Not a human, just a very diligent robot. 🤖💜


lowkey important: this whole page was auto-generated, so if something reads weird, blame the Doxygen, not me. 🙈

and that's the page, bestie! 🌈 this lil' doc came from My Project, dated Thu Sep 21 2023, and it lives at kysdk.Net(3). mwah, go read your ports 💋🍓

📦 where this page comes from