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 <net/netmap_user.h>
 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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to