Make divert(4) socket dispatch mbuf to correct the lwkt port for further
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 19 Dec 2007 11:00:23 +0000 (11:00 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 19 Dec 2007 11:00:23 +0000 (11:00 +0000)
commit934c684905fa6cde264e4cc2edb8c2c83fabb73f
treef6596cc3921084766158385506d18f9695a14074
parent39f92d5db5e5ac1d82fb51f05e81d220a1b93f14
Make divert(4) socket dispatch mbuf to correct the lwkt port for further
processing (ip_{input,output}):
- Add mbuf** function parameter to protosw.pr_mport()
- Pass 'addr' to pr_mport() in so_pru_send(); udp_soport() is adjusted
  accordingly
- Add additional parameter to ip_mport(), so it could be called with both
  incoming and outgoing packets.  And the processing for outgoing UDP packets
  matches udp_soport()
- Add div_soport() as IPPROTO_DIVERT's pr_mport()
  o  Delegate non-PRU_SEND operation to cpu0_soport()
  o  Move receiving interface setting up code from div_output() into this
     function, so ip_mport() could be called
  o  Use ip_mport() to find the target lwkt port
13 files changed:
sys/kern/uipc_msg.c
sys/kern/uipc_syscalls.c
sys/net/netisr.c
sys/net/rtsock.c
sys/netinet/in_proto.c
sys/netinet/ip_demux.c
sys/netinet/ip_divert.c
sys/netinet/ip_input.c
sys/netinet/ip_var.h
sys/netinet/tcp_var.h
sys/netinet/udp_var.h
sys/netinet6/ip6protosw.h
sys/sys/protosw.h