kern/179473: Source code contribution of implementation about virtual ethernet interface

Henning Matyschok henning.matyschok at stud.fh-flensburg.de
Tue Sep 24 00:40:02 UTC 2013


The following reply was made to PR kern/179473; it has been noted by GNATS.

From: "Henning Matyschok" <henning.matyschok at stud.fh-flensburg.de>
To: bug-followup at freebsd.org, henning.matyschok at stud.fh-flensburg.de
Cc:  
Subject: Re: kern/179473: Source code contribution of implementation about
 virtual ethernet interface
Date: Tue, 24 Sep 2013 02:16:14 -0000

 ------------EQZm5yNQd8MHugbtzE49mf
 Content-Type: text/plain; charset=us-ascii; charset=us-ascii; format=flowed; delsp=yes
 Content-Transfer-Encoding: 7bit
 
 
 ------------EQZm5yNQd8MHugbtzE49mf
 Content-Disposition: attachment; filename=if_vether.c
 Content-Type: application/octet-stream; name=if_vether.c
 Content-Transfer-Encoding: Base64
 
 LyotCiAqIENvcHlyaWdodCAoYykgMjAxMyBIZW5uaW5nIE1hdHlzY2hvawogKgog
 KiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZv
 cm1zLCB3aXRoIG9yIHdpdGhvdXQKICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0
 dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCiAqIGFy
 ZSBtZXQ6CiAqIDEuIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0
 IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0CiAqICAgIG5vdGljZSwgdGhpcyBs
 aXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lci4K
 ICogMi4gUmVkaXN0cmlidXRpb25zIGluIGJpbmFyeSBmb3JtIG11c3QgcmVwcm9k
 dWNlIHRoZSBhYm92ZSBjb3B5cmlnaHQKICogICAgbm90aWNlLCB0aGlzIGxpc3Qg
 b2YgY29uZGl0aW9ucyBhbmQgdGh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