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.
here's what i want to do and i need some starting points
thanks in advance
when i search google and google returns
i'd like to catch the packets and do something
and pass on the packets to the browser.
i 've got this answer from someone but i don't have any idea about iptables.
set up an iptables rule to forward the packets from google.com to the QUEUE target...and in your program, use libipq to bind to the netlink socket, and then read from that socket, your program will wake up when a packet arrives..you can then do whatever you need to do, and supply the verdict for what to do with the packet back to the kernel, possibly modifying the packet too
if someone can elaborate this, it'll be very helpful
thank you
Last edited by doublefailure; 04-08-2003 at 12:21 AM.
/* The work comes in here from netfilter.c. */
static unsigned int
stupid_hook(unsigned int hook,
struct sk_buff **pskb,
const struct net_device *indev,
const struct net_device *outdev,
int (*okfn)(struct sk_buff *))
{
if ((*pskb)->len == 200)
return NF_DROP;
Can I go back to the start and ask what properties or content you want to mangle the packets for?
If you're doing really simple replacements in packets, you could use something like netsed, if you want to spy on http traffic @stake (L0pht) or zone-h.org have a proxy for that, or if it's just changes in the content you could use a rewriting proxy like Privoxy...
i want to do some analysis on the documents that Google returns.
so i wouldn't change the IP packet that go to my browser
but rather look at data(links) on the return page and grab pages that links point to and hopefully do some interesting things with the pages.
i haven't looked at the module howto.. i'm going to now
Uh. Ok.
Kinda reminds me of "browser helpers", IIRC Alexa was one of them in them Wintendo yrs, that let you know if ppl recommend a site/page/doc.
IMO methods like weighing, ranking, recommendation schemes, even if they where based on browsing behaviour, personal profile and knowledge such seemed more restricting than helpfull to me. Especially when you're eager to get *off* trodden paths...
So hard it will be, yes :-]
thanks seriously.... u guys made me do stuff....learn stuff...... i had been asking someone to help me coz i felt helpless coz i had nothing to start with not even a single example to start with i read several ebooks but nothing helped... but ur words brought me to realize that its me who wasnt serious enuf to help myself and thanks for all that you all helped i paved my way myself....and i have written my first netfilter code just becaue i was totally determined... go bless you all......thanks once again......
i know this is a technical thread and not emotional chit chat thread but could hold myself from thanking you and many others....:-) keep doing the good work of showing a candle so that someone can be as bright as star..... thanks
Last edited by oracle89divi22; 01-14-2012 at 09:20 AM.
hey did you manage to read the packets at the end? i'm doing my main project and need to access packets from tcp/ip using netlink. can you mail me your code on divya.n116@gmail.com its really urgent...
i need to access the packets and send its data to the userspace....
thanks in advance
Wow, seriously???? You re-opened a NINE YEAR OLD THREAD, to ask someone to mail you code, because your project is behind, and say it's 'urgent'???
No, this isn't urgent for ANYONE here, the OP has moved on LONG ago, and no one here is going to email you. This is a community forum, not the place to come for free, personalized, one-on-one email tech support.
A highjacking, necropost was modified to another post entirely. Since the original post by oracle89divi22 seemed related to another post about writing a root it, I'm closing this years old thread to let it die.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.