summaryrefslogtreecommitdiff
path: root/regress/sys/net/pf_divert/args-udp-packet-out.pl
blob: 375b03ac8e46b1da68e5e0b1ca0c616de0208126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# test divert-packet output rule with udp
# create a divert-packet out rule on the remote machine
# client sends a UDP packet from the remote machine
# packet process reflects the UDP packet on divert socket on the remote machine
# server receives the UDP packet at the local machine

use strict;
use warnings;

our %args = (
    protocol => "udp",
    client => {
	func => \&write_datagram,
	noin => 1,
    },
    packet => {
	func => \&read_write_packet,
	in => "Client",
    },
    server => {
	func => \&read_datagram,
	in => "Packet",
	noout => 1,
    },
    divert => "packet-out",
);