From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kfir Lavi Subject: tun.c non formal header protocol? Date: Thu, 24 Feb 2011 20:37:32 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 To: netdev@vger.kernel.org Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:38670 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667Ab1BXSiC (ORCPT ); Thu, 24 Feb 2011 13:38:02 -0500 Received: by yxs7 with SMTP id 7so399613yxs.19 for ; Thu, 24 Feb 2011 10:38:01 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Hi, I would like to use custom protocol over tun/tap device. I'm grabbing packets, and changing them, to deliver via tap, to a listener that knows this custom protocol. The custom protocol is just wrapping the packet with another small header. Is it possible to move custom packets via tun.c ? Is it possible to have a hook, just before the receiver gets the packet, and then modify the header of the packet, so it will not disturb tun.c ? Is there any other options having the power of Linux stack and netfilter, and using this custom protocol. I'm grabbing the packets to userspace using nfq, and then with verdict I'm returning them to the tap device. Thanks, Kfir