The NetBSD Project

CVS log for src/sys/netinet/in_pcb.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / netinet

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.202 / (download) - annotate - [select for diffs], Fri Nov 4 09:05:41 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.201: +59 -19 lines
Diff to previous 1.201 (colored)

ipcb: add/update the description of functions

From rmind-smpnet patches

Revision 1.201 / (download) - annotate - [select for diffs], Fri Nov 4 09:05:04 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.200: +5 -5 lines
Diff to previous 1.200 (colored)

inpcb: replace leading white spaces with tabs

Revision 1.200 / (download) - annotate - [select for diffs], Fri Nov 4 09:04:27 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.199: +35 -35 lines
Diff to previous 1.199 (colored)

inpcb: get rid of parentheses for return value

Revision 1.199 / (download) - annotate - [select for diffs], Fri Nov 4 09:03:56 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.198: +4 -4 lines
Diff to previous 1.198 (colored)

inpcb: use NULL

Revision 1.198 / (download) - annotate - [select for diffs], Fri Nov 4 09:03:20 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.197: +9 -9 lines
Diff to previous 1.197 (colored)

inpcb: use in_port_t for port numbers

Revision 1.197 / (download) - annotate - [select for diffs], Fri Nov 4 09:02:38 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.196: +23 -19 lines
Diff to previous 1.196 (colored)

inpcb: use pool_cache instead of pool

Revision 1.196 / (download) - annotate - [select for diffs], Fri Nov 4 09:01:53 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.195: +5 -5 lines
Diff to previous 1.195 (colored)

inpcb: rename functions to in6pcb_*

Revision 1.195 / (download) - annotate - [select for diffs], Fri Nov 4 09:00:58 2022 UTC (15 months, 3 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.194: +49 -49 lines
Diff to previous 1.194 (colored)

inpcb: rename functions to inpcb_*

Inspired by rmind-smpnet patches.

Revision 1.194 / (download) - annotate - [select for diffs], Sat Oct 29 02:56:29 2022 UTC (15 months, 4 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.193: +30 -2 lines
Diff to previous 1.193 (colored)

inpcb: fix for kernels without INET6

Revision 1.193 / (download) - annotate - [select for diffs], Fri Oct 28 05:25:36 2022 UTC (15 months, 4 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.192: +63 -46 lines
Diff to previous 1.192 (colored)

inpcb: separate inpcb again to reduce the size of PCB for IPv4

The data size of PCB for IPv4 increased because of the merge of
struct in6pcb.  The change decreases the size to the original size by
separating struct inpcb (again).  struct in4pcb and in6pcb that embed
struct inpcb are introduced.

Even after the separation, users don't need to realize the separation
and only have to use some macros to access dedicated data.  For example,
inp->inp_laddr is now accessed through in4p_laddr(inp).

Revision 1.192 / (download) - annotate - [select for diffs], Fri Oct 28 05:18:39 2022 UTC (15 months, 4 weeks ago) by ozaki-r
Branch: MAIN
Changes since 1.191: +56 -56 lines
Diff to previous 1.191 (colored)

inpcb: integrate data structures of PCB into one

Data structures of network protocol control blocks (PCBs), i.e.,
struct inpcb, in6pcb and inpcb_hdr, are not organized well.  Users of
the data structures have to handle them separately and thus the code
is cluttered and duplicated.

The commit integrates the data structures into one, struct inpcb.  As a
result, users of PCBs only have to handle just one data structure, so
the code becomes simple.

One drawback is that the data size of PCB for IPv4 increases by 40 bytes
(from 248 bytes to 288 bytes).

Revision 1.191 / (download) - annotate - [select for diffs], Fri Oct 14 19:39:32 2022 UTC (16 months, 1 week ago) by ryo
Branch: MAIN
Changes since 1.190: +7 -10 lines
Diff to previous 1.190 (colored)

Avoid error of "-Wreturn-local-addr", and simplify the logic.

However, -Wreturn-local-addr is still disabled by default by GCC_NO_RETURN_LOCAL_ADDR
in bsd.own.mk because it causes errors in other parts.

Revision 1.190 / (download) - annotate - [select for diffs], Mon Aug 29 09:14:02 2022 UTC (17 months, 4 weeks ago) by knakahara
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.189: +5 -3 lines
Diff to previous 1.189 (colored)

Add sysctl entry to control to send routing message for RTM_DYNAMIC.

Some routing daemons require such routing message to keep coherency.

If we want to let kernel send such message, set net.inet.icmp.dynamic_rt_msg=1
for IPv4, net.inet6.icmp6.dynamic_rt_msg=1 for IPv6.
Default(=0) is the same as before, that is, not send such routing message.

Revision 1.189 / (download) - annotate - [select for diffs], Fri Jul 29 07:35:16 2022 UTC (18 months, 4 weeks ago) by knakahara
Branch: MAIN
Changes since 1.188: +2 -3 lines
Diff to previous 1.188 (colored)

Remove obsoleted comments.

These comments are added with IFNET_LOCK by in_pcb.c:r1.180 and
in6_pcb.c:r1.162.  And then, IFNET_LOCK codes are removed in
in_pcb.c:r1.183 and in6_pcb.c:r1.166, however the comments have
remained.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Jun 10 09:51:10 2022 UTC (20 months, 2 weeks ago) by knakahara
Branch: MAIN
Changes since 1.187: +7 -5 lines
Diff to previous 1.187 (colored)

Use LIST_FOREACH macro.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Jun 9 07:01:27 2022 UTC (20 months, 2 weeks ago) by knakahara
Branch: MAIN
Changes since 1.186: +8 -8 lines
Diff to previous 1.186 (colored)

refactor: use TAILQ_FOREACH instead of TAILQ_FOREACH_SAFE about inpt_queue.

They don't use "ninph" pointer and don't remove elements.

Revision 1.186 / (download) - annotate - [select for diffs], Tue Oct 19 20:01:09 2021 UTC (2 years, 4 months ago) by roy
Branch: MAIN
Changes since 1.185: +2 -4 lines
Diff to previous 1.185 (colored)

netinet: Allow binding the unspecified address when no addresses exist

You should always be able to bind to the unspecified address even if
no addresses have been configured on any interface.

For example, a DHCP client could be started before the loopback interface
has been fully configured.

Revision 1.185 / (download) - annotate - [select for diffs], Tue Sep 8 14:12:57 2020 UTC (3 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.184: +11 -6 lines
Diff to previous 1.184 (colored)

Add IP_BINDANY, IPV6_BINDANY which can be used to bind to any address in
order to implement transparent proxies.

Revision 1.184 / (download) - annotate - [select for diffs], Thu Aug 20 21:21:32 2020 UTC (3 years, 6 months ago) by riastradh
Branch: MAIN
Changes since 1.183: +4 -2 lines
Diff to previous 1.183 (colored)

[ozaki-r] Changes to the kernel core for wireguard

Revision 1.182.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:47 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.182: +2 -4 lines
Diff to previous 1.182 (colored) next main 1.183 (colored)

Sync with HEAD

Revision 1.183 / (download) - annotate - [select for diffs], Wed May 15 02:59:18 2019 UTC (4 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.182: +2 -4 lines
Diff to previous 1.182 (colored)

Get rid of IFNET_LOCK for if_mcast_op to avoid a deadlock

The IFNET_LOCK was added to avoid data races on if_flags for IFF_ALLMULTI.
Unfortunatetly it caused a deadlock instead.  A known scenario causing a
deadlock is to occur the following two operations concurrently: (a) a removal of
an IP adddres assigned to an interface and (b) a manipulation of multicast
groups to the interface.  The resource dependency graph is like this:
  softnet_lock => IFNET_LOCK => psref_target_destroy => softint => softnet_lock

Thanks to the previous commit that avoids data races on if_flags for
IFF_ALLMULTI by another approach, we can remove IFNET_LOCK and defuse the
deadlock.

PR kern/54189

Revision 1.178.4.3 / (download) - annotate - [select for diffs], Sun Mar 18 10:57:01 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.178.4.2: +3 -2 lines
Diff to previous 1.178.4.2 (colored) to branchpoint 1.178 (colored) next main 1.179 (colored)

Pull up following revision(s) (requested by tih in ticket #639):
	sys/kern/uipc_socket.c: revision 1.258
	sys/kern/uipc_socket.c: revision 1.259
	sys/netinet/ip_input.c: revision 1.364 (via patch)
	sys/netinet/ip_output.c: revision 1.289
	sys/netinet/in.h: revision 1.102
	sys/netinet/in_pcb.c: revision 1.181
	share/man/man9/sockopt.9: revision 1.11
	sys/netinet/in_pcb.h: revision 1.65
	sys/sys/socketvar.h: revision 1.146
	sys/kern/uipc_syscalls.c: revision 1.189
	sys/netinet/ip_output.c: revision 1.290
	share/man/man4/ip.4: revision 1.41
	share/man/man4/ip.4: revision 1.42
	sys/kern/uipc_syscalls.c: revision 1.190

pass valsize for getsockopt like we do for setsockopt
make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

new sentence-new line

Remove comment now that the getsockopt code passes the size.

Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).
(Tom Ivar Helbekkmo)

Revision 1.182 / (download) - annotate - [select for diffs], Tue Feb 27 14:44:10 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, isaki-audio2-base, isaki-audio2
Branch point for: phil-wifi
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored)

Dedup: merge

	ipsec4_get_policy and ipsec6_get_policy
	ipsec4_delete_pcbpolicy and ipsec6_delete_pcbpolicy

The already-existing ipsec_get_policy() function is inlined in the new
one.

Revision 1.178.4.2 / (download) - annotate - [select for diffs], Tue Jan 2 10:20:34 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.178.4.1: +5 -2 lines
Diff to previous 1.178.4.1 (colored) to branchpoint 1.178 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #456):
	sys/arch/arm/sunxi/sunxi_emac.c: 1.9
	sys/dev/ic/dwc_gmac.c: 1.43-1.44
	sys/dev/pci/if_iwm.c: 1.75
	sys/dev/pci/if_wm.c: 1.543
	sys/dev/pci/ixgbe/ixgbe.c: 1.112
	sys/dev/pci/ixgbe/ixv.c: 1.74
	sys/kern/sys_socket.c: 1.75
	sys/net/agr/if_agr.c: 1.43
	sys/net/bpf.c: 1.219
	sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
	sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
	sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
	sys/net/if_etherip.c: 1.40
	sys/net/if_ethersubr.c: 1.243, 1.246
	sys/net/if_faith.c: 1.57
	sys/net/if_gif.c: 1.132
	sys/net/if_l2tp.c: 1.15, 1.17
	sys/net/if_loop.c: 1.98-1.101
	sys/net/if_media.c: 1.35
	sys/net/if_pppoe.c: 1.131-1.132
	sys/net/if_spppsubr.c: 1.176-1.177
	sys/net/if_tun.c: 1.142
	sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
	sys/net/npf/npf_ifaddr.c: 1.3
	sys/net/npf/npf_os.c: 1.8-1.9
	sys/net/rtsock.c: 1.230
	sys/netcan/if_canloop.c: 1.3-1.5
	sys/netinet/if_arp.c: 1.255
	sys/netinet/igmp.c: 1.65
	sys/netinet/in.c: 1.210-1.211
	sys/netinet/in_pcb.c: 1.180
	sys/netinet/ip_carp.c: 1.92, 1.94
	sys/netinet/ip_flow.c: 1.81
	sys/netinet/ip_input.c: 1.362
	sys/netinet/ip_mroute.c: 1.147
	sys/netinet/ip_output.c: 1.283, 1.285, 1.287
	sys/netinet6/frag6.c: 1.61
	sys/netinet6/in6.c: 1.251, 1.255
	sys/netinet6/in6_pcb.c: 1.162
	sys/netinet6/ip6_flow.c: 1.35
	sys/netinet6/ip6_input.c: 1.183
	sys/netinet6/ip6_output.c: 1.196
	sys/netinet6/mld6.c: 1.90
	sys/netinet6/nd6.c: 1.239-1.240
	sys/netinet6/nd6_nbr.c: 1.139
	sys/netinet6/nd6_rtr.c: 1.136
	sys/netipsec/ipsec_output.c: 1.65
	sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
  destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
  pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Jan 1 00:51:36 2018 UTC (6 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.180: +3 -2 lines
Diff to previous 1.180 (colored)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
   IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
   the parameter it's supplied with:
   - If it's sizeof(int), assume it's being used as in Linux:
     - If it's non-zero, turn on the IP_RECVPKTINFO option.
     - If it's zero, turn off the IP_RECVPKTINFO option.
   - If it's sizeof(struct in_pktinfo), assume it's being used as in
     Solaris, to set a default for the source interface and/or
     source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
   on data size, and just added a fallback to a Linux (and current NetBSD)
   compatible value if the size is unknown (as it is now), or,
   in the future, if the calling application specifies a receiving
   buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

Revision 1.178.4.1 / (download) - annotate - [select for diffs], Thu Dec 21 21:08:13 2017 UTC (6 years, 2 months ago) by snj
Branch: netbsd-8
Changes since 1.178: +15 -8 lines
Diff to previous 1.178 (colored)

Pull up following revision(s) (requested by ryo in ticket #445):
	distrib/sets/lists/debug/mi: revision 1.222
	distrib/sets/lists/tests/mi: revision 1.760
	share/man/man4/ip.4: revision 1.38
	sys/netinet/in.c: revision 1.207
	sys/netinet/in.h: revision 1.101
	sys/netinet/in_pcb.c: revision 1.179
	sys/netinet/in_pcb.h: revision 1.64
	sys/netinet/ip_output.c: revision 1.284, 1.286
	sys/netinet/ip_var.h: revision 1.120-1.121
	sys/netinet/raw_ip.c: revision 1.166-1.167
	sys/netinet/udp_usrreq.c: revision 1.235-1.236
	sys/netinet/udp_var.h: revision 1.42
	tests/net/net/Makefile: revision 1.21
	tests/net/net/t_pktinfo_send.c: revision 1.1-1.2
Add support IP_PKTINFO for sendmsg(2).
The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.
Reviewed by ozaki-r@ and christos@. thanks.
--
As is the case with IPV6_PKTINFO, IP_PKTINFO can be sent without EADDRINUSE
even if the UDP address:port in use is specified.

Revision 1.180 / (download) - annotate - [select for diffs], Fri Dec 15 04:03:46 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.179: +5 -2 lines
Diff to previous 1.179 (colored)

Ensure to call if_mcast_op with holding IFNET_LOCK

Note that CARP doesn't deal with IFNET_LOCK yet.

Revision 1.143.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:04 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.143.2.2: +150 -85 lines
Diff to previous 1.143.2.2 (colored) to branchpoint 1.143 (colored) next main 1.144 (colored)

update from HEAD

Revision 1.155.2.8 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:12 2017 UTC (6 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.7: +33 -10 lines
Diff to previous 1.155.2.7 (colored) to branchpoint 1.155 (colored) next main 1.156 (colored)

Sync with HEAD

Revision 1.179 / (download) - annotate - [select for diffs], Thu Aug 10 04:31:58 2017 UTC (6 years, 6 months ago) by ryo
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, nick-nhusb-base-20170825
Changes since 1.178: +15 -8 lines
Diff to previous 1.178 (colored)

Add support IP_PKTINFO for sendmsg(2).

The source address or output interface can be specified by adding IP_PKTINFO
to the control part of the message on a SOCK_DGRAM or SOCK_RAW socket.

Reviewed by ozaki-r@ and christos@. thanks.

Revision 1.166.2.6 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:29 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.166.2.5: +5 -2 lines
Diff to previous 1.166.2.5 (colored) to branchpoint 1.166 (colored) next main 1.167 (colored)

Sync with HEAD

Revision 1.178 / (download) - annotate - [select for diffs], Tue Apr 25 05:44:11 2017 UTC (6 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Changes since 1.177: +3 -2 lines
Diff to previous 1.177 (colored)

Check if solock of PCB is held when SP caches in the PCB are accessed

To this end, a back pointer from inpcbpolicy to inpcb_hdr is added.

Revision 1.173.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:05 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.173: +19 -8 lines
Diff to previous 1.173 (colored) next main 1.174 (colored)

Sync with HEAD

Revision 1.177 / (download) - annotate - [select for diffs], Thu Apr 20 08:45:09 2017 UTC (6 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: bouyer-socketcan-base1
Changes since 1.176: +4 -2 lines
Diff to previous 1.176 (colored)

Simplify logic of udp4_sendup and udp6_sendup

They are always passed a socket with the same protocol faimiliy
as its own: AF_INET for udp4_sendup and AF_INET6 for udp6_sendup.

Revision 1.166.2.5 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:50 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.166.2.4: +17 -9 lines
Diff to previous 1.166.2.4 (colored) to branchpoint 1.166 (colored)

Sync with HEAD

Revision 1.176 / (download) - annotate - [select for diffs], Thu Mar 2 05:29:31 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Changes since 1.175: +15 -2 lines
Diff to previous 1.175 (colored)

Make sure imo_membership is protected by inp's lock (solock)

Revision 1.175 / (download) - annotate - [select for diffs], Mon Feb 13 04:05:58 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.174: +4 -4 lines
Diff to previous 1.174 (colored)

Replace splnet with splsoftnet

Revision 1.155.2.7 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:59 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.6: +24 -12 lines
Diff to previous 1.155.2.6 (colored) to branchpoint 1.155 (colored)

Sync with HEAD

Revision 1.174 / (download) - annotate - [select for diffs], Mon Jan 23 09:14:24 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.173: +2 -6 lines
Diff to previous 1.173 (colored)

Get rid of splnet for pool(9)

We don't need it anymore.

Revision 1.173 / (download) - annotate - [select for diffs], Wed Jan 11 13:08:29 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.172: +2 -3 lines
Diff to previous 1.172 (colored)

Get rid of unnecessary header inclusions

Revision 1.166.2.4 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:51 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.166.2.3: +24 -7 lines
Diff to previous 1.166.2.3 (colored) to branchpoint 1.166 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.172 / (download) - annotate - [select for diffs], Mon Dec 12 03:55:57 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored)

Make the routing table and rtcaches MP-safe

See the following descriptions for details.

Proposed on tech-kern and tech-net


Overview
--------

We protect the routing table with a rwock and protect
rtcaches with another rwlock. Each rtentry is protected
from being freed or updated via reference counting and psref.

Global rwlocks
--------------

There are two rwlocks; one for the routing table (rt_lock) and
the other for rtcaches (rtcache_lock). rtcache_lock covers
all existing rtcaches; there may have room for optimizations
(future work).

The locking order is rtcache_lock first and rt_lock is next.

rtentry references
------------------

References to an rtentry is managed with reference counting
and psref. Either of the two mechanisms is used depending on
where a rtentry is obtained. Reference counting is used when
we obtain a rtentry from the routing table directly via
rtalloc1 and rtrequest{,1} while psref is used when we obtain
a rtentry from a rtcache via rtcache_* APIs. In both cases,
a caller can sleep/block with holding an obtained rtentry.

The reasons why we use two different mechanisms are (i) only
using reference counting hurts the performance due to atomic
instructions (rtcache case) (ii) ease of implementation;
applying psref to APIs such rtaloc1 and rtrequest{,1} requires
additional works (adding a local variable and an argument).

We will finally migrate to use only psref but we can do it
when we have a lockless routing table alternative.

Reference counting for rtentry
------------------------------

rt_refcnt now doesn't count permanent references such as for
rt_timers and rtcaches, instead it is used only for temporal
references when obtaining a rtentry via rtalloc1 and rtrequest{,1}.
We can do so because destroying a rtentry always involves
removing references of rt_timers and rtcaches to the rtentry
and we don't need to track such references. This also makes
it easy to wait for readers to release references on deleting
or updating a rtentry, i.e., we can simply wait until the
reference counter is 0 or 1. (If there are permanent references
the counter can be arbitrary.)

rt_ref increments a reference counter of a rtentry and rt_unref
decrements it. rt_ref is called inside APIs (rtalloc1 and
rtrequest{,1} so users don't need to care about it while
users must call rt_unref to an obtained rtentry after using it.

rtfree is removed and we use rt_unref and rt_free instead.
rt_unref now just decrements the counter of a given rtentry
and rt_free just tries to destroy a given rtentry.

See the next section for destructions of rtentries by rt_free.

Destructions of rtentries
-------------------------

We destroy a rtentry only when we call rtrequst{,1}(RTM_DELETE);
the original implementation can destroy in any rtfree where it's
the last reference. If we use reference counting or psref, it's
easy to understand if the place that a rtentry is destroyed is
fixed.

rt_free waits for references to a given rtentry to be released
before actually destroying the rtentry. rt_free uses a condition
variable (cv_wait) (and psref_target_destroy for psref) to wait.

Unfortunately rtrequst{,1}(RTM_DELETE) can be called in softint
that we cannot use cv_wait. In that case, we have to defer the
destruction to a workqueue.

rtentry#rt_cv, rtentry#rt_psref and global variables
(see rt_free_global) are added to conduct the procedure.

Updates of rtentries
--------------------

One difficulty to use refcnt/psref instead of rwlock for rtentry
is updates of rtentries. We need an additional mechanism to
prevent readers from seeing inconsistency of a rtentry being
updated.

We introduce RTF_UPDATING flag to rtentries that are updating.
While the flag is set to a rtentry, users cannot acquire the
rtentry. By doing so, we avoid users to see inconsistent
rtentries.

There are two options when a user tries to acquire a rtentry
with the RTF_UPDATING flag; if a user runs in softint context
the user fails to acquire a rtentry (NULL is returned).
Otherwise a user waits until the update completes by waiting
on cv.

The procedure of a updater is simpler to destruction of
a rtentry. Wait on cv (and psref) and after all readers left,
proceed with the update.

Global variables (see rt_update_global) are added to conduct
the procedure.

Currently we apply the mechanism to only RTM_CHANGE in
rtsock.c. We would have to apply other codes. See
"Known issues" section.

psref for rtentry
-----------------

When we obtain a rtentry from a rtcache via rtcache_* APIs,
psref is used to reference to the rtentry.

rtcache_ref acquires a reference to a rtentry with psref
and rtcache_unref releases the reference after using it.
rtcache_ref is called inside rtcache_* APIs and users don't
need to take care of it while users must call rtcache_unref
to release the reference.

struct psref and int bound that is needed for psref is
embedded into struct route. By doing so we don't need to
add local variables and additional argument to APIs.

However this adds another constraint to psref other than
reference counting one's; holding a reference of an rtentry
via a rtcache is allowed by just one caller at the same time.
So we must not acquire a rtentry via a rtcache twice and
avoid a recursive use of a rtcache. And also a rtcache must
be arranged to be used by a LWP/softint at the same time
somehow. For IP forwarding case, we have per-CPU rtcaches
used in softint so the constraint is guaranteed. For a h
rtcache of a PCB case, the constraint is guaranteed by the
solock of each PCB. Any other cases (pf, ipf, stf and ipsec)
are currently guaranteed by only the existence of the global
locks (softnet_lock and/or KERNEL_LOCK). If we've found the
cases that we cannot guarantee the constraint, we would need
to introduce other rtcache APIs that use simple reference
counting.

psref of rtcache is created with IPL_SOFTNET and so rtcache
shouldn't used at an IPL higher than IPL_SOFTNET.

Note that rtcache_free is used to invalidate a given rtcache.
We don't need another care by my change; just keep them as
they are.

Performance impact
------------------

When NET_MPSAFE is disabled the performance drop is 3% while
when it's enabled the drop is increased to 11%. The difference
comes from that currently we don't take any global locks and
don't use psref if NET_MPSAFE is disabled.

We can optimize the performance of the case of NET_MPSAFE
on by reducing lookups of rtcache that uses psref;
currently we do two lookups but we should be able to trim
one of two. This is a future work.

Known issues
------------

There are two known issues to be solved; one is that
a caller of rtrequest(RTM_ADD) may change rtentry (see rtinit).
We need to prevent new references during the update. Or
we may be able to remove the code (perhaps, need more
investigations).

The other is rtredirect that updates a rtentry. We need
to apply our update mechanism, however it's not easy because
rtredirect is called in softint and we cannot apply our
mechanism simply. One solution is to defer rtredirect to
a workqueue but it requires some code restructuring.

Revision 1.171 / (download) - annotate - [select for diffs], Thu Dec 8 05:16:33 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.170: +24 -7 lines
Diff to previous 1.170 (colored)

Add rtcache_unref to release points of rtentry stemming from rtcache

In the MP-safe world, a rtentry stemming from a rtcache can be freed at any
points. So we need to protect rtentries somehow say by reference couting or
passive references. Regardless of the method, we need to call some release
function of a rtentry after using it.

The change adds a new function rtcache_unref to release a rtentry. At this
point, this function does nothing because for now we don't add a reference
to a rtentry when we get one from a rtcache. We will add something useful
in a further commit.

This change is a part of changes for MP-safe routing table. It is separated
to avoid one big change that makes difficult to debug by bisecting.

Revision 1.166.2.3 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:21 2016 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.166.2.2: +3 -3 lines
Diff to previous 1.166.2.2 (colored) to branchpoint 1.166 (colored)

Sync with HEAD

Revision 1.155.2.6 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:09 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.5: +52 -20 lines
Diff to previous 1.155.2.5 (colored) to branchpoint 1.155 (colored)

Sync with HEAD

Revision 1.170 / (download) - annotate - [select for diffs], Thu Sep 29 12:19:47 2016 UTC (7 years, 4 months ago) by roy
Branch: MAIN
CVS Tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204, nick-nhusb-base-20161004
Changes since 1.169: +3 -3 lines
Diff to previous 1.169 (colored)

Now that we disallow sending or receiving from invalid addresses,
allow binding to tentative addresses.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Aug 26 23:12:06 2016 UTC (7 years, 6 months ago) by roy
Branch: MAIN
CVS Tags: localcount-20160914
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

Allow bind to detached INET addresses.

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Sat Aug 6 00:19:10 2016 UTC (7 years, 6 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.166.2.1: +46 -18 lines
Diff to previous 1.166.2.1 (colored) to branchpoint 1.166 (colored)

Sync with HEAD

Revision 1.168 / (download) - annotate - [select for diffs], Mon Aug 1 03:15:30 2016 UTC (7 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160806
Changes since 1.167: +46 -18 lines
Diff to previous 1.167 (colored)

Apply pserialize and psref to struct ifaddr and its variants

This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr)
MP-safe by using pserialize and psref. At this moment, pserialize_perform
and psref_target_destroy are disabled because (1) we don't need them
because of softnet_lock (2) they cause a deadlock because of softnet_lock.
So we'll enable them when we remove softnet_lock in the future.

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Tue Jul 26 03:24:23 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.166: +12 -8 lines
Diff to previous 1.166 (colored)

Sync with HEAD

Revision 1.167 / (download) - annotate - [select for diffs], Wed Jul 20 03:38:09 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20160726
Changes since 1.166: +12 -8 lines
Diff to previous 1.166 (colored)

Reduce scopes of variables

Revision 1.155.2.5 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:22 2016 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.4: +13 -10 lines
Diff to previous 1.155.2.4 (colored) to branchpoint 1.155 (colored)

Sync with HEAD

Revision 1.166 / (download) - annotate - [select for diffs], Fri Jul 8 04:33:30 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.165: +4 -4 lines
Diff to previous 1.165 (colored)

Replace macros to get an IP address with proper inline functions

The inline functions are more friendly for applying psz/psref;
they consist of only simple interations.

Revision 1.165 / (download) - annotate - [select for diffs], Wed Jul 6 08:42:34 2016 UTC (7 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.164: +7 -6 lines
Diff to previous 1.164 (colored)

Switch the IPv4 address list to pslist(9)

Note that we leave the old list just in case; it seems there are some
kvm(3) users accessing the list. We can remove it later if we confirmed
nobody does actually.

Revision 1.164 / (download) - annotate - [select for diffs], Tue Jun 21 03:28:27 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.163: +6 -4 lines
Diff to previous 1.163 (colored)

Replace ifp of ip_moptions and ip6_moptions with if_index

The motivation is the same as the mbuf's rcvif case; avoid having a pointer
of an ifnet object in ip_moptions and ip6_moptions, which is not MP-safe.

ip_moptions and ip6_moptions can be stored in a PCB for inet or inet6
that's life time is different from ifnet one and so an ifnet object can be
disappeared anytime we get it via them. Thus we need to look up an ifnet
object by if_index every time for safe.

Revision 1.155.2.4 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:33 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.3: +3 -6 lines
Diff to previous 1.155.2.3 (colored) to branchpoint 1.155 (colored)

Sync with HEAD

Revision 1.163 / (download) - annotate - [select for diffs], Mon Feb 15 14:59:03 2016 UTC (8 years ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.162: +3 -6 lines
Diff to previous 1.162 (colored)

Reduce code duplication.

Split creation of IPv4-Mapped IPv6 addresses into its own function
and use it.

No functional change intended.  As posted to tech-net@

Revision 1.155.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:11 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.2: +4 -2 lines
Diff to previous 1.155.2.2 (colored) to branchpoint 1.155 (colored)

Sync with HEAD

Revision 1.162 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:26 2015 UTC (8 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.161: +4 -2 lines
Diff to previous 1.161 (colored)

sprinkle _KERNEL_OPT

Revision 1.155.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:25 2015 UTC (8 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155.2.1: +9 -14 lines
Diff to previous 1.155.2.1 (colored) to branchpoint 1.155 (colored)

Sync with HEAD

Revision 1.161 / (download) - annotate - [select for diffs], Sun May 24 15:43:45 2015 UTC (8 years, 9 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.160: +2 -17 lines
Diff to previous 1.160 (colored)

remove transitional functions in{,6}_pcbconnect_m() that were used in
converting protocol user requests to accept sockaddr instead of mbufs.

remove tcp_input copy in to mbuf from sockaddr and just copy to sockaddr
to make it possible for the transitional functions to go away.

no version bump since these functions only existed for a short time and
were commented as adapters (they appeared in 7.99.15).

Revision 1.160 / (download) - annotate - [select for diffs], Sat May 2 17:18:03 2015 UTC (8 years, 9 months ago) by rtr
Branch: MAIN
Changes since 1.159: +18 -6 lines
Diff to previous 1.159 (colored)

make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}

Revision 1.159 / (download) - annotate - [select for diffs], Sat May 2 14:41:32 2015 UTC (8 years, 9 months ago) by roy
Branch: MAIN
Changes since 1.158: +4 -2 lines
Diff to previous 1.158 (colored)

Add IPv4 address flags IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and
IN_IFF_DETATCHED to mimic the IPv6 address behaviour.
Add SIOCGIFAFLAG_IN ioctl to retrieve the address flag via the
ifreq structure.
Add IPv4 DAD detection via the ARP methods described in RFC 5227.
Add sysctls net.inet.ip.dad_count and net.inet.arp.debug.

Discussed on tech-net@

Revision 1.158 / (download) - annotate - [select for diffs], Sun Apr 26 16:45:51 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.157: +4 -2 lines
Diff to previous 1.157 (colored)

return EINVAL if sin{,6}_len != sizeof(sockaddr_in{,6}) respectively in
in{,6}_pcbconnect().

checking just m->m_len isn't enough because there are various places that
assume sa_len has been properly populated.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Apr 24 22:32:37 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
Changes since 1.156: +4 -10 lines
Diff to previous 1.156 (colored)

make accept, getsockname and getpeername syscalls use sockaddr_big and modify
pr_{accept,sockname,peername} nam parameter type from mbuf * to sockaddr *.

* retained use of mbuftypes[MT_SONAME] for now.
* bump to netbsd version 7.99.12 for parameter type change.

patch posted to tech-net@ 2015/04/19

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:23 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.155: +5 -7 lines
Diff to previous 1.155 (colored)

Sync with HEAD

Revision 1.156 / (download) - annotate - [select for diffs], Fri Apr 3 20:01:07 2015 UTC (8 years, 10 months ago) by rtr
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.155: +5 -7 lines
Diff to previous 1.155 (colored)

* change pr_bind to accept struct sockaddr * instead of struct mbuf *
* update protocol bind implementations to use/expect sockaddr *
  instead of mbuf *
* introduce sockaddr_big struct for storage of addr data passed via
  sys_bind; sockaddr_big is of sufficient size and alignment to
  accommodate all addr data sizes received.
* modify sys_bind to allocate sockaddr_big instead of using an mbuf.
* bump kernel version to 7.99.9 for change to pr_bind() parameter type.

Patch posted to tech-net@
  http://mail-index.netbsd.org/tech-net/2015/03/15/msg005004.html

The choice to use a new structure sockaddr_big has been retained since
changing sockaddr_storage size would lead to unnecessary ABI change. The
use of the new structure does not preclude future work that increases
the size of sockaddr_storage and at that time sockaddr_big may be
trivially replaced.

Tested by mrg@ and myself, discussed with rmind@, posted to tech-net@

Revision 1.151.2.2 / (download) - annotate - [select for diffs], Sat Jan 17 12:10:53 2015 UTC (9 years, 1 month ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.151.2.1: +2 -3 lines
Diff to previous 1.151.2.1 (colored) to branchpoint 1.151 (colored) next main 1.152 (colored)

Pull up following revision(s) (requested by maxv in ticket #427):
	sys/compat/svr4/svr4_schedctl.c: revision 1.8
	sys/netinet/tcp_timer.c: revision 1.88
	sys/miscfs/genfs/layer_vfsops.c: revision 1.45
	sys/compat/svr4/svr4_ioctl.c: revision 1.37
	sys/ufs/chfs/chfs_vfsops.c: revision 1.14
	sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
	sys/compat/common/kern_time_50.c: revision 1.28
	sys/netinet6/ip6_forward.c: revision 1.74
	sys/miscfs/umapfs/umap_vnops.c: revision 1.57
	sys/compat/svr4/svr4_fcntl.c: revision 1.74
	distrib/sets/lists/comp/mi: revision 1.1931
	sys/netinet6/udp6_output.c: revision 1.46
	sys/fs/puffs/puffs_compat.c: revision 1.3
	sys/fs/udf/udf_rename.c: revision 1.11
	sys/compat/svr4/svr4_filio.c: revision 1.24
	sys/fs/udf/udf_rename.c: revision 1.12
	sys/netinet/tcp_usrreq.c: revision 1.202
	sys/miscfs/umapfs/umap_subr.c: revision 1.29
	sys/compat/linux/common/linux_fadvise64.c: revision 1.3
	sys/netinet/if_atm.c: revision 1.34
	sys/miscfs/procfs/procfs_subr.c: revision 1.106
	sys/miscfs/genfs/layer_subr.c: revision 1.37
	sys/netinet/tcp_sack.c: revision 1.30
	sys/compat/freebsd/freebsd_misc.c: revision 1.33
	sys/compat/freebsd/freebsd_file.c: revision 1.33
	sys/ufs/chfs/chfs_vnode.c: revision 1.12
	sys/compat/svr4/svr4_ttold.c: revision 1.34
	sys/compat/linux/common/linux_file.c: revision 1.114
	sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
	sys/compat/linux/common/linux_signal.c: revision 1.76
	sys/compat/common/compat_util.c: revision 1.46
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
	sys/compat/svr4/svr4_sockio.c: revision 1.36
	sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
	sys/compat/svr4/svr4_signal.c: revision 1.66
	sys/kern/kern_exec.c: revision 1.410
	sys/fs/puffs/puffs_vfsops.c: revision 1.115
	sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
	sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
	sys/compat/linux32/common/linux32_misc.c: revision 1.24
	sys/netinet/in_pcb.c: revision 1.153
	sys/sys/malloc.h: revision 1.116
	sys/compat/common/if_43.c: revision 1.9
	share/man/man9/Makefile: revision 1.380
	sys/netinet/tcp_vtw.c: revision 1.12
	sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
	sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
	sys/compat/common/uipc_syscalls_43.c: revision 1.46
	sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
	sys/fs/puffs/puffs_msgif.c: revision 1.97
	sys/compat/svr4/svr4_ipc.c: revision 1.27
	sys/compat/linux/common/linux_exec.c: revision 1.117
	sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
	sys/netinet/tcp_output.c: revision 1.179
	sys/compat/svr4/svr4_termios.c: revision 1.28
	sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
	sys/fs/puffs/puffs_subr.c: revision 1.67
	sys/fs/puffs/puffs_node.c: revision 1.36
	sys/miscfs/overlay/overlay_vnops.c: revision 1.21
	sys/fs/cd9660/cd9660_node.c: revision 1.34
	sys/netinet/raw_ip.c: revision 1.146
	sys/sys/mallocvar.h: revision 1.13
	sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
	share/man/man9/malloc.9: revision 1.50
	sys/netinet6/dest6.c: revision 1.18
	sys/compat/linux/common/linux_uselib.c: revision 1.33
	sys/compat/linux/common/linux_socket.c: revision 1.120
	share/man/man9/malloc.9: revision 1.51
	sys/netinet/tcp_subr.c: revision 1.257
	sys/compat/linux/common/linux_socketcall.c: revision 1.45
	sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
	sys/compat/freebsd/freebsd_ipc.c: revision 1.17
	sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
	sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
	sys/netinet6/in6_pcb.c: revision 1.132
	sys/netinet6/in6_ifattach.c: revision 1.94
	sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
	sys/miscfs/nullfs/null_vfsops.c: revision 1.90
	sys/fs/cd9660/cd9660_util.c: revision 1.12
	sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
	sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
	sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
	sys/compat/linux/common/linux_sched.c: revision 1.67
	sys/compat/linux/common/linux_exec_aout.c: revision 1.67
	sys/compat/linux/common/linux_pipe.c: revision 1.67
	sys/compat/linux/common/linux_llseek.c: revision 1.34
	sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
 - remove struct kmembuckets (dead)
 - correctly deadify MALLOC_XX
 - remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
 - remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
   and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.

Revision 1.155 / (download) - annotate - [select for diffs], Tue Nov 25 19:09:13 2014 UTC (9 years, 3 months ago) by seanb
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored)

Really make SO_REUSEPORT and SO_REUSEADDR equivalent for multicast
sockets.  From FreeBSD.

Revision 1.154 / (download) - annotate - [select for diffs], Tue Nov 25 15:04:37 2014 UTC (9 years, 3 months ago) by seanb
Branch: MAIN
Changes since 1.153: +32 -28 lines
Diff to previous 1.153 (colored)

Clean up any dangling ifp references in (struct in6pcb *)->in6p_v4moptions
(v4 multicast options off v4 mapped v6 socket) on interface destruction.  The
code to clean this up in a true v4 socket was moved to its own function
which is now also called in the corresponding place for v6 sockets on
interface destruction.

Revision 1.153 / (download) - annotate - [select for diffs], Mon Nov 10 18:52:51 2014 UTC (9 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.152: +2 -3 lines
Diff to previous 1.152 (colored)

Do not uselessly include <sys/malloc.h>.

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Mon Sep 8 19:12:04 2014 UTC (9 years, 5 months ago) by msaitoh
Branch: netbsd-7
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

Pull up following revision(s) (requested by rmind in ticket #80):
	sys/netinet6/in6_pcb.c: revision 1.129
	sys/netinet/in_pcb.c: revision 1.152
in_pcbdetach: move ip_freemoptions() under softnet_lock for now (this will
be changed back once other IP paths become MP-safe).  Same for IPv6 routine.
This partially reverts 1.150 of in_pcb.c and 1.127 of in6_pcb.c changes.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Sep 7 00:50:56 2014 UTC (9 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored)

in_pcbdetach: move ip_freemoptions() under softnet_lock for now (this will
be changed back once other IP paths become MP-safe).  Same for IPv6 routine.

This partially reverts 1.150 of in_pcb.c and 1.127 of in6_pcb.c changes.

Revision 1.143.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:35 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.143.2.1: +36 -119 lines
Diff to previous 1.143.2.1 (colored) to branchpoint 1.143 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:25 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.146: +26 -101 lines
Diff to previous 1.146 (colored) next main 1.147 (colored)

Rebase.

Revision 1.151 / (download) - annotate - [select for diffs], Tue Aug 5 05:24:26 2014 UTC (9 years, 6 months ago) by rtr
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.150: +6 -6 lines
Diff to previous 1.150 (colored)

revert the removal of struct lwp * parameter from bind, listen and connect
user requests.

this should resolve the issue relating to nfs client hangs presented
recently by wiz on current-users@

Revision 1.150 / (download) - annotate - [select for diffs], Sun Aug 3 22:11:50 2014 UTC (9 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.149: +13 -9 lines
Diff to previous 1.149 (colored)

in_pcbdetach: not that IGMP and multicast groups are MP-safe, we can move
the ip_freemoptions() call outside the softnet_lock.  Should fix PR/49065.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Jul 24 15:12:03 2014 UTC (9 years, 7 months ago) by rtr
Branch: MAIN
Changes since 1.148: +6 -6 lines
Diff to previous 1.148 (colored)

split PRU_BIND and PRU_LISTEN function out of pr_generic() usrreq
switches and put into separate functions
  xxx_bind(struct socket *, struct mbuf *)
  xxx_listen(struct socket *)

  - always KASSERT(solocked(so)) even if not implemented

  - replace calls to pr_generic() with req = PRU_BIND with call to
    pr_bind()

  - replace calls to pr_generic() with req = PRU_LISTEN with call to
    pr_listen()

  - drop struct lwp * parameter from at_pcbsetaddr(), in_pcbbind() and
    unp_bind() and always use curlwp.

rename existing functions that operate on PCB for consistency (and to
free up their names for xxx_{bind,listen}() PRUs

  - l2cap_{bind,listen}() -> l2cap_{bind,listen}_pcb()
  - sco_{bind,listen}() -> sco_{bind,listen}_pcb()
  - rfcomm_{bind,listen}() -> rfcomm_{bind,listen}_pcb()

patch reviewed by rmind

welcome to netbsd 6.99.48

Revision 1.148 / (download) - annotate - [select for diffs], Fri May 30 01:39:03 2014 UTC (9 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.147: +16 -15 lines
Diff to previous 1.147 (colored)

Introduce 2 new variables: ipsec_enabled and ipsec_used.
Ipsec enabled is controlled by sysctl and determines if is allowed.
ipsec_used is set automatically based on ipsec being enabled, and
rules existing.

Revision 1.147 / (download) - annotate - [select for diffs], Thu May 22 22:01:12 2014 UTC (9 years, 9 months ago) by rmind
Branch: MAIN
Changes since 1.146: +2 -82 lines
Diff to previous 1.146 (colored)

- Add in_init() and move some functions, variables and sysctls into in.c
  where they belong to.  Make some functions and variables static.
- ip_input.c: reduce some #ifdefs, cleanup a little.
- Move some sysctls into ip_flow.c as they belong there.

No functional change.

Revision 1.139.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:09 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.139.2.2: +25 -28 lines
Diff to previous 1.139.2.2 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.145.2.4 / (download) - annotate - [select for diffs], Sun May 18 17:46:13 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.145.2.3: +13 -17 lines
Diff to previous 1.145.2.3 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored)

sync with head

Revision 1.146 / (download) - annotate - [select for diffs], Sat Nov 23 14:20:21 2013 UTC (10 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.145: +14 -22 lines
Diff to previous 1.145 (colored)

convert from CIRCLEQ to TAILQ.

Revision 1.145.2.3 / (download) - annotate - [select for diffs], Mon Sep 23 00:57:53 2013 UTC (10 years, 5 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.145.2.2: +141 -82 lines
Diff to previous 1.145.2.2 (colored) to branchpoint 1.145 (colored)

- Add some initial locking to the IPv4 PCB.
- Rename inpcb_lookup_*() routines to be more accurate and add comments.
- Add some comments about connection life-cycle WRT socket layer.

Revision 1.145.2.2 / (download) - annotate - [select for diffs], Wed Aug 28 15:21:48 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.145.2.1: +2 -4 lines
Diff to previous 1.145.2.1 (colored) to branchpoint 1.145 (colored)

Checkpoint work in progress:
- Initial split of the protocol user-request method into the following
  methods: pr_attach, pr_detach and pr_generic for old the pr_usrreq.
- Adjust socreate(9) and sonewconn(9) to call pr_attach without the
  socket lock held (as a preparation for the locking scheme adjustment).
- Adjust all pr_attach routines to assert that PCB is not set.
- Sprinkle various comments, document some routines and their locking.
- Remove M_PCB, replace with kmem(9).
- Fix few bugs spotted on the way.

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Wed Jul 17 03:16:31 2013 UTC (10 years, 7 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.145: +715 -381 lines
Diff to previous 1.145 (colored)

Checkpoint work in progress:
- Move PCB structures under __INPCB_PRIVATE, adjust most of the callers
  and thus make IPv4 PCB structures mostly opaque.  Any volunteers for
  merging in6pcb with inpcb (see rpaulo-netinet-merge-pcb branch)?
- Move various global vars to the modules where they belong, make them static.
- Some preliminary work for IPv4 PCB locking scheme.
- Make raw IP code mostly MP-safe.  Simplify some of it.
- Rework "fast" IP forwarding (ipflow) code to be mostly MP-safe.  It should
  run from a software interrupt, rather than hard.
- Rework tun(4) pseudo interface to be MP-safe.
- Work towards making some other interfaces more strict.

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:25 2013 UTC (10 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.143: +13 -8 lines
Diff to previous 1.143 (colored)

resync from head

Revision 1.145 / (download) - annotate - [select for diffs], Wed Jun 5 19:01:26 2013 UTC (10 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.144: +8 -8 lines
Diff to previous 1.144 (colored)

IPSEC has not come in two speeds for a long time now (IPSEC == kame,
FAST_IPSEC). Make everything refer to IPSEC to avoid confusion.

Revision 1.144 / (download) - annotate - [select for diffs], Fri Apr 12 21:30:40 2013 UTC (10 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.143: +7 -2 lines
Diff to previous 1.143 (colored)

PR/47738: connect(2) to 239.x.y.z should return error but does not.

Revision 1.139.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:45 2012 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.139.2.1: +24 -9 lines
Diff to previous 1.139.2.1 (colored) to branchpoint 1.139 (colored)

sync with head

Revision 1.143 / (download) - annotate - [select for diffs], Mon Jun 25 15:28:39 2012 UTC (11 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.142: +5 -5 lines
Diff to previous 1.142 (colored)

rename rfc6056 -> portalgo, requested by yamt

Revision 1.142 / (download) - annotate - [select for diffs], Thu Jun 21 10:31:45 2012 UTC (11 years, 8 months ago) by yamt
Branch: MAIN
Changes since 1.141: +21 -6 lines
Diff to previous 1.141 (colored)

constify, comments.
no functional changes.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:40 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.139: +8 -11 lines
Diff to previous 1.139 (colored)

sync with head

Revision 1.139.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:43 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.139.6.1: +8 -11 lines
Diff to previous 1.139.6.1 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

sync to latest -current.

Revision 1.141 / (download) - annotate - [select for diffs], Thu Mar 22 20:34:38 2012 UTC (11 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Changes since 1.140: +8 -11 lines
Diff to previous 1.140 (colored)

remove KAME IPSEC, replaced by FAST_IPSEC

Revision 1.139.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:39 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.139: +8 -8 lines
Diff to previous 1.139 (colored)

merge to -current.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Dec 19 11:59:56 2011 UTC (12 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Changes since 1.139: +8 -8 lines
Diff to previous 1.139 (colored)

rename the IPSEC in-kernel CPP variable and config(8) option to
KAME_IPSEC, and make IPSEC define it so that existing kernel
config files work as before
Now the default can be easily be changed to FAST_IPSEC just by
setting the IPSEC alias to FAST_IPSEC.

Revision 1.139 / (download) - annotate - [select for diffs], Sat Sep 24 17:18:17 2011 UTC (12 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.138: +24 -40 lines
Diff to previous 1.138 (colored)

Add inet4 part of the rfc6056 code contributed by Vlad Balan as part of
Google SoC-2011

Revision 1.137.6.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:55 2011 UTC (12 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.137: +98 -10 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

Sync with HEAD.

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Tue May 31 03:05:07 2011 UTC (12 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.137: +98 -10 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

sync with head

Revision 1.138 / (download) - annotate - [select for diffs], Tue May 3 18:28:45 2011 UTC (12 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.137: +98 -10 lines
Diff to previous 1.137 (colored)

Reduces the resources demanded by TCP sessions in TIME_WAIT-state using
methods called Vestigial Time-Wait (VTW) and Maximum Segment Lifetime
Truncation (MSLT).

MSLT and VTW were contributed by Coyote Point Systems, Inc.

Even after a TCP session enters the TIME_WAIT state, its corresponding
socket and protocol control blocks (PCBs) stick around until the TCP
Maximum Segment Lifetime (MSL) expires.  On a host whose workload
necessarily creates and closes down many TCP sockets, the sockets & PCBs
for TCP sessions in TIME_WAIT state amount to many megabytes of dead
weight in RAM.

Maximum Segment Lifetimes Truncation (MSLT) assigns each TCP session to
a class based on the nearness of the peer.  Corresponding to each class
is an MSL, and a session uses the MSL of its class.  The classes are
loopback (local host equals remote host), local (local host and remote
host are on the same link/subnet), and remote (local host and remote
host communicate via one or more gateways).  Classes corresponding to
nearer peers have lower MSLs by default: 2 seconds for loopback, 10
seconds for local, 60 seconds for remote.  Loopback and local sessions
expire more quickly when MSLT is used.

Vestigial Time-Wait (VTW) replaces a TIME_WAIT session's PCB/socket
dead weight with a compact representation of the session, called a
"vestigial PCB".  VTW data structures are designed to be very fast and
memory-efficient: for fast insertion and lookup of vestigial PCBs,
the PCBs are stored in a hash table that is designed to minimize the
number of cacheline visits per lookup/insertion.  The memory both
for vestigial PCBs and for elements of the PCB hashtable come from
fixed-size pools, and linked data structures exploit this to conserve
memory by representing references with a narrow index/offset from the
start of a pool instead of a pointer.  When space for new vestigial PCBs
runs out, VTW makes room by discarding old vestigial PCBs, oldest first.
VTW cooperates with MSLT.

It may help to think of VTW as a "FIN cache" by analogy to the SYN
cache.

A 2.8-GHz Pentium 4 running a test workload that creates TIME_WAIT
sessions as fast as it can is approximately 17% idle when VTW is active
versus 0% idle when VTW is inactive.  It has 103 megabytes more free RAM
when VTW is active (approximately 64k vestigial PCBs are created) than
when it is inactive.

Revision 1.129.10.1.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:28:22 2010 UTC (13 years, 10 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.129.10.1: +2 -2 lines
Diff to previous 1.129.10.1 (colored) next main 1.130 (colored)

sync to netbsd-5

Revision 1.123.2.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:50 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.123.2.2: +7 -5 lines
Diff to previous 1.123.2.2 (colored) to branchpoint 1.123 (colored) next main 1.124 (colored)

sync with head

Revision 1.129.8.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:28 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.129: +181 -99 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.137 / (download) - annotate - [select for diffs], Tue May 12 22:22:46 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, matt-premerge-20091211, matt-mips64-premerge-20101231, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: rmind-uvmplock, jruoho-x86intr
Changes since 1.136: +4 -4 lines
Diff to previous 1.136 (colored)

Implicit EPERM -> explicit EACCES.

Requested by ad@ and yamt@.

Revision 1.129.10.1 / (download) - annotate - [select for diffs], Sun May 10 20:46:58 2009 UTC (14 years, 9 months ago) by snj
Branch: netbsd-5-0
CVS Tags: netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.129: +4 -2 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Apply patch (requested by sborrill in ticket #745):
Fix compilation with IPNOPRIVPORTS option.

Revision 1.129.4.1 / (download) - annotate - [select for diffs], Sun May 10 20:45:45 2009 UTC (14 years, 9 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.129: +4 -2 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Apply patch (requested by sborrill in ticket #745):
Fix compilation with IPNOPRIVPORTS option.

Revision 1.136 / (download) - annotate - [select for diffs], Sat May 9 20:54:52 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.135: +5 -3 lines
Diff to previous 1.135 (colored)

Add check for IN_MULTICAST() that was taken only to in_pcbbind_port() --
it's necessary in in_pcbbind_addr() as well.

Pointed out by Mihai Chelaru on tech-net@, thanks!

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Mon May 4 08:14:17 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.123.2.1: +197 -105 lines
Diff to previous 1.123.2.1 (colored) to branchpoint 1.123 (colored)

sync with head.

Revision 1.135 / (download) - annotate - [select for diffs], Thu Apr 30 20:26:09 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3
Changes since 1.134: +3 -2 lines
Diff to previous 1.134 (colored)

Commit changes to netinet6/in6_src.c, forgot in previous commit:

    http://mail-index.netbsd.org/source-changes/2009/04/30/msg220547.html

Make in_pcbsetport() set the port number selected before passing "sin" to
kauth(9).

Revision 1.134 / (download) - annotate - [select for diffs], Thu Apr 30 18:18:34 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.133: +33 -14 lines
Diff to previous 1.133 (colored)

- Make in6_pcbbind_{addr,port}() static

- Properly authorize port binding in in_pcbsetport() and in6_pcbsetport()

- Pass struct sockaddr_in6 to in6_pcbsetport() instead of just the address,
  so that we have a more complete context

- Adjust udp6_output() to craft a sockaddr_in6 as it calls in6_pcbsetport()

- Fix an issue in in_pcbbind() where we used the "dom_sa_any" pointer and
  not a copy of it, pointed out by bouyer@, thanks!

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/04/29/msg001259.html

Revision 1.129.2.1 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:22 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.129: +160 -100 lines
Diff to previous 1.129 (colored) next main 1.130 (colored)

Sync with HEAD.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Apr 23 17:02:26 2009 UTC (14 years, 10 months ago) by elad
Branch: MAIN
CVS Tags: nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.132: +22 -18 lines
Diff to previous 1.132 (colored)

- Make kauth(9) call logic match the one in netinet6/in6_pcb.c

- Indent a comment

Revision 1.132 / (download) - annotate - [select for diffs], Thu Apr 23 16:42:56 2009 UTC (14 years, 10 months ago) by elad
Branch: MAIN
Changes since 1.131: +143 -86 lines
Diff to previous 1.131 (colored)

Some changes to in_pcbbind():

  - Extract guts to in_pcbbind_{addr,port}()

  - Put the port auto-assignment logic in in_pcbsetport(), which looks very
    similar to in6_pcbsetport()

  - Fix a bug where "sin" was passed to kauth(9) without being set to
    anything

No objections on tech-net@.

Revision 1.131 / (download) - annotate - [select for diffs], Tue Apr 14 21:25:20 2009 UTC (14 years, 10 months ago) by elad
Branch: MAIN
Changes since 1.130: +2 -3 lines
Diff to previous 1.130 (colored)

Don't set sin->sin_port and sin6->sin6_port to 0 before calling
ifa_ifwithaddr(), as we no longer do a byte compare on the entire struct.

Reviewed by and okay from dyoung@.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:22 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.129: +3 -3 lines
Diff to previous 1.129 (colored)

bzero -> memset

Revision 1.122.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:32 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.122.6.3: +1 -0 lines
Diff to previous 1.122.6.3 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

Sync with HEAD.

Revision 1.125.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:46 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.125: +19 -7 lines
Diff to previous 1.125 (colored) next main 1.126 (colored)

Sync with HEAD.

Revision 1.129 / (download) - annotate - [select for diffs], Sat Oct 11 13:40:57 2008 UTC (15 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, mjf-devfs2-base, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5-0, netbsd-5, jym-xensuspend
Changes since 1.128: +3 -2 lines
Diff to previous 1.128 (colored)

Move uidinfo to its own module in kern_uidinfo.c and include in rump.
No functional change to uidinfo.

Revision 1.125.2.2 / (download) - annotate - [select for diffs], Fri Oct 10 22:35:43 2008 UTC (15 years, 4 months ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.125.2.1: +16 -4 lines
Diff to previous 1.125.2.1 (colored) to branchpoint 1.125 (colored) next main 1.126 (colored)

Sync with HEAD.

Revision 1.122.6.3 / (download) - annotate - [select for diffs], Sun Oct 5 20:11:32 2008 UTC (15 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.122.6.2: +14 -2 lines
Diff to previous 1.122.6.2 (colored) to branchpoint 1.122 (colored)

Sync with HEAD.

Revision 1.128 / (download) - annotate - [select for diffs], Fri Oct 3 16:22:33 2008 UTC (15 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4
Changes since 1.127: +16 -4 lines
Diff to previous 1.127 (colored)

Hallo, pool_init().  Auf wiedersehen & byebye, link set POOL_INIT().

Revision 1.122.6.2 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:58 2008 UTC (15 years, 5 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.122.6.1: +2 -3 lines
Diff to previous 1.122.6.1 (colored) to branchpoint 1.122 (colored)

Sync with HEAD.

Revision 1.125.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:37:00 2008 UTC (15 years, 5 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.125: +4 -5 lines
Diff to previous 1.125 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.127 / (download) - annotate - [select for diffs], Mon Aug 4 07:01:05 2008 UTC (15 years, 6 months ago) by spz
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2
Changes since 1.126: +3 -3 lines
Diff to previous 1.126 (colored)

typo fix in comment (drops the ' in drop's :)

Revision 1.126 / (download) - annotate - [select for diffs], Mon Aug 4 06:29:58 2008 UTC (15 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.125: +4 -5 lines
Diff to previous 1.125 (colored)

Free the socket only after disposing of the PCB.

Revision 1.122.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:24 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.122: +10 -15 lines
Diff to previous 1.122 (colored)

Sync with HEAD.

Revision 1.122.8.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:28 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.122: +10 -15 lines
Diff to previous 1.122 (colored) next main 1.123 (colored)

sync with head.

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:41 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.123: +8 -15 lines
Diff to previous 1.123 (colored)

sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Mon May 5 17:11:17 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Changes since 1.124: +8 -8 lines
Diff to previous 1.124 (colored)

- Convert hashinit() to use kmem_alloc(). The hash tables can be large
  and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:09 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.123: +2 -9 lines
Diff to previous 1.123 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.123 / (download) - annotate - [select for diffs], Thu Apr 24 11:38:37 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Changes since 1.122: +4 -2 lines
Diff to previous 1.122 (colored)

Merge the socket locking patch:

- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.

Revision 1.119.2.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:06 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.119.2.1: +23 -23 lines
Diff to previous 1.119.2.1 (colored) to branchpoint 1.119 (colored) next main 1.120 (colored)

sync with HEAD

Revision 1.119.8.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:08 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.119: +25 -23 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

Sync with HEAD.

Revision 1.100.2.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:14 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.4: +30 -26 lines
Diff to previous 1.100.2.4 (colored) to branchpoint 1.100 (colored) next main 1.101 (colored)

sync with head

Revision 1.119.14.2 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:31 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.119.14.1: +21 -21 lines
Diff to previous 1.119.14.1 (colored) to branchpoint 1.119 (colored) next main 1.120 (colored)

Sync with HEAD

Revision 1.122 / (download) - annotate - [select for diffs], Mon Jan 14 04:19:09 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: yamt-pf42, mjf-devfs2
Changes since 1.121: +23 -23 lines
Diff to previous 1.121 (colored)

Use rtcache_validate() instead of rtcache_getrt().  Shorten staircase
in in_losing().

Revision 1.119.2.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:25 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.119: +14 -10 lines
Diff to previous 1.119 (colored)

sync with HEAD

Revision 1.119.14.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:57:19 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.119: +14 -10 lines
Diff to previous 1.119 (colored)

Sync with HEAD

Revision 1.119.10.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:57:38 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.119: +14 -10 lines
Diff to previous 1.119 (colored) next main 1.120 (colored)

Sync with head.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Dec 20 19:53:32 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base
Changes since 1.120: +10 -7 lines
Diff to previous 1.120 (colored)

Poison struct route->ro_rt uses in the kernel by changing the name
to _ro_rt.  Use rtcache_getrt() to access a route cache's struct
rtentry *.

Introduce struct ifnet->if_dl that always points at the interface
identifier/link-layer address.  Make code that treated the first
ifaddr on struct ifnet->if_addrlist as the interface address use
if_dl, instead.

Remove stale debugging code from net/route.c.  Move the rtflush()
code into rtcache_clear() and delete rtflush().  Delete rtalloc(),
because nothing uses it any more.

Make ND6_HINT an inline, lowercase subroutine, nd6_hint.

I've done my best to convert IP Filter, the ISO stack, and the
AppleTalk stack to rtcache_getrt().  They compile, but I have not
tested them.  I have given the changes to PF, GRE, IPv4 and IPv6
stacks a lot of exercise.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Dec 16 14:12:34 2007 UTC (16 years, 2 months ago) by elad
Branch: MAIN
Changes since 1.119: +6 -5 lines
Diff to previous 1.119 (colored)

Really fix low port allocation, by always passing a valid lwp to
in_pcbbind().

Okay dyoung@.

Note that the network code is another candidate for major cleanup... also
note that this issue is likely to be present in netinet6 code, too.

Revision 1.115.2.4 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:48 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.115.2.3: +6 -14 lines
Diff to previous 1.115.2.3 (colored) next main 1.116 (colored)

Sync with head.

Revision 1.118.4.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:49:02 2007 UTC (16 years, 5 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.118: +6 -14 lines
Diff to previous 1.118 (colored) next main 1.119 (colored)

Sync with HEAD.

Revision 1.100.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:42:48 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.3: +28 -47 lines
Diff to previous 1.100.2.3 (colored) to branchpoint 1.100 (colored)

sync with head.

Revision 1.117.2.2 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:43 2007 UTC (16 years, 5 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.117.2.1: +6 -14 lines
Diff to previous 1.117.2.1 (colored) to branchpoint 1.117 (colored) next main 1.118 (colored)

Sync with HEAD.

Revision 1.119 / (download) - annotate - [select for diffs], Tue Aug 21 08:34:33 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-csl-alignment-base5, matt-armv6-prevmlocking, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-armv6, bouyer-xeni386
Changes since 1.118: +6 -14 lines
Diff to previous 1.118 (colored)

Use sockaddr_in_init().

Revision 1.115.2.3 / (download) - annotate - [select for diffs], Mon Aug 20 21:27:58 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.115.2.2: +3 -3 lines
Diff to previous 1.115.2.2 (colored)

Sync with HEAD.

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:49:44 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

Sync with HEAD.

Revision 1.118.6.2 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:55 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.118.6.1: +969 -0 lines
Diff to previous 1.118.6.1 (colored) to branchpoint 1.118 (colored) next main 1.119 (colored)

Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.118.6.1, Thu Jul 19 20:48:54 2007 UTC (16 years, 7 months ago) by dyoung
Branch: matt-mips64
Changes since 1.118: +0 -969 lines
FILE REMOVED

file in_pcb.c was added on branch matt-mips64 on 2007-07-19 20:48:55 +0000

Revision 1.118 / (download) - annotate - [select for diffs], Thu Jul 19 20:48:54 2007 UTC (16 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Changes since 1.117: +3 -3 lines
Diff to previous 1.117 (colored)

Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.116.2.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:11:20 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.116: +20 -32 lines
Diff to previous 1.116 (colored) next main 1.117 (colored)

Sync with head.

Revision 1.115.2.2 / (download) - annotate - [select for diffs], Fri Jun 8 14:17:44 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.115.2.1: +20 -32 lines
Diff to previous 1.115.2.1 (colored)

Sync with head.

Revision 1.113.2.4 / (download) - annotate - [select for diffs], Mon May 7 10:55:58 2007 UTC (16 years, 9 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.113.2.3: +20 -32 lines
Diff to previous 1.113.2.3 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored)

sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Wed May 2 20:40:24 2007 UTC (16 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.116: +20 -32 lines
Diff to previous 1.116 (colored)

Eliminate address family-specific route caches (struct route, struct
route_in6, struct route_iso), replacing all caches with a struct
route.

The principle benefit of this change is that all of the protocol
families can benefit from route cache-invalidation, which is
necessary for correct routing.  Route-cache invalidation fixes an
ancient PR, kern/3508, at long last; it fixes various other PRs,
also.

Discussions with and ideas from Joerg Sonnenberger influenced this
work tremendously.  Of course, all design oversights and bugs are
mine.

DETAILS

1 I added to each address family a pool of sockaddrs.  I have
  introduced routines for allocating, copying, and duplicating,
  and freeing sockaddrs:

        struct sockaddr *sockaddr_alloc(sa_family_t af, int flags);
        struct sockaddr *sockaddr_copy(struct sockaddr *dst,
                                       const struct sockaddr *src);
        struct sockaddr *sockaddr_dup(const struct sockaddr *src, int flags);
        void sockaddr_free(struct sockaddr *sa);

  sockaddr_alloc() returns either a sockaddr from the pool belonging
  to the specified family, or NULL if the pool is exhausted.  The
  returned sockaddr has the right size for that family; sa_family
  and sa_len fields are initialized to the family and sockaddr
  length---e.g., sa_family = AF_INET and sa_len = sizeof(struct
  sockaddr_in).  sockaddr_free() puts the given sockaddr back into
  its family's pool.

  sockaddr_dup() and sockaddr_copy() work analogously to strdup()
  and strcpy(), respectively.  sockaddr_copy() KASSERTs that the
  family of the destination and source sockaddrs are alike.

  The 'flags' argumet for sockaddr_alloc() and sockaddr_dup() is
  passed directly to pool_get(9).

2 I added routines for initializing sockaddrs in each address
  family, sockaddr_in_init(), sockaddr_in6_init(), sockaddr_iso_init(),
  etc.  They are fairly self-explanatory.

3 structs route_in6 and route_iso are no more.  All protocol families
  use struct route.  I have changed the route cache, 'struct route',
  so that it does not contain storage space for a sockaddr.  Instead,
  struct route points to a sockaddr coming from the pool the sockaddr
  belongs to.  I added a new method to struct route, rtcache_setdst(),
  for setting the cache destination:

        int rtcache_setdst(struct route *, const struct sockaddr *);

  rtcache_setdst() returns 0 on success, or ENOMEM if no memory is
  available to create the sockaddr storage.

  It is now possible for rtcache_getdst() to return NULL if, say,
  rtcache_setdst() failed.  I check the return value for NULL
  everywhere in the kernel.

4 Each routing domain (struct domain) has a list of live route
  caches, dom_rtcache.  rtflushall(sa_family_t af) looks up the
  domain indicated by 'af', walks the domain's list of route caches
  and invalidates each one.

Revision 1.113.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:10 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.113.2.2: +4 -3 lines
Diff to previous 1.113.2.2 (colored) to branchpoint 1.113 (colored)

sync with head.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:01 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.115: +4 -3 lines
Diff to previous 1.115 (colored)

Sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:35 2007 UTC (16 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.115: +4 -3 lines
Diff to previous 1.115 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.113.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:36 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.113.2.1: +5 -5 lines
Diff to previous 1.113.2.1 (colored) to branchpoint 1.113 (colored)

Sync with HEAD.

Revision 1.115 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:20 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.114: +5 -5 lines
Diff to previous 1.114 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:53 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.113: +7 -7 lines
Diff to previous 1.113 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.100.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:43 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.2: +10 -11 lines
Diff to previous 1.100.2.2 (colored) to branchpoint 1.100 (colored)

sync with head.

Revision 1.114 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:11 2007 UTC (17 years ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.113: +7 -7 lines
Diff to previous 1.113 (colored)

KNF: de-__P, bzero -> memset, bcmp -> memcmp.  Remove extraneous
   parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.

Revision 1.103.4.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:43 2007 UTC (17 years ago) by ad
Branch: newlock2
Changes since 1.103.4.2: +5 -6 lines
Diff to previous 1.103.4.2 (colored) to branchpoint 1.103 (colored) next main 1.104 (colored)

Sync with head.

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jan 26 19:15:26 2007 UTC (17 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.112: +5 -6 lines
Diff to previous 1.112 (colored)

KNF: bzero -> memset, change (struct in_ifaddr *)0 to NULL.

Revision 1.103.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:14 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.103.4.1: +25 -38 lines
Diff to previous 1.103.4.1 (colored) to branchpoint 1.103 (colored)

Sync with head.

Revision 1.100.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:33 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.1: +50 -46 lines
Diff to previous 1.100.2.1 (colored) to branchpoint 1.100 (colored)

sync with head.

Revision 1.104.2.3 / (download) - annotate - [select for diffs], Mon Dec 18 11:42:21 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.104.2.2: +18 -17 lines
Diff to previous 1.104.2.2 (colored) to branchpoint 1.104 (colored) next main 1.105 (colored)

sync with head.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Dec 15 21:18:53 2006 UTC (17 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4
Changes since 1.111: +18 -17 lines
Diff to previous 1.111 (colored)

Introduce new helper functions to abstract the route caching.
rtcache_init and rtcache_init_noclone lookup ro_dst and store
the result in ro_rt, taking care of the reference counting and
calling the domain specific route cache.
rtcache_free checks if a route was cashed and frees the reference.
rtcache_copy copies ro_dst of the given struct route, checking that
enough space is available and incrementing the reference count of the
cached rtentry if necessary.
rtcache_check validates that the cached route is still up. If it isn't,
it tries to look it up again. Afterwards ro_rt is either a valid again
or NULL.
rtcache_copy is used internally.

Adjust to callers of rtalloc/rtflush in the tree to check the sanity of
ro_dst first (if necessary). If it doesn't fit the expectations, free
the cache, otherwise check if the cached route is still valid. After
that combination, a single check for ro_rt == NULL is enough to decide
whether a new lookup needs to be done with a different ro_dst.
Make the route checking in gre stricter by repeating the loop check
after revalidation.
Remove some unused RADIX_MPATH code in in6_src.c. The logic is slightly
changed here to first validate the route and check RTF_GATEWAY
afterwards. This is sementically equivalent though.
etherip doesn't need sc_route_expire similiar to the gif changes from
dyoung@ earlier.

Based on the earlier patch from dyoung@, reviewed and discussed with
him.

Revision 1.104.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:10 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.104.2.1: +30 -36 lines
Diff to previous 1.104.2.1 (colored) to branchpoint 1.104 (colored)

sync with head.

Revision 1.111 / (download) - annotate - [select for diffs], Sat Dec 9 05:33:04 2006 UTC (17 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-splraiseipl-base3
Changes since 1.110: +21 -34 lines
Diff to previous 1.110 (colored)

Here are various changes designed to protect against bad IPv4
routing caused by stale route caches (struct route).  Route caches
are sprinkled throughout PCBs, the IP fast-forwarding table, and
IP tunnel interfaces (gre, gif, stf).

Stale IPv6 and ISO route caches will be treated by separate patches.

Thank you to Christoph Badura for suggesting the general approach
to invalidating route caches that I take here.

Here are the details:

Add hooks to struct domain for tracking and for invalidating each
domain's route caches: dom_rtcache, dom_rtflush, and dom_rtflushall.

Introduce helper subroutines, rtflush(ro) for invalidating a route
cache, rtflushall(family) for invalidating all route caches in a
routing domain, and rtcache(ro) for notifying the domain of a new
cached route.

Chain together all IPv4 route caches where ro_rt != NULL.  Provide
in_rtcache() for adding a route to the chain.  Provide in_rtflush()
and in_rtflushall() for invalidating IPv4 route caches.  In
in_rtflush(), set ro_rt to NULL, and remove the route from the
chain.  In in_rtflushall(), walk the chain and remove every route
cache.

In rtrequest1(), call rtflushall() to invalidate route caches when
a route is added.

In gif(4), discard the workaround for stale caches that involves
expiring them every so often.

Replace the pattern 'RTFREE(ro->ro_rt); ro->ro_rt = NULL;' with a
call to rtflush(ro).

Update ipflow_fastforward() and all other users of route caches so
that they expect a cached route, ro->ro_rt, to turn to NULL.

Take care when moving a 'struct route' to rtflush() the source and
to rtcache() the destination.

In domain initializers, use .dom_xxx tags.

KNF here and there.

Revision 1.110 / (download) - annotate - [select for diffs], Fri Dec 8 16:06:22 2006 UTC (17 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.109: +3 -4 lines
Diff to previous 1.109 (colored)

When a dynamic route is deleted in in_losing and in6_losing, rtrequest
is called, but the current reference via the PCB is not removed. This
is effectively a leaked reference. Call rtfree unconditional.

Revision 1.103.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:36 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.103: +24 -8 lines
Diff to previous 1.103 (colored)

Sync with head.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:45 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

__unused removal on arguments; approved by core.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Nov 13 05:13:41 2006 UTC (17 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.107: +10 -2 lines
Diff to previous 1.107 (colored)

Add a source-address selection policy mechanism to the kernel.

Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses.  Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

        1 Factor out some common code, producing rt_replace_ifa().

        2 Abbreviate a for-loop with TAILQ_FOREACH().

        3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
          IN_PRIVATE(), that are true for link-local unicast
          (169.254/16) and RFC1918 private addresses, respectively.
          Add the predicate IN_ANY_LOCAL() that is true for link-local
          unicast and multicast.

        4 Add IPv4-specific interface attach/detach routines,
          in_domifattach and in_domifdetach, which build #ifdef
          IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:28 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.104: +10 -6 lines
Diff to previous 1.104 (colored)

sync with head

Revision 1.107 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:37 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.106 / (download) - annotate - [select for diffs], Thu Oct 5 17:35:19 2006 UTC (17 years, 4 months ago) by tls
Branch: MAIN
Changes since 1.105: +7 -3 lines
Diff to previous 1.105 (colored)

Protect calls to pool_put/pool_get that may occur in interrupt context
with spl used to protect other allocations and frees, or datastructure
element insertion and removal, in adjacent code.

It is almost unquestionably the case that some of the spl()/splx() calls
added here are superfluous, but it really seems wrong to see:

	s=splfoo();
	/* frob data structure */
	splx(s);
	pool_put(x);

and if we think we need to protect the first operation, then it is hard
to see why we should not think we need to protect the next.  "Better
safe than sorry".

It is also almost unquestionably the case that I missed some pool
gets/puts from interrupt context with my strategy for finding these
calls; use of PR_NOWAIT is a strong hint that a pool may be used from
interrupt context but many callers in the kernel pass a "can wait/can't
wait" flag down such that my searches might not have found them.  One
notable area that needs to be looked at is pf.

See also:

http://mail-index.netbsd.org/tech-kern/2006/07/19/0003.html
http://mail-index.netbsd.org/tech-kern/2006/07/19/0009.html

Revision 1.105 / (download) - annotate - [select for diffs], Tue Sep 19 21:42:30 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)

Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.

Revision 1.101.8.3 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:55 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.101.8.2: +11 -7 lines
Diff to previous 1.101.8.2 (colored) to branchpoint 1.101 (colored) next main 1.102 (colored)

sync with head.

Revision 1.101.4.4 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:47 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.101.4.3: +10 -7 lines
Diff to previous 1.101.4.3 (colored) to branchpoint 1.101 (colored) next main 1.102 (colored)

sync with head

Revision 1.104 / (download) - annotate - [select for diffs], Fri Sep 8 20:58:58 2006 UTC (17 years, 5 months ago) by elad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9
Branch point for: yamt-splraiseipl
Changes since 1.103: +11 -7 lines
Diff to previous 1.103 (colored)

First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)

Revision 1.101.8.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:46:33 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.101.8.1: +9 -8 lines
Diff to previous 1.101.8.1 (colored) to branchpoint 1.101 (colored)

sync with head

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:13 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: newlock2
Changes since 1.102: +9 -8 lines
Diff to previous 1.102 (colored)

Use the LWP cached credentials where sane.

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:11:00 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100: +10 -9 lines
Diff to previous 1.100 (colored)

sync with head.

Revision 1.101.6.1 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:46 2006 UTC (17 years, 8 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.101: +6 -4 lines
Diff to previous 1.101 (colored) next main 1.102 (colored)

Sync with head.

Revision 1.101.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:44 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.101: +6 -4 lines
Diff to previous 1.101 (colored) next main 1.102 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.101.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:59:03 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.101: +6 -4 lines
Diff to previous 1.101 (colored)

sync with head.

Revision 1.102 / (download) - annotate - [select for diffs], Sun May 14 21:19:34 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.101: +6 -4 lines
Diff to previous 1.101 (colored)

integrate kauth.

Revision 1.101.10.3 / (download) - annotate - [select for diffs], Sat May 6 23:32:11 2006 UTC (17 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.101.10.2: +3 -2 lines
Diff to previous 1.101.10.2 (colored) to branchpoint 1.101 (colored) next main 1.102 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.101.4.3 / (download) - annotate - [select for diffs], Tue Mar 14 15:41:15 2006 UTC (17 years, 11 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.101.4.2: +4 -5 lines
Diff to previous 1.101.4.2 (colored) to branchpoint 1.101 (colored)

Remove last reference to in6pcb.

Revision 1.101.10.2 / (download) - annotate - [select for diffs], Fri Mar 10 15:20:54 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.101.10.1: +4 -4 lines
Diff to previous 1.101.10.1 (colored) to branchpoint 1.101 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.101.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 01:19:40 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.101: +5 -4 lines
Diff to previous 1.101 (colored)

Adapt to kernel authorization KPI.

Revision 1.101.4.2 / (download) - annotate - [select for diffs], Tue Feb 14 02:17:12 2006 UTC (18 years ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.101.4.1: +15 -12 lines
Diff to previous 1.101.4.1 (colored) to branchpoint 1.101 (colored)

Remove INPCBHASH_PORT, INPCBHASH_BIND, INPCBHASH_CONNECT (moved to
in_pcb.h).
If INET6, detect whether the pcb is v4 or v6 based on the socket
family (from FreeBSD).

Revision 1.101.4.1 / (download) - annotate - [select for diffs], Thu Feb 2 00:05:30 2006 UTC (18 years ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.101: +22 -38 lines
Diff to previous 1.101 (colored)

Remove #include netinet6/in6_pcb.h.

Revision 1.83.2.7 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:24 2005 UTC (18 years, 2 months ago) by christos
Branch: ktrace-lwp
Changes since 1.83.2.6: +6 -7 lines
Diff to previous 1.83.2.6 (colored) next main 1.84 (colored)

Sync with head.

Revision 1.100.8.1 / (download) - annotate - [select for diffs], Tue Nov 22 16:08:21 2005 UTC (18 years, 3 months ago) by yamt
Branch: yamt-readahead
Changes since 1.100: +6 -7 lines
Diff to previous 1.100 (colored) next main 1.101 (colored)

sync with head.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Nov 15 18:39:46 2005 UTC (18 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-readahead-base3, yamt-readahead-base2, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, ktrace-lwp-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.100: +6 -7 lines
Diff to previous 1.100 (colored)

Pass the current process structure to in_pcbconnect() so that it can
pass it to in_pcbbind() so that can allocate a low numbered port
if setsockopt() has been used to set IP_PORTRANGE to IP_PORTRANGE_LOW.
While there, fail in_pcbconnect() if the in_pcbbind() fails - rather
than sending the request out from a port of zero.
This has been largely broken since the socket option was added in 1998.

Revision 1.83.2.6 / (download) - annotate - [select for diffs], Thu Nov 10 14:11:07 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.5: +21 -21 lines
Diff to previous 1.83.2.5 (colored)

Sync with HEAD. Here we go again...

Revision 1.100 / (download) - annotate - [select for diffs], Sun May 29 21:41:23 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead, yamt-lazymbuf
Changes since 1.99: +19 -19 lines
Diff to previous 1.99 (colored)

- add const
- remove bogus casts
- avoid nested variables

Revision 1.99 / (download) - annotate - [select for diffs], Sat May 7 17:42:09 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored)

PR/30154: YAMAMOTO Takashi: tcp_close locking botch
chgsbsize() as mentioned in the PR can be called from an interrupt context
via tcp_close(). Avoid calling uid_find() in chgsbsize().
- Instead of storing so_uid in struct socketvar, store *so_uidinfo
- Add a simple lock to struct uidinfo.

Revision 1.96.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:33 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.96: +30 -71 lines
Diff to previous 1.96 (colored) next main 1.97 (colored)

sync with -current

Revision 1.96.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:54 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.96: +30 -71 lines
Diff to previous 1.96 (colored) next main 1.97 (colored)

sync with head.

Revision 1.83.2.5 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:47 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.4: +30 -71 lines
Diff to previous 1.83.2.4 (colored)

Sync with HEAD.

Revision 1.98 / (download) - annotate - [select for diffs], Thu Feb 3 03:49:01 2005 UTC (19 years ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Changes since 1.97: +30 -71 lines
Diff to previous 1.97 (colored)

ANSIfy function prototypes. (Still have about 3/5ths of the C files in
netinet to go...)

Revision 1.97 / (download) - annotate - [select for diffs], Wed Feb 2 21:41:55 2005 UTC (19 years ago) by perry
Branch: MAIN
Changes since 1.96: +4 -4 lines
Diff to previous 1.96 (colored)

de-__P -- will ANSIfy .c files later.

Revision 1.83.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:12 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.3: +2 -3 lines
Diff to previous 1.83.2.3 (colored)

Sync with HEAD

Revision 1.96 / (download) - annotate - [select for diffs], Wed Sep 29 21:30:00 2004 UTC (19 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.95: +2 -3 lines
Diff to previous 1.95 (colored)

PR/27082: Sean Boudreau: redundant assignment or NULL dereference in
in_pcbconnect()

Revision 1.83.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:37:11 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.2: +2 -2 lines
Diff to previous 1.83.2.2 (colored)

Fix the sync with head I botched.

Revision 1.83.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:54:53 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83.2.1: +0 -0 lines
Diff to previous 1.83.2.1 (colored)

Sync with HEAD.

Revision 1.83.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:36 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.83: +142 -82 lines
Diff to previous 1.83 (colored)

Sync with HEAD

Revision 1.95 / (download) - annotate - [select for diffs], Sun Apr 25 16:42:42 2004 UTC (19 years, 10 months ago) by simonb
Branch: MAIN
CVS Tags: BEFORE-IPF413
Changes since 1.94: +3 -10 lines
Diff to previous 1.94 (colored)

Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Mar 2 02:26:28 2004 UTC (19 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, BEFORE-IPF411
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored)

Call ipsec_pcbconn() and ipsec_pcbdisconn() for FAST_IPSEC, too.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Jan 13 06:17:14 2004 UTC (20 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored)

avoid deref-after-free.
http://sources.zabbadoz.net/freebsd/patchset/106-ipsec-pcb-discon.diff

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jan 2 15:51:45 2004 UTC (20 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored)

whitespace

Revision 1.91 / (download) - annotate - [select for diffs], Tue Nov 11 20:25:26 2003 UTC (20 years, 3 months ago) by jonathan
Branch: MAIN
Changes since 1.90: +7 -7 lines
Diff to previous 1.90 (colored)

Change global head-of-local-IP-address list from in_ifaddr to
in_ifaddrhead. Recent changes in struct names caused a namespace
collision in fast-ipsec, which are most cleanly fixed by using
"in_ifaddrhead" as the listhead name.

Revision 1.90 / (download) - annotate - [select for diffs], Tue Oct 28 17:18:37 2003 UTC (20 years, 4 months ago) by provos
Branch: MAIN
Changes since 1.89: +15 -3 lines
Diff to previous 1.89 (colored)

use a hash table to bind to local ports; suggested by markus friedl
approved: fvdl@

Revision 1.89 / (download) - annotate - [select for diffs], Thu Oct 23 20:55:08 2003 UTC (20 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.88: +3 -30 lines
Diff to previous 1.88 (colored)

Remove all the code to maintain ia_inpcbs.  This information was only used to
close sockets on address changes, which was deemed to be a bad idea and was
summarily removed, so there is no point in wasting effort on maintaining it
any more.

Revision 1.88 / (download) - annotate - [select for diffs], Thu Sep 4 09:16:57 2003 UTC (20 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.87: +109 -29 lines
Diff to previous 1.87 (colored)

revamp inpcb/in6pcb so that they are more aligned with each other.
in6pcb lookup now uses hash(9).

Revision 1.87 / (download) - annotate - [select for diffs], Fri Aug 15 03:42:01 2003 UTC (20 years, 6 months ago) by jonathan
Branch: MAIN
Changes since 1.86: +10 -7 lines
Diff to previous 1.86 (colored)

(fast-ipsec): Add hooks to pass IPv4 IPsec traffic into fast-ipsec, if
configured with ``options FAST_IPSEC''.  Kernels with KAME IPsec or
with no IPsec should work as before.

All calls to ip_output() now always pass an additional compulsory
argument: the inpcb associated with the packet being sent,
or 0 if no inpcb is available.

Fast-ipsec tested with ICMP or UDP over ESP. TCP doesn't work, yet.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Aug 7 16:33:10 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.85: +3 -7 lines
Diff to previous 1.85 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Jul 22 02:09:30 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.84: +5 -11 lines
Diff to previous 1.84 (colored)

avoid code dup when check broadcast addr in bind(2)

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jul 21 07:02:35 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.83: +11 -2 lines
Diff to previous 1.83 (colored)

permit bind(2) to broadcast address, as it was permitted before.
(for instance, "ntpd -b" was broken since revision 1.82)
found report on http://pc.2ch.net/unix

Revision 1.83 / (download) - annotate - [select for diffs], Thu Jun 26 00:19:13 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.82: +4 -2 lines
Diff to previous 1.82 (colored)

check if INADDR_TO_IA gets us valid in_ifaddr or not.  hopefully fix PR21964

Revision 1.82 / (download) - annotate - [select for diffs], Sun Jun 15 02:49:33 2003 UTC (20 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.81: +36 -5 lines
Diff to previous 1.81 (colored)

Change the way multicasts are kept.  They now use a hash table in the same
manner as the ifaddr hash table.  By doing this, the mkludge code can go
away.  At the same time, keep track of what pcbs are using what ifaddr and
when an address is deleted from an interface, notify/abort all sockets
that have that address as a source.  Switch IGMP and multicasts to use pools
for allocation.  Fix a number of potential problems in the igmp code where
allocation failures could cause a trap/panic.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Mar 16 03:33:28 2003 UTC (20 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.80: +2 -8 lines
Diff to previous 1.80 (colored)

Enable check in in_pcbbind() to enforce sin_family == AF_INET.
If there are any "old programs which incorrectly set this" left,
they will now fail with EAFNOSUPPORT.
This make in_pcbbind() consistent with in_pcbconnect() and the other
protocol families.

As per my PR [kern/4441], which has the comment:
	Steven's "TCP/IP Illustrated, Volume 2", page 730, notes that
	in_pcbbind() has the check which determines if sin_family == AF_INET
	commented out, but the same check in in_pcbconnect() is still active.

Revision 1.68.2.6 / (download) - annotate - [select for diffs], Mon Nov 11 22:15:16 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.68.2.5: +4 -7 lines
Diff to previous 1.68.2.5 (colored) to branchpoint 1.68 (colored) next main 1.69 (colored)

Catch up to -current

Revision 1.80 / (download) - annotate - [select for diffs], Tue Oct 22 02:31:16 2002 UTC (21 years, 4 months ago) by simonb
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.79: +4 -7 lines
Diff to previous 1.79 (colored)

"error" in in_pcbbind() was only ever set but not used, remove it.

Revision 1.69.2.6 / (download) - annotate - [select for diffs], Sun Jun 23 17:50:44 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.69.2.5: +23 -22 lines
Diff to previous 1.69.2.5 (colored) next main 1.70 (colored)

catch up with -current on kqueue branch

Revision 1.75.6.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:15 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.75.6.1: +11 -11 lines
Diff to previous 1.75.6.1 (colored) to branchpoint 1.75 (colored) next main 1.76 (colored)

catch up with -current.

Revision 1.68.2.5 / (download) - annotate - [select for diffs], Thu Jun 20 03:48:34 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.68.2.4: +23 -22 lines
Diff to previous 1.68.2.4 (colored) to branchpoint 1.68 (colored)

Catch up to -current.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Jun 11 19:39:59 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
CVS Tags: kqueue-base, gehenna-devsw-base
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

share policy-on-pcb for listening socket.  sync w/kame
todo: share even more, avoid frequent updates of spidx

Revision 1.78 / (download) - annotate - [select for diffs], Sun Jun 9 16:33:38 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.77: +10 -10 lines
Diff to previous 1.77 (colored)

whitespace

Revision 1.75.6.1 / (download) - annotate - [select for diffs], Thu May 30 13:52:26 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.75: +14 -13 lines
Diff to previous 1.75 (colored)

Catch up with -current.

Revision 1.77 / (download) - annotate - [select for diffs], Tue May 28 11:10:52 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.76: +14 -17 lines
Diff to previous 1.76 (colored)

correct in*_pcbrtentry.  check cached value correctly.

Revision 1.76 / (download) - annotate - [select for diffs], Tue May 28 10:07:51 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.75: +7 -3 lines
Diff to previous 1.75 (colored)

in in*_pcbrtentry(), check if route is still valid (RTF_UP),
and address family is still valid.

Revision 1.68.2.4 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:30 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.68.2.3: +3 -3 lines
Diff to previous 1.68.2.3 (colored) to branchpoint 1.68 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.69.2.5 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:11 2002 UTC (21 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.69.2.4: +3 -3 lines
Diff to previous 1.69.2.4 (colored)

Catch up with -current.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:43 2002 UTC (21 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.74: +3 -3 lines
Diff to previous 1.74 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.68.2.3 / (download) - annotate - [select for diffs], Thu Feb 28 04:15:05 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.68.2.2: +9 -77 lines
Diff to previous 1.68.2.2 (colored) to branchpoint 1.68 (colored)

Catch up to -current.

Revision 1.69.2.4 / (download) - annotate - [select for diffs], Mon Feb 11 20:10:33 2002 UTC (22 years ago) by jdolecek
Branch: kqueue
Changes since 1.69.2.3: +9 -77 lines
Diff to previous 1.69.2.3 (colored)

Sync w/ -current.

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jan 22 03:53:55 2002 UTC (22 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.73: +9 -77 lines
Diff to previous 1.73 (colored)

make sure to check address family on route cache.  with IPv4 mapped
address we can see both AF_INET/INET6.

Revision 1.69.2.3 / (download) - annotate - [select for diffs], Thu Jan 10 20:02:41 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.69.2.2: +36 -35 lines
Diff to previous 1.69.2.2 (colored)

Sync kqueue branch with -current.

Revision 1.68.2.2 / (download) - annotate - [select for diffs], Wed Nov 14 19:17:45 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.68.2.1: +36 -35 lines
Diff to previous 1.68.2.1 (colored) to branchpoint 1.68 (colored)

Catch up to -current.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Nov 13 00:32:36 2001 UTC (22 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.72: +4 -1 lines
Diff to previous 1.72 (colored)

add RCSIDs

Revision 1.71.4.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:19:23 2001 UTC (22 years, 3 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.71: +33 -35 lines
Diff to previous 1.71 (colored) next main 1.72 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.72 / (download) - annotate - [select for diffs], Sun Nov 4 20:55:26 2001 UTC (22 years, 3 months ago) by matt
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.71: +33 -35 lines
Diff to previous 1.71 (colored)

Convert netinet to not use the internal <sys/queue.h> field names
but instead the access macros.  Use the FOREACH macros where appropriate.

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Sat Aug 25 06:17:02 2001 UTC (22 years, 6 months ago) by thorpej
Branch: kqueue
Changes since 1.69.2.1: +8 -1 lines
Diff to previous 1.69.2.1 (colored)

Merge Aug 24 -current into the kqueue branch.

Revision 1.68.2.1 / (download) - annotate - [select for diffs], Fri Aug 24 00:12:24 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.68: +36 -5 lines
Diff to previous 1.68 (colored)

Catch up with -current.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Aug 6 10:25:00 2001 UTC (22 years, 6 months ago) by itojun
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.70: +8 -1 lines
Diff to previous 1.70 (colored)

cache IPsec policy on in6?pcb.  most of the lookup operations can be bypassed,
especially when it is a connected SOCK_STREAM in6?pcb.  sync with kame.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:54 2001 UTC (22 years, 6 months ago) by lukem
Branch: kqueue
Changes since 1.69: +11 -1 lines
Diff to previous 1.69 (colored)

update to -current

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jul 25 23:28:02 2001 UTC (22 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.69: +11 -1 lines
Diff to previous 1.69 (colored)

allocate ipsec policy buffer attached to pcb in in*_pcballoc, before
giving anyone accesses to pcb (do not reveal an inconsistent ones).
sync with kame

Revision 1.69 / (download) - annotate - [select for diffs], Mon Jul 2 15:25:34 2001 UTC (22 years, 7 months ago) by itojun
Branch: MAIN
Branch point for: kqueue
Changes since 1.68: +19 -5 lines
Diff to previous 1.68 (colored)

on interface removal, remove multicast groups joined from pcb, before
removing interface addresses.  without the change, we may deref
NULL pointer in in_pcbpurgeif().  from jinmei@kame, sync with kame

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:06:08 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.60.2.1: +5 -5 lines
Diff to previous 1.60.2.1 (colored) to branchpoint 1.60 (colored) next main 1.61 (colored)

Sync with HEAD.

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:10:22 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.60: +87 -44 lines
Diff to previous 1.60 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.68 / (download) - annotate - [select for diffs], Wed Nov 8 14:28:14 2000 UTC (23 years, 3 months ago) by ad
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.67: +5 -5 lines
Diff to previous 1.67 (colored)

Update for hashinit() change.

Revision 1.65.4.1 / (download) - annotate - [select for diffs], Sat Aug 26 16:38:32 2000 UTC (23 years, 6 months ago) by tron
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.65: +5 -3 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Pull up from current (approved by thorpej):

Add new sysctl variables "net.inet.ip.lowportmin" and
"net.inet.ip.lowportmax" which can be used to the set minimum
and maximum port number assigned to sockets using
IP_PORTRANGE_LOW.

syssrc/sys/netinet/in.h			1.49 -> 1.50
syssrc/sys/netinet/in_pcb.c		1.66 -> 1.67
syssrc/sys/netinet/ip_input.c		1.116 -> 1.117
syssrc/sys/netinet/ip_var.h		1.41 -> 1.42

Revision 1.67 / (download) - annotate - [select for diffs], Fri Aug 25 13:35:05 2000 UTC (23 years, 6 months ago) by tron
Branch: MAIN
Changes since 1.66: +5 -3 lines
Diff to previous 1.66 (colored)

Add new sysctl variables "net.inet.ip.lowportmin" and
"net.inet.ip.lowportmax" which can be used to the set minimum
and maximum port number assigned to sockets using
IP_PORTRANGE_LOW.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jul 6 12:51:39 2000 UTC (23 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.65: +1 -2 lines
Diff to previous 1.65 (colored)

remove unnecessary #include <netkey/key_debug.h>.  from kame.

Revision 1.65 / (download) - annotate - [select for diffs], Mon Apr 3 03:51:16 2000 UTC (23 years, 10 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.64: +27 -1 lines
Diff to previous 1.64 (colored)

- Unselect the multicast outgoing interface if it is being detached.
- Drop the multicast membership if we are joining through the interface
  being detached.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Mar 30 13:24:56 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.63: +21 -21 lines
Diff to previous 1.63 (colored)

Remove register declarations.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Feb 2 23:28:09 2000 UTC (24 years ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.62: +18 -1 lines
Diff to previous 1.62 (colored)

PRU_PURGEADDR -> PRU_PURGEIF, per a discussion w/ itojun.  In the IPv4
and IPv6 code, also use this to traverse PCB tables, looking for cached
routes referencing the dying ifnet, forcing them to be refreshed.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Feb 1 00:05:07 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.61: +21 -17 lines
Diff to previous 1.61 (colored)

Small amount of cosmetic cleanup.

Revision 1.60.8.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:36:14 1999 UTC (24 years, 2 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.60: +1 -6 lines
Diff to previous 1.60 (colored) next main 1.61 (colored)

Pull up to last week's -current.

Revision 1.61 / (download) - annotate - [select for diffs], Mon Dec 13 15:17:20 1999 UTC (24 years, 2 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.60: +1 -6 lines
Diff to previous 1.60 (colored)

sync IPv6 part with latest KAME tree.   IPsec part is left unmodified
due to massive changes in KAME side.
- IPv6 output goes through nd6_output
- faith can capture IPv4 packets as well - you can run IPv4-to-IPv6 translator
  using heavily modified DNS servers
- per-interface statistics (required for IPv6 MIB)
- interface autoconfig is revisited
- udp input handling has a big change for mapped address support.
- introduce in4_cksum() for non-overwriting checksumming
- introduce m_pulldown()
- neighbor discovery cleanups/improvements
- netinet/in.h strictly conforms to RFC2553 (no extra defs visible to userland)
- IFA_STATS is fixed a bit (not tested)
- and more more more.

TODO:
- cleanup os-independency #ifdef
- avoid rcvif dual use (for IPsec) to help ifdetach

(sorry for jumbo commit, I can't separate this any more...)

Revision 1.58.6.3 / (download) - annotate - [select for diffs], Tue Nov 30 13:35:25 1999 UTC (24 years, 3 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.58.6.2: +3 -6 lines
Diff to previous 1.58.6.2 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.58.4.2 / (download) - annotate - [select for diffs], Mon Aug 2 22:34:57 1999 UTC (24 years, 6 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.58.4.1: +3 -1 lines
Diff to previous 1.58.4.1 (colored) to branchpoint 1.58 (colored) next main 1.59 (colored)

Update from trunk.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jul 9 22:57:17 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: wrstuden-devbsize, thorpej_scsipi
Changes since 1.59: +3 -1 lines
Diff to previous 1.59 (colored)

defopt IPSEC and IPSEC_ESP (both into opt_ipsec.h).

Revision 1.58.6.2 / (download) - annotate - [select for diffs], Tue Jul 6 11:02:44 1999 UTC (24 years, 7 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990705
Changes since 1.58.6.1: +30 -1 lines
Diff to previous 1.58.6.1 (colored) to branchpoint 1.58 (colored)

KAME/NetBSD 1.4, SNAP kit 1999/07/05.
NOTE: this branch is just for reference purposes (i.e. for taking cvs diff).
do not touch anything on the branch.  actual work must be done on HEAD branch.

Revision 1.58.4.1 / (download) - annotate - [select for diffs], Thu Jul 1 23:47:00 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.58: +136 -1 lines
Diff to previous 1.58 (colored)

Sync w/ -current.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Jul 1 08:12:50 1999 UTC (24 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.58: +136 -1 lines
Diff to previous 1.58 (colored)

IPv6 kernel code, based on KAME/NetBSD 1.4, SNAP kit 19990628.
(Sorry for a big commit, I can't separate this into several pieces...)
Pls check sys/netinet6/TODO and sys/netinet6/IMPLEMENTATION for details.

- sys/kern: do not assume single mbuf, accept chained mbuf on passing
  data from userland to kernel (or other way round).
- "midway" ATM card: ATM PVC pseudo device support, like those done in ALTQ
  package (ftp://ftp.csl.sony.co.jp/pub/kjc/).
- sys/netinet/tcp*: IPv4/v6 dual stack tcp support.
- sys/netinet/{ip6,icmp6}.h, sys/net/pfkeyv2.h: IETF document assumes those
  file to be there so we patch it up.
- sys/netinet: IPsec additions are here and there.
- sys/netinet6/*: most of IPv6 code sits here.
- sys/netkey: IPsec key management code
- dev/pci/pcidevs: regen

In my understanding no code here is subject to export control so it
should be safe.

Revision 1.58.6.1 / (download) - annotate - [select for diffs], Mon Jun 28 06:36:59 1999 UTC (24 years, 8 months ago) by itojun
Branch: kame
CVS Tags: kame_14_19990628
Changes since 1.58: +107 -1 lines
Diff to previous 1.58 (colored)

KAME/NetBSD 1.4 SNAP kit, dated 19990628.

NOTE: this branch (kame) is used just for refernce.  this may not compile
due to multiple reasons.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Mar 23 10:45:37 1999 UTC (24 years, 11 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Branch point for: kame, chs-ubc2
Changes since 1.57: +16 -1 lines
Diff to previous 1.57 (colored)

Ensure that you can only bind a more specific address when it is done by the
same uid or by root.

This code is from FreeBSD. (Whilst it was originally obtained from OpenBSD,
FreeBSD fixed it to work with multicast. To quote the commit message:
    - Don't bother checking for conflicting sockets if we're binding to a
      multicast address.
    - Don't return an error if we're binding to INADDR_ANY, the conflicting
      socket is bound to INADDR_ANY, and the conflicting socket has
      SO_REUSEPORT set.
)

Revision 1.39.2.4 / (download) - annotate - [select for diffs], Mon Jan 18 03:22:58 1999 UTC (25 years, 1 month ago) by cgd
Branch: netbsd-1-3
Changes since 1.39.2.3: +2 -2 lines
Diff to previous 1.39.2.3 (colored) to branchpoint 1.39 (colored) next main 1.40 (colored)

pull up rev 1.56 from trunk (PR#5645 and PR#6425).  (lukem)

Revision 1.57 / (download) - annotate - [select for diffs], Sat Dec 19 02:46:12 1998 UTC (25 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +38 -38 lines
Diff to previous 1.56 (colored)

Reverse the copyright-notice-swap.  It went against existing practice.

Revision 1.56.2.1 / (download) - annotate - [select for diffs], Fri Dec 11 04:53:08 1998 UTC (25 years, 2 months ago) by kenh
Branch: kenh-if-detach
Changes since 1.56: +37 -11 lines
Diff to previous 1.56 (colored) next main 1.57 (colored)

The beginnings of interface detach support.  Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Nov 16 05:47:19 1998 UTC (25 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: kenh-if-detach-base
Branch point for: kenh-if-detach
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

if INADDR_ANY is given in in_pcbconnect(), choose the ia_addr of the first
interface, not the ia_broadaddr.  should fix [standards/5645] and [kern/6425]

Revision 1.55 / (download) - annotate - [select for diffs], Fri Nov 13 10:50:10 1998 UTC (25 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.54: +2 -4 lines
Diff to previous 1.54 (colored)

simplify test in in_pcbbind() for setting wild=1; no need to check if
	((so->so_proto->pr_flags & PR_CONNREQUIRED) == 0 ||
	(so->so_options & SO_ACCEPTCONN) == 0)
since the latter is always true, so the former test in unnecessary.
from `TCP/IP Illustrated, Volume 2', W. Richard Stevens, p 730.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Oct 5 14:33:14 1998 UTC (25 years, 4 months ago) by lukem
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.53: +6 -6 lines
Diff to previous 1.53 (colored)

* in_pcblookup_port(): deprecate INPLOOKUP_WILDCARD and flags in favour
  of a lookup_wildcard arg; simplifies the logic a bit.
* when assigning ephemeral ports in in_pcbbind(), always call
  in_pcblookup_port() with lookup_wildcard=1, so that ephemeral port
  allocation on sockets with SO_REUSEADDR set won't potentially bind to a
  port in use by something else (principle of least surprise).

Revision 1.39.2.3 / (download) - annotate - [select for diffs], Thu Oct 1 17:56:58 1998 UTC (25 years, 5 months ago) by cgd
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003
Changes since 1.39.2.2: +66 -21 lines
Diff to previous 1.39.2.2 (colored) to branchpoint 1.39 (colored)

pull up revisions 1.49-1.50, 1.53 (via patch) from trunk. (tls)

Revision 1.53 / (download) - annotate - [select for diffs], Wed Sep 30 21:52:24 1998 UTC (25 years, 5 months ago) by tls
Branch: MAIN
Changes since 1.52: +38 -38 lines
Diff to previous 1.52 (colored)

Switch order of TNF and UCB copyrights so UCB copyright is first; this seems more appropriate since UCB wrote the original code, after all.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Aug 2 00:35:31 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.51: +13 -3 lines
Diff to previous 1.51 (colored)

Use the pool allocator for inpcbs.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jul 23 08:24:33 1998 UTC (25 years, 7 months ago) by pk
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

in_pcballoc(): we can't afford to wait for memory.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Feb 15 18:24:25 1998 UTC (26 years ago) by tls
Branch: MAIN
Changes since 1.49: +38 -1 lines
Diff to previous 1.49 (colored)

Add correct copyright notice for IP address hash change.  This code is donated to TNF by the original copyright holder, Panix.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Feb 13 18:21:41 1998 UTC (26 years ago) by tls
Branch: MAIN
Changes since 1.48: +29 -21 lines
Diff to previous 1.48 (colored)

Change list of interface IP addresses to a hash.  Improves performance on hosts with a large number of IP addresses significantly.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Feb 7 02:44:55 1998 UTC (26 years ago) by chs
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

add flags arg to hashinit(), to pass to malloc().

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jan 8 11:56:50 1998 UTC (26 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.46: +6 -5 lines
Diff to previous 1.46 (colored)

* start from the top of the given ephemeral range and work down;
  results in reserved ephemeral ports starting at the top (as per
  current practice), and shouldn't have a negative effect on normal
  ephemeral ports...
* initialise inpt_lastlow in in_pcbinit

Revision 1.46 / (download) - annotate - [select for diffs], Thu Jan 8 00:32:39 1998 UTC (26 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

add missing ; ...

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jan 7 22:51:23 1998 UTC (26 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.44: +32 -8 lines
Diff to previous 1.44 (colored)

add the following, derived from FreeBSD:
* IP_PORTRANGE socket option, which controls how the ephemeral ports
  are allocated. it takes the following settings:
	IP_PORTRANGE_DEFAULT	use anonportmin (49152) -> anonportmax (65535)
	IP_PORTRANGE_HIGH	as IP_PORTRANGE_DEFAULT (retained for FreeBSD
				compat reasons, where these are separate)
	IP_PORTRANGE_LOW	use 600 -> 1023. only works if uid==0.
* in_pcb flag INP_ANONPORT. set if port was allocated ephmerally

Revision 1.44 / (download) - annotate - [select for diffs], Mon Jan 5 10:31:53 1998 UTC (26 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

Finishing merging 4.4BSD-Lite2 netinet.  At this point, the only changes
left were SCCS IDs and Copyright dates.

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Mon Jan 5 09:55:56 1998 UTC (26 years, 1 month ago) by thorpej
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +4 -4 lines
Diff to previous 1.1.1.2 (colored)

Import sys/netinet from 4.4BSD-Lite2 for reference purposes.

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Mon Jan 5 09:54:04 1998 UTC (26 years, 1 month ago) by thorpej
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +137 -81 lines
Diff to previous 1.1.1.1 (colored)

Import sys/netinet from 4.4BSD-Lite for reference purposes.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jan 5 09:52:03 1998 UTC (26 years, 1 month ago) by lukem
Branch: MAIN
Changes since 1.42: +12 -6 lines
Diff to previous 1.42 (colored)

enhance ephemeral port allocation code:
* support sysctl net.inet.ip.anonportmin (lowest ephemeral port)
  and net.inet.ip.anonportmax (highest ephemeral port).
  these can't be set to >65535, < IPPORT_RESERVED (unless IPNOPRIVPORTS
  is defined), and anonportmin has to be < anonportmax.
* use a cleaner way of only cycling through the available set once;
  this will be useful for when a random allocation scheme is used
* define IPPORT_ANON{MIN,MAX} instead of IPPORT_USER{LOW,HIGH}

Revision 1.42 / (download) - annotate - [select for diffs], Tue Dec 30 02:54:11 1997 UTC (26 years, 2 months ago) by lukem
Branch: MAIN
Changes since 1.41: +6 -8 lines
Diff to previous 1.41 (colored)

as per the IANA assigned ports numbers document, use ports
49152..65535 for ephemeral ports (instead of 1024..5000).
closes my [kern/4440], but with correct code :)

Revision 1.39.2.2 / (download) - annotate - [select for diffs], Fri Nov 28 08:55:41 1997 UTC (26 years, 3 months ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Changes since 1.39.2.1: +3 -1 lines
Diff to previous 1.39.2.1 (colored) to branchpoint 1.39 (colored)

Pull rev 1.41 up from trunk (mrg)

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 27 14:03:32 1997 UTC (26 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.40: +3 -1 lines
Diff to previous 1.40 (colored)

fix compile error when "options IPNOPROVPORTS"

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Thu Nov 20 04:54:42 1997 UTC (26 years, 3 months ago) by thorpej
Branch: netbsd-1-3
Changes since 1.39: +15 -3 lines
Diff to previous 1.39 (colored)

Fix PCB binding problem caused by ephemeral port shortage.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Nov 20 04:53:37 1997 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.39: +15 -3 lines
Diff to previous 1.39 (colored)

Deal with a problem where ephemeral port shortage would case a PCB's
local address to be set, causing all further attemps to bind that PCB
to fail.  From Koji Imada, PR #3857.

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Tue Oct 14 10:29:27 1997 UTC (26 years, 4 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.37.2.1: +2 -1 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Oct 14 00:52:49 1997 UTC (26 years, 4 months ago) by matt
Branch: MAIN
CVS Tags: netbsd-1-3-base, marc-pcmcia-base
Branch point for: netbsd-1-3
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

Add support for returning maximum supported MTU when ip_output fails with
EMSGSIZE.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Mon Sep 29 07:21:17 1997 UTC (26 years, 5 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.37: +23 -1 lines
Diff to previous 1.37 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Sep 22 21:39:40 1997 UTC (26 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.37: +23 -1 lines
Diff to previous 1.37 (colored)

Implement in_pcbrtentry() - return the route associated with a PCB.  If
one does not exist, attempt to allocate one.  This is mostly pulled from
tcp_input.c.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jul 23 21:26:42 1997 UTC (26 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp
Branch point for: marc-pcmcia
Changes since 1.36: +9 -4 lines
Diff to previous 1.36 (colored)

Pull SYN_cache_branch down into the main line.

Revision 1.36.8.1 / (download) - annotate - [select for diffs], Wed May 14 17:00:16 1997 UTC (26 years, 9 months ago) by mellon
Branch: SYN_cache_branch
Changes since 1.36: +9 -4 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

in_pcbnotify() returns a result indicating whether or not it actually matched a pcb.

Revision 1.27.4.2 / (download) - annotate - [select for diffs], Wed Dec 11 04:01:01 1996 UTC (27 years, 2 months ago) by mycroft
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-PATCH001
Changes since 1.27.4.1: +44 -42 lines
Diff to previous 1.27.4.1 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored)

From trunk:
Eliminate SS_PRIV; instead, pass down a proc pointer to the usrreq methods
that need it.
Fix numerous memory leaks and bogus return values.

Revision 1.27.4.1 / (download) - annotate - [select for diffs], Tue Dec 10 11:39:02 1996 UTC (27 years, 2 months ago) by mycroft
Branch: netbsd-1-2
Changes since 1.27: +18 -10 lines
Diff to previous 1.27 (colored)

From trunk:
Return EAGAIN if binding with no specified port and the pool is empty.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Dec 10 11:38:42 1996 UTC (27 years, 2 months ago) by mycroft
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp, bouyer-scsipi, SYN_cache_cur_base
Branch point for: SYN_cache_branch
Changes since 1.35: +18 -9 lines
Diff to previous 1.35 (colored)

Return EAGAIN if binding with no specified port and the pool is empty.

Revision 1.35 / (download) - annotate - [select for diffs], Sun Oct 13 02:03:04 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored)

backout previous kprintf changes

Revision 1.34 / (download) - annotate - [select for diffs], Thu Oct 10 23:12:47 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.33 / (download) - annotate - [select for diffs], Sun Sep 15 18:11:06 1996 UTC (27 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.32: +131 -95 lines
Diff to previous 1.32 (colored)

Hash unconnected PCBs.

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 9 14:51:12 1996 UTC (27 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +70 -61 lines
Diff to previous 1.31 (colored)

Add in_nullhost() and in_hosteq() macros, to hide some protocol
details.  Also, fix a bug in TCP wrt SYN+URG packets.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Sep 5 18:10:03 1996 UTC (27 years, 5 months ago) by perry
Branch: MAIN
Changes since 1.30: +3 -2 lines
Diff to previous 1.30 (colored)

Commit PR 2671, which adds an "IPNOPRIVPORTS" config option that turns
off the code that normally only allows root to bind low TCP
ports. Useful on firewalls and such.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Aug 14 03:46:48 1996 UTC (27 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Fix some DIAGNOSTIC printf() formats; ntohl() provides a 32-bit quantity,
and should be printed with %x, not %lx.

Revision 1.29 / (download) - annotate - [select for diffs], Wed Jul 10 18:13:35 1996 UTC (27 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

print result of ntohl/htonl as a long.  (makes -Wformat work on the
Alpha.)

Revision 1.28 / (download) - annotate - [select for diffs], Wed May 22 13:55:25 1996 UTC (27 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.27: +44 -42 lines
Diff to previous 1.27 (colored)

Pass a proc pointer down to the usrreq and pcbbind functions for PRU_ATTACH, PRU_BIND and
PRU_CONTROL.  The usrreq interface really needs to be split up, but this will have to wait.
Remove SS_PRIV completely.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Feb 26 23:16:59 1996 UTC (28 years ago) by mrg
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.26: +2 -6 lines
Diff to previous 1.26 (colored)

two more local addr changes, all done differently now (idea from charles)

Revision 1.26 / (download) - annotate - [select for diffs], Mon Feb 26 08:25:47 1996 UTC (28 years ago) by mrg
Branch: MAIN
Changes since 1.25: +4 -2 lines
Diff to previous 1.25 (colored)

if we are connecting *to* an address of any local interface, default the
local address of the socket to the same address.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Feb 13 23:41:53 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.24: +22 -17 lines
Diff to previous 1.24 (colored)

netinet prototypes

Revision 1.23.2.1 / (download) - annotate - [select for diffs], Fri Feb 2 06:12:46 1996 UTC (28 years, 1 month ago) by mycroft
Branch: netbsd-1-1
Changes since 1.23: +86 -16 lines
Diff to previous 1.23 (colored) next main 1.24 (colored)

Bring in changes for mondo patch 2.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 31 03:49:23 1996 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.23: +86 -16 lines
Diff to previous 1.23 (colored)

Build a hash table of PCBs.  Hash function needs tweaking.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Aug 17 02:57:27 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001
Branch point for: netbsd-1-1
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

so_pcb should be a void *.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Aug 12 23:59:34 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

splnet --> splsoftnet

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jun 18 20:01:08 1995 UTC (28 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.20: +15 -12 lines
Diff to previous 1.20 (colored)

convert pcb lists to CIRCLEQs, so that the end can be looked at more
easily, and so that the original (insque/remque) logic can be effectively
mimiced.  (This fixes a bug in the previous set of list changes.)
also (since terminator is no longer null) reinstate uninitted list checks,
but mark them XXX.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 12 06:49:55 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

in_pcbnotify*() don't return anything.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 12 06:46:34 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +5 -11 lines
Diff to previous 1.18 (colored)

Change in_pcbnotify*() to take an errno value.  Make inetctlerrmap[] an
array on ints, not u_chars.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jun 12 00:47:33 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +76 -47 lines
Diff to previous 1.17 (colored)

Various cleanup, including:
* Convert several data structures to use queue.h.
* Split in_pcbnotify() into two parts; one for notifying a specific PCB, and
one for notifying all PCBs for a particular foreign address.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Jun 4 06:03:53 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Remove one more bogus cast.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jun 4 05:58:22 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Don't cast things unnecessarily.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jun 4 05:06:58 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +6 -11 lines
Diff to previous 1.14 (colored)

Clean up many more casts.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jun 1 21:36:11 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Avoid byte-swapping IP addresses at run time.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Apr 13 06:28:21 1995 UTC (28 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.12: +6 -6 lines
Diff to previous 1.12 (colored)

be a bit more careful and explicit with types.  (basically a large no-op.)

Revision 1.12 / (download) - annotate - [select for diffs], Thu Sep 29 02:31:35 1994 UTC (29 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

failure to bind to a reserved port should return EACCES not EPERM.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 29 06:38:06 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 13 06:06:07 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.9: +99 -66 lines
Diff to previous 1.9 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Feb 2 05:58:59 1994 UTC (30 years, 1 month ago) by hpeyerl
Branch: MAIN
Changes since 1.8: +1 -7 lines
Diff to previous 1.8 (colored)

Multicast is no longer optional.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 8 21:21:40 1994 UTC (30 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.7: +9 -9 lines
Diff to previous 1.7 (colored)

Fix some inconsistent spacing; spaces at the end of lines, etc.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Dec 18 00:41:53 1993 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +17 -17 lines
Diff to previous 1.6 (colored)

Canonicalize all #includes.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 6 04:59:29 1993 UTC (30 years, 2 months ago) by hpeyerl
Branch: MAIN
Changes since 1.5: +29 -1 lines
Diff to previous 1.5 (colored)

multicast support.
>From Chris Maeda, cmaeda@cs.washington.edu
These patches are derived from the IP Multicast patches for BSDI.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jun 11 09:12:21 1993 UTC (30 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base, magnum
Changes since 1.4: +1 -7 lines
Diff to previous 1.4 (colored)

The latest patch was hosed. There is some program that I used which
left extra crud at the end of the file. I blame ftpd for not doing an
ftruncate().

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jun 10 05:17:53 1993 UTC (30 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +15 -8 lines
Diff to previous 1.3 (colored)

patch from Yuval Yarom, sent to me by <andrew@werple.apana.org.au>
they say: When doing an implicit bind in_pcbbind will assign used ports
if the port is bound on specific interface, and not on INADDR_ANY.
Effects of the bug range from connection drops to machine hangs.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 22 11:42:32 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -2 lines
Diff to previous 1.2 (colored)

add include of select.h if necessary for protos, or delete if extraneous

Revision 1.2 / (download) - annotate - [select for diffs], Tue May 18 18:20:09 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>