struct ct_sync_state {
struct cache *internal; /* internal events cache (netlink) */
struct cache *external; /* external events cache (mcast) */
internal の netlink って kernel conntrack table と同義?
struct ct_sync_state {
struct cache *internal; /* internal events cache (netlink) */
struct cache *external; /* external events cache (mcast) */
net/netfilter/nf_conntrack_proto_tcp.c::tcp_packet()にて
struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 =
{
....
.packet = tcp_packet,
struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 =
{
....
.packet = tcp_packet,
include/linux/wireless.h で定義されてるswitch (mode) {
case IW_MODE_AUTO:
case IW_MODE_ADHOC:
case IW_MODE_INFRA:
mac->netdev->type = ARPHRD_ETHER;
break;
case IW_MODE_MONITOR:
mac->netdev->type = ARPHRD_IEEE80211_RADIOTAP;
break;
default:
dev_dbg_f(zd_mac_dev(mac), "wrong mode %u\n", mode);
return -EINVAL;
}
は EINVAL 扱い。というわけで他力本願としては zd_mac.c をパッチの都度眺めるということで。#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
ip link set gre1 up multicast on mtu 1388# あ、木曜日定例の洗濯機のピーピー音が...
$ORIGIN 16.172.in-addr.arpa.
$GENERATE 1-254 $.1 CNAME $.1.foo
$GENERATE 1-254 $.2 CNAME $.2.foo
...
$GENERATE 1-254 $129 $.129.bar
$GENERATE 1-254 $130 $.130.bar
更に同じディレクトリに linux というバイナリがある前提の起動用
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/uml_switch
NAME=uml_switch
DESC="User-mode networking switch"
PIDFILE_0=/var/run/uml-utilities/$NAME.0.pid
PIDFILE_1=/var/run/uml-utilities/$NAME.1.pid
PIDFILE_2=/var/run/uml-utilities/$NAME.2.pid
test -x $DAEMON || exit 0
set -e
UML_SWITCH_USER="uml-net"
UML_SWITCH_CTL_0="/var/run/uml-utilities/switch.0"
UML_SWITCH_CTL_1="/var/run/uml-utilities/switch.1"
UML_SWITCH_CTL_2="/var/run/uml-utilities/switch.2"
OPTIONS_0="-tap tap0 -hub -unix $UML_SWITCH_CTL_0"
OPTIONS_1="-hub -unix $UML_SWITCH_CTL_1"
OPTIONS_2="-hub -unix $UML_SWITCH_CTL_2"
case "$1" in
start)
echo -n "Starting $DESC: "
if [ "x$UML_SWITCH_START" = "xfalse" ] ; then
echo " Disabled."
exit 0
else
echo -n " $NAME"
fi
for i in 0 1 2; do
eval start-stop-daemon --start --quiet --pidfile \$PIDFILE_${i} \
--make-pidfile --background --chuid \$UML_SWITCH_USER \
--exec $DAEMON -- \$OPTIONS_${i}
WAIT=5
while ! eval test -e \$UML_SWITCH_CTL_${i}; do
sleep 1
WAIT=$(($WAIT - 1))
if [ $WAIT -le 0 ]; then
eval echo "\$DAEMON never created control socket \$UML_SWITCH_CTL_${i}" >&2
exit 1
fi
done
eval chmod 777 \$UML_SWITCH_CTL_${i}
done
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
for i in 0 1 2; do
eval start-stop-daemon --stop --quiet --pidfile \$PIDFILE_${i} \
--oknodo --exec \$DAEMON
eval rm -f \$PIDFILE_${i} \$UML_SWITCH_CTL_${i}
done
echo "."
done
echo "."
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
いや、こんなこと や dhcp の冗長とかやってみたくて...
if [ -z $1 ]; then
echo "what number?" 1>&2
exit
fi
nohup ./linux \
ubda=rootfs_$1 \
ubdb=swap_$1 \
mem=64m \
eth0=daemon,26:4b:fb:b7:fb:0${1},,/var/run/uml-utilities/switch.0 \
eth1=daemon,26:4b:fb:b7:fb:1${1},,/var/run/uml-utilities/switch.1 \
eth2=daemon,26:4b:fb:b7:fb:2${1},,/var/run/uml-utilities/switch.2 \
con0=null > uml_${1}.log 2>&1 &