1068b97e5Sbluhm# test divert-packet input rule with udp
2*edbc9d7fSbluhm# create a divert-packet in rule on the remote machine
3*edbc9d7fSbluhm# client sends a UDP packet from the local machine
4*edbc9d7fSbluhm# packet process reflects the UDP packet on divert socket on the remote machine
5*edbc9d7fSbluhm# server receives the UDP packet at the remote machine
6068b97e5Sbluhm
7068b97e5Sbluhmuse strict;
8068b97e5Sbluhmuse warnings;
9068b97e5Sbluhm
10068b97e5Sbluhmour %args = (
11068b97e5Sbluhm    protocol => "udp",
12068b97e5Sbluhm    client => {
13068b97e5Sbluhm	func => \&write_datagram,
14068b97e5Sbluhm	noin => 1,
15068b97e5Sbluhm    },
16068b97e5Sbluhm    packet => {
17068b97e5Sbluhm	func => \&read_write_packet,
18068b97e5Sbluhm	in => "Client",
19068b97e5Sbluhm    },
20068b97e5Sbluhm    server => {
21068b97e5Sbluhm	func => \&read_datagram,
22068b97e5Sbluhm	in => "Packet",
23068b97e5Sbluhm	noout => 1,
24068b97e5Sbluhm    },
25068b97e5Sbluhm    divert => "packet-in",
26068b97e5Sbluhm);
27