ValentinBELYN / icmplib

Easily forge ICMP packets and make your own ping and traceroute.
GNU Lesser General Public License v3.0
266 stars 46 forks source link

TCP ping a specified port number #47

Closed Bradly7412 closed 2 years ago

Bradly7412 commented 2 years ago

I was wondering if it is possible to ping a specified port number when do this?

ValentinBELYN commented 2 years ago

Hi @Bradly7412,

The icmplib library focuses on the ICMP protocol (layer 3 of the OSI model). It does not deal with higher layer transport protocols such as UDP or TCP (layer 4). The notion of port does not exist in layer 3, and therefore the functionality you want cannot be implemented.

Other libraries will certainly be more appropriate to achieve this 😉