Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net whitespace and comment. sync with kame



details:   https://anonhg.NetBSD.org/src/rev/a1599ab5596e
branches:  trunk
changeset: 519586:a1599ab5596e
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Dec 21 02:50:02 2001 +0000

description:
whitespace and comment.  sync with kame

diffstat:

 sys/net/net_osdep.c |   8 ++++----
 sys/net/net_osdep.h |  51 ++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 52 insertions(+), 7 deletions(-)

diffs (131 lines):

diff -r c9b4c1aae200 -r a1599ab5596e sys/net/net_osdep.c
--- a/sys/net/net_osdep.c       Fri Dec 21 02:03:20 2001 +0000
+++ b/sys/net/net_osdep.c       Fri Dec 21 02:50:02 2001 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: net_osdep.c,v 1.3 2001/11/12 23:49:46 lukem Exp $      */
+/*     $NetBSD: net_osdep.c,v 1.4 2001/12/21 02:50:02 itojun Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -15,7 +15,7 @@
  * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_osdep.c,v 1.3 2001/11/12 23:49:46 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_osdep.c,v 1.4 2001/12/21 02:50:02 itojun Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
diff -r c9b4c1aae200 -r a1599ab5596e sys/net/net_osdep.h
--- a/sys/net/net_osdep.h       Fri Dec 21 02:03:20 2001 +0000
+++ b/sys/net/net_osdep.h       Fri Dec 21 02:50:02 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net_osdep.h,v 1.6 2001/07/07 18:26:26 perry Exp $      */
+/*     $NetBSD: net_osdep.h,v 1.7 2001/12/21 02:50:02 itojun Exp $     */
 /*     $KAME: net_osdep.h,v 1.51 2001/07/06 06:21:43 itojun Exp $      */
 
 /*
@@ -35,6 +35,13 @@
 
 /*
  * OS dependencies:
+ * - RTFREE()
+ *   bsdi does not escape this macro using do-clause, so it is recommended
+ *   to escape the macro explicitly.
+ *   e.g.
+ *     if (rt) {
+ *             RTFREE(rt);
+ *     }
  *
  * - whether the IPv4 input routine convert the byte order of some fileds
  *   of the IP header (x: convert to the host byte order, s: strip the header
@@ -128,6 +135,14 @@
  *     OpenBSD 2.8
  *             timeout_{add,set,del} is encouraged (sys/timeout.h)
  *
+ * - kernel internal time structure
+ *     FreeBSD 2, NetBSD, OpenBSD, BSD/OS
+ *             mono_time.tv_u?sec, time.tv_u?sec
+ *     FreeBSD [34]
+ *             time_second
+ *     if you need portability, #ifdef out FreeBSD[34], or use microtime(&tv)
+ *     then touch tv.tv_sec.
+ *
  * - sysctl
  *     NetBSD, OpenBSD
  *             foo_sysctl()
@@ -164,12 +179,16 @@
  *
  * - ovbcopy()
  *     in NetBSD 1.4 or later, ovbcopy() is not supplied in the kernel.
- *     we provide a version here as a macro for memmove.
+ *     we have updated sys/systm.h to include declaration.
  *
  * - splnet()
  *     NetBSD 1.4 or later requires splsoftnet().
  *     other operating systems use splnet().
  *
+ * - splimp()
+ *     NetBSD-current (2001/4/13): use splnet() in network, splvm() in vm.
+ *     other operating systems: use splimp().
+ *
  * - dtom()
  *     NEVER USE IT!
  *
@@ -228,7 +247,9 @@
  *     others: do not increase refcnt for ifp->if_addrlist and in_ifaddr.
  *             use IFAFREE once when ifaddr is disconnected from
  *             ifp->if_addrlist and in_ifaddr.  IFAFREE frees ifaddr when
- *             ifa_refcnt goes negative.
+ *             ifa_refcnt goes negative.  in KAME environment, IFAREF is
+ *             provided as a compatibility wrapper (use it instead of
+ *             ifa_refcnt++ to reduce #ifdef).
  *
  * - ifnet.if_lastchange
  *     freebsd, bsdi, netbsd-current (jun 14 2001-),
@@ -236,6 +257,30 @@
  *             (RFC1573 ifLastChange interpretation)
  *     netbsd151, openbsd29: updated whenever packets go through the interface.
  *             (4.4BSD interpretation)
+ *
+ * - kernel compilation options ("options HOGE" in kernel config file)
+ *     freebsd4: sys/conf/options has to have mapping between option
+ *             and a header file (opt_hoge.h).
+ *     netbsd: by default, -DHOGE will go into
+ *             sys/arch/foo/compile/BAR/Makefile.
+ *             if you define mapping in sys/conf/files, you can create
+ *             a header file like opt_hoge.h to help make dependencies.
+ *     bsdi/openbsd: always use -DHOGE in Makefile.  there's no need/way
+ *             to have opt_hoge.h.
+ *
+ *     therefore, opt_hoge.h is mandatory on freebsd4 only.
+ *
+ * - MALLOC() macro
+ *     Use it only if the size of the allocation is constant.
+ *     When we do NOT collect statistics about kernel memory usage, the result
+ *     of macro expansion contains a large set of condition branches.  If the
+ *     size is not constant, compilation optimization cannot be applied, and
+ *     a bunch of the large branch will be embedded in the kernel code.
+ *
+ * - M_COPY_PKTHDR
+ *     openbsd30: M_COPY_PKTHDR is deprecated.  use M_MOVE_PKTHDR or
+ *             M_DUP_PKTHDR, depending on how you want to handle m_tag.
+ *     others: M_COPY_PKTHDR is available as usual.
  */
 
 #ifndef __NET_NET_OSDEP_H_DEFINED_



Home | Main Index | Thread Index | Old Index