From owner-freebsd-net@FreeBSD.ORG Tue Aug 14 09:17:12 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F95106566C; Tue, 14 Aug 2012 09:17:12 +0000 (UTC) (envelope-from venkatduvvuru.ml@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BAD4C8FC14; Tue, 14 Aug 2012 09:17:11 +0000 (UTC) Received: by obbun3 with SMTP id un3so335443obb.13 for ; Tue, 14 Aug 2012 02:17:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=QCbF1chctNtjkyrG99m/5WUiF6cyA5pzgNjlayFPQGU=; b=J2aXPnLj4o85CmOsS4EOX37osungwouK9ZtAXv43U25+RU/LFpK81RTX0oYOoZhi+/ pzgZu7SS8NMhkMKe0SCnjEDaNQnHWjscuDbj9Qhqca+ljWGVs8ohAVx86NX0o6y4d72H gpeH07Fhk3pJ5rbuft/kyfwVfyswhH3XjBREQhjigwnu5pWeBFwa4yxb65+cLmnyU2ww fFKgCytDf0ArzPmniyJ46aICrhqLHf7F8eYzlE0KZH1O96Ogg9wPN7MOVFVNiZJxcDe3 l0gpXsBHqyPwU/xNCGjOHJHRjKRg47TVpWrWhdihROfinzg3O3EazNbwxSYuhsGnqrSd l2Fg== MIME-Version: 1.0 Received: by 10.182.212.98 with SMTP id nj2mr17103450obc.18.1344935831125; Tue, 14 Aug 2012 02:17:11 -0700 (PDT) Received: by 10.76.84.202 with HTTP; Tue, 14 Aug 2012 02:17:11 -0700 (PDT) In-Reply-To: <5029EA86.8020808@freebsd.org> References: <5029EA86.8020808@freebsd.org> Date: Tue, 14 Aug 2012 14:47:11 +0530 Message-ID: From: Venkat Duvvuru To: Julian Elischer , freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: ether_vlanencap X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2012 09:17:12 -0000 My question is more about "ether_vlanencap" api. This api is supposed to insert vlantag and tranform Ethernet header into an Ethernet header with 802.1Q encapsulation and if it is unable to prepend then it will allocate a new mbuf and populate the data including the vlan tag. But it is not happening in my case, I'm passing mbuf and vlantag to this api and I get partial junk data in the packet and a corrupted m_len as well. Folks, any inputs? /Venkat On Tue, Aug 14, 2012 at 11:34 AM, Julian Elischer wrote: > On 8/13/12 10:50 PM, Venkat Duvvuru wrote: > >> Hi, >> I'm trying to insert vlan tag into the packet using "ether_vlanencap" but >> the packet is getting corrupted in the mbuf and m_len is also showing a >> wrong length. >> Am I doing something wrong here? Can I directly pass mbuf pointer and vlan >> tag to this api for inserting the vlan tag? >> > > I think you can do it with the vlan netgraph node.. > > >> /Venkat >> ______________________________**_________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/**mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@**freebsd.org >> " >> >> >> >