From owner-svn-src-all@FreeBSD.ORG Mon Sep 23 20:30:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9B2B25E7; Mon, 23 Sep 2013 20:30:25 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 88A6B27A0; Mon, 23 Sep 2013 20:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8NKUPWT046835; Mon, 23 Sep 2013 20:30:25 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8NKUPes046833; Mon, 23 Sep 2013 20:30:25 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201309232030.r8NKUPes046833@svn.freebsd.org> From: Hiren Panchasara Date: Mon, 23 Sep 2013 20:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255828 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Sep 2013 20:30:25 -0000 Author: hiren Date: Mon Sep 23 20:30:25 2013 New Revision: 255828 URL: http://svnweb.freebsd.org/changeset/base/255828 Log: Correcting EXAMPLES section. Approved by: re (gjb) Modified: head/share/man/man4/netmap.4 Modified: head/share/man/man4/netmap.4 ============================================================================== --- head/share/man/man4/netmap.4 Mon Sep 23 20:14:15 2013 (r255827) +++ head/share/man/man4/netmap.4 Mon Sep 23 20:30:25 2013 (r255828) @@ -28,7 +28,7 @@ .\" $FreeBSD$ .\" $Id: netmap.4 11563 2012-08-02 08:59:12Z luigi $: stable/8/share/man/man4/bpf.4 181694 2008-08-13 17:45:06Z ed $ .\" -.Dd February 27, 2012 +.Dd September 23, 2013 .Dt NETMAP 4 .Os .Sh NAME @@ -267,14 +267,14 @@ The following code implements a traffic #include struct netmap_if *nifp; struct netmap_ring *ring; -struct netmap_request nmr; +struct nmreq nmr; fd = open("/dev/netmap", O_RDWR); bzero(&nmr, sizeof(nmr)); -strcpy(nmr.nm_name, "ix0"); -nmr.nm_version = NETMAP_API; +strcpy(nmr.nr_name, "ix0"); +nmr.nr_version = NETMAP_API; ioctl(fd, NIOCREG, &nmr); -p = mmap(0, nmr.memsize, fd); +p = mmap(0, nmr.nr_memsize, fd); nifp = NETMAP_IF(p, nmr.offset); ring = NETMAP_TXRING(nifp, 0); fds.fd = fd;