Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7064581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:51:07+00:00 2026-05-28T04:51:07+00:00

I intend to develop a application that monitors the traffic on particular ports. For

  • 0

I intend to develop a application that monitors the traffic on particular ports. For this I need to list all the sk_buff data of all the LIVE sk_buff’s in the system. How to do this ?

I have written the following code (basically a kernel module.)

include <linux/module.h>    /* Needed by all modules */
#include <linux/kernel.h>   /* Needed for KERN_INFO */
#include </usr/src/linux-headers-2.6.38-8-generic/include/linux/skbuff.h>

int init_module(void)
{
    struct sk_buff *skb;


    printk(KERN_INFO "SKB 1.\n");
    return 0;
}

void cleanup_module(void)
{
    printk(KERN_INFO "Done 1.\n");
}

But I dont know how I catch the sk)buff’s. I have simply declared a sk_buff instance .. thats all ..
Please help me to actually catch them live Sk_buff’s in the system.

EDIT

I have tried all the top google search results. They give a very good description of the sk_buff itself, but none of them actually show how to do what I am particularly interested in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:51:08+00:00Added an answer on May 28, 2026 at 4:51 am

    There is no standardized way. Newly created skbs are not put into any list by default that you could read (that is, when they come fresh out of skb_alloc), therefore, there is no way to know all skbs are active from a random code point in the kernel, such as your module. You have at least two options though (both entail modifying core kernel code):

    1. Since all skbuffs are allocated from a kmem_cache pool, you could augment the kmem_cache functionality by some function that tells you about all allocated objects.
    2. Within the __alloc_skb function, add all newly allocated skbs into a data structure of your liking (and don’t forget to remove them again when the skb is freed). This is going to be a major bottleneck, but that’s what you have to pay.

    As usual, the question: why?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I intend to develop a J2ME application, that should be able to read words
I would like to develop a mobile application that is able to access all
I intend to develop a small (Java) application for managing my finances. I believe
I intend to develop a system that is entirely based on modules. The system
I intend to develop an application using .Net 4.0, and intend to use EF4
I am currently developing a C# Windows Form Application that I intend to let
I'm working on a C++ project that I don't intend to develop or deploy
I am trying to develop an android application that will use Bluetooth capabilities to
Folks, I have one application to develop in which I need notification when the
I am writing a Java application that will load third party drivers. I intend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.