Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I assume you are refering to network traffic. The tcpdump command will let you capture any portion of each packet that pass filtering, including all the data.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Quote:
Originally Posted by Peter John
Between IP and Ethernet Layer in the kernel.
Can this be done ???
Peter
Sure. Checkout the kernel source and edit the TCP/IP stack to include your capturing code, then recompile...
The BPF (which is what all the other "sniffers" are built on top of) will let you observe packets on the wire, but it's not actually tracing the different operations happening in the kernel and giving you a blow-by-blow report. If you want to be in the kernel, you're going to have to write a "shim" that sits in the stack itself.
Our Company has its own BT Stack. We want to integrate it with Linux and check "TCP/IP Over BT" functionality. i.e Layer 2 and Layer1 as our BT stack, which is functional on linux. Is there any way we can do it without kernel recompile ?
We have our own BT Stack. We want to integrate it with Linux and check "TCP/IP Over BT" functionality. i.e Layer 2 and Layer1 as our BT stack, which is functional on linux. Is there any way we can do it without kernel recompile ?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
So you have a working implementation of Bluetooth for Linux and want to transport TCP/IP over it? Do you just need to watch the packets on the wire to make sure there are no anomalies, or do you need something more intrusive than that? If it's more than just observing wire traffic (well, a virtual "wire" in this case) then you're probably better off posting in either the Programming or Linux Software -> Kernel forums.
Although it's out of my realm of expertise, I doubt it's possible to achive without recompiling the kernel... Maybe it's possible to insert as a kernel module...
If you want to integrate into existing kernel space, you can either:
- create you own kernel module. This requires compiling the module itself against the current kernel, a process that must be repeated on each kernel upgrade. This is how many proprietary drivers are implemented. The downside is that you must "taint" the kernel (unless the code is open source under a GPL compatible license), so you become the first line of debugging for all kernel bugs for your customers.
- You can use a facility like SystemTap, if it provides the functionality you need.
- You can simply place the Ethernet interface into permissive mode (as tcpdump does), if that provides the functionality you need.
Failing all of the above, directly modifying the kernel would be need as chort indicated. However, if you are distributing the code outside your company, you are required to return the modifications to the kernel developers under the GPL.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.