Solved

tcp packet scanner

Posted on 2012-03-29
1
490 Views
Last Modified: 2012-03-30
Hi

I am creating a kern module that scans the network and displays packet information

I want to display the remote port numbers, however i can only find how to display local port numbers (tcphdr->dest and tcphdr->source) Can anyone help?

also how can i display the packet data in hex?
0
Comment
Question by:codey-06
1 Comment
 
LVL 53

Accepted Solution

by:
Infinity08 earned 500 total points
ID: 37785966
>> however i can only find how to display local port numbers (tcphdr->dest and tcphdr->source)

One of these is the local port, and the other is the remote port. Which is which depends on the direction the packet travelled.


>> also how can i display the packet data in hex?

The data can be found immediately after the TCP header. Just skip the appropriate amount of bytes (using tcphdr->doff), and display the data found there in hex.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question