LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-27-2016, 05:28 PM   #1
dlevy022
LQ Newbie
 
Registered: Nov 2015
Posts: 10

Rep: Reputation: Disabled
Which kernel structure has ip address and socket information


I know the task_struct is a linked list that contains information about the processes running on a linux system but what I am looking for is a similar structure that has ip address and socket information or ip address and mac address information. I've been looking through kernel code and can't seem to find the "main" structure that has ip network information. Also, I should note that I am approaching this from a memory forensics point of view so once I know the structure I can locate its offset and extract data from it. Thanks for any help
 
Old 12-28-2016, 10:12 AM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi,

I'm afraid I don't know the answer to your question. It might be worthwhile looking at the source code for tools like "netstat" and "lsof" that display this information, to see where they find it.

Good luck!
 
Old 01-05-2017, 11:48 AM   #3
patrick295767
Member
 
Registered: Feb 2006
Distribution: FreeBSD, Linux, Slackware, LFS, Gparted
Posts: 664

Rep: Reputation: 138Reputation: 138
Here a part of my alternative programm for http access, below which can orientate you.

Code:
  1436 #include <unistd.h>
  1438 #include <sys/types.h>
  1439 #include <sys/socket.h>  // <-- not there for windows
  1440 #include <sys/ioctl.h>
  1441 #include <netinet/in.h>
  1442 #include <net/if.h>
  1443 #include <arpa/inet.h>
 
Old 03-10-2017, 04:57 AM   #4
linswap
LQ Newbie
 
Registered: Apr 2015
Distribution: Fedora
Posts: 3

Rep: Reputation: Disabled
In Linux kernel, all network-related queues and buffers uses a common data structure 'struct sk_buff' and 'struct net_device' for the device structure.
 
  


Reply

Tags
ipaddress, mac address, networking



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How is MAC address information loaded to the kernel? Yu Watanabe Linux - Kernel 2 07-21-2016 07:30 PM
Where in kernel/socket memory to store long term information between network sessions gauravsuman007 Linux - Kernel 4 07-18-2016 02:58 PM
Retrieve client ip address and port number in kernel udp socket yethish Linux - Newbie 4 09-08-2011 09:59 PM
Passing a structure in a socket..! shankar.489 Linux - Newbie 1 03-31-2011 08:54 PM
Socket structure exvor Programming 1 07-08-2005 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration