Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to analyse the contents of a give IP packet? Post 302220986 by redoubtable on Saturday 2nd of August 2008 06:03:27 PM
Old 08-02-2008
You want to use raw sockets.

Search google for "raw sockets" or "SOCK_RAW" or "PF_PACKET"

If you're programming C in Linux, there are structs that easily let you alter the whole tcp/udp/icmp/igmp/whatever header and inject packets at will. This can also be used for communication over closed ports and other obscure stuff (if you create a listening raw socket, you'll have yourself a "sniffer", and with that you can analyze data packets that arrive even on closed tcp ports)

Last edited by Neo; 08-02-2008 at 07:10 PM.. Reason: Deleted unnecessary editorial comment
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Using GDB to analyse different CORE dumps

Hi, Can we modify the GDB source code so as to analyze core dumps from different targets? From my analysis, I think we need to build our section table statically for each target. i.e., including the various address boundaries in build_section_table() function. If this is the case, then the GDB... (2 Replies)
Discussion started by: nsdeeps
2 Replies

2. Solaris

Ways to analyse root disk slice

Hi, Recently I faced with need of analyze root disk. I figured out two possible ways to do it: 1. Practical. Boot from CD and run format 2. Theoretical. Create live upgrade boot environment on another disk, activate it, reboot, unmont all root disk partitions and run format. I've already... (3 Replies)
Discussion started by: Sapfeer
3 Replies

3. Shell Programming and Scripting

Logfile analyse | problem with regex

Hello there, i am trying to write a shell script to analyse some of my log files. I want the script to check if there is a logfile from yesterday or today (some times the script that creates the logfile takes a bit longer and its after 00:00) and search the logfile itself if the script was... (0 Replies)
Discussion started by: Linien
0 Replies

4. UNIX for Advanced & Expert Users

analyse core file using pmap and pstack

Dear All, I am new to this forum. This is my first. I am facing customer issue. Customer has got core file while running the server. He had sent core file and details from pstack, pmap and pldd commands. I have to debug this application, please help me to fix this issue. I am using sparc... (1 Reply)
Discussion started by: KiranBangalore
1 Replies

5. Solaris

analyse core file using pmap and pstack

Dear All, I am new to this forum. This is my first. I am facing customer issue. Customer has got core file while running the server. He had sent core file and details from pstack, pmap and pldd commands. I have to debug this application, please help me to fix this issue. I am using sparc 10... (4 Replies)
Discussion started by: KiranBangalore
4 Replies

6. Solaris

I need to analyse some vmcore files

I need to analyse some vmcore files, do you guys know how can i get a free version of the "Solaris Crash Analysis Tool " (2 Replies)
Discussion started by: feg
2 Replies

7. Shell Programming and Scripting

How to analyse results of grep

Hi all, I'm working with a peice of software that runs on Linux that allows planning trips in cars through maps. This software has different variations depending on the type of car, e.g. BMW, Audi, Hyundai, etc... Each variation has a dependency on common external components that are not... (1 Reply)
Discussion started by: emoshaya
1 Replies

8. UNIX for Dummies Questions & Answers

Analyse this fdisk -l

Hi, Someone please analyse the following o/p of fdisk -l and tell me what it means for /dev/sda, /dev/sdb, /dev/sdc .... Disk /dev/sda: 53.6 GB, 53687091200 bytes 255 heads, 63 sectors/track, 6527 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start ... (5 Replies)
Discussion started by: stunn3r
5 Replies

9. HP-UX

How to analyse the syslog?

Hi All, When can we see these messages in the syslog. We have service guard cluster software installed on hpux 11iv3 servers. We were able to see the below error so many times in our syslog messages cmdisklockd: Unable to convert device to I/O tree node: I/O tree node does not exist. ... (2 Replies)
Discussion started by: Sachin1987
2 Replies

10. AIX

Packet loss coming with big packet size ping

(5 Replies)
Discussion started by: Vishal_dba
5 Replies
Sys::Statistics::Linux::SockStats(3pm)			User Contributed Perl Documentation		    Sys::Statistics::Linux::SockStats(3pm)

NAME
Sys::Statistics::Linux::SockStats - Collect linux socket statistics. SYNOPSIS
use Sys::Statistics::Linux::SockStats; my $lxs = Sys::Statistics::Linux::SockStats->new; my $stat = $lxs->get; DESCRIPTION
Sys::Statistics::Linux::SockStats gathers socket statistics from the virtual /proc filesystem (procfs). For more information read the documentation of the front-end module Sys::Statistics::Linux. SOCKET STATISTICS
Generated by /proc/net/sockstat. used - Total number of used sockets. tcp - Number of tcp sockets in use. udp - Number of udp sockets in use. raw - Number of raw sockets in use. ipfrag - Number of ip fragments in use (only available by kernels > 2.2). METHODS
new() Call "new()" to create a new object. my $lxs = Sys::Statistics::Linux::SockStats->new; It's possible to set the path to the proc filesystem. Sys::Statistics::Linux::SockStats->new( files => { # This is the default path => '/proc', sockstat => 'net/sockstat', } ); get() Call "get()" to get the statistics. "get()" returns the statistics as a hash reference. my $stat = $lxs->get; EXPORTS
No exports. SEE ALSO
proc(5) REPORTING BUGS
Please report all bugs to <jschulz.cpan(at)bloonix.de>. AUTHOR
Jonny Schulz <jschulz.cpan(at)bloonix.de>. COPYRIGHT
Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-03-09 Sys::Statistics::Linux::SockStats(3pm)
All times are GMT -4. The time now is 04:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy