From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 19 04:10:02 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 50CD0AB5 for ; Mon, 19 Aug 2013 04:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA082F6D for ; Mon, 19 Aug 2013 04:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7J4A1sq007500 for ; Mon, 19 Aug 2013 04:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7J4A1bH007499; Mon, 19 Aug 2013 04:10:01 GMT (envelope-from gnats) Date: Mon, 19 Aug 2013 04:10:01 GMT Message-Id: <201308190410.r7J4A1bH007499@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Henning Matyschok" Subject: Re: kern/179473: Source code contribution of implementation about virtual ethernet interface X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Henning Matyschok List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 04:10:02 -0000 The following reply was made to PR kern/179473; it has been noted by GNATS. From: "Henning Matyschok" To: bug-followup@freebsd.org, henning.matyschok@stud.fh-flensburg.de Cc: Subject: Re: kern/179473: Source code contribution of implementation about virtual ethernet interface Date: Mon, 19 Aug 2013 05:32:16 -0000 ------------5OCVZbrxpul0dnsDsZO7pQ Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit -- Using Opera's mail client: http://www.opera.com/mail/ ------------5OCVZbrxpul0dnsDsZO7pQ Content-Disposition: attachment; filename=if_vether.c Content-Type: application/octet-stream; name=if_vether.c Content-Transfer-Encoding: Base64 LyotCiAqIENvcHlyaWdodCAoYykgMjAxMyBIZW5uaW5nIE1hdHlzY2hvawogKiBB bGwgcmlnaHRzIHJlc2VydmVkLgogKgogKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNl IGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKICog bW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZv bGxvd2luZyBjb25kaXRpb25zCiAqIGFyZSBtZXQ6CiAqIDEuIFJlZGlzdHJpYnV0 aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJp Z2h0CiAqICAgIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRo ZSBmb2xsb3dpbmcgZGlzY2xhaW1lci4KICogMi4gUmVkaXN0cmlidXRpb25zIGlu IGJpbmFyeSBmb3JtIG11c3QgcmVwcm9kdWNlIHRoZSBhYm92ZSBjb3B5cmlnaHQK ICogICAgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZv bGxvd2luZyBkaXNjbGFpbWVyIGluIHRoZQogKiAgICBkb2N1bWVudGF0aW9uIGFu ZC9vciBvdGhlciBtYXRlcmlhbHMgcHJvdmlkZWQgd2l0aCB0aGUgZGlzdHJpYnV0 aW9uLgogKgogKiBUSElTIFNPRlRXQVJFIElTIFBST1ZJREVEIEJZIFRIRSBBVVRI T1IgQU5EIENPTlRSSUJVVE9SUyBgYEFTIElTJycgQU5EC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