1# The client writes long messages to UDP socket.
2# The syslogd writes it into a file and through a pipe.
3# The syslogd passes it via TLS to the loghost.
4# The server receives the message on its TLS socket.
5# Find the message in client, file, pipe, syslogd, server log.
6# Check that lines in server have 8192 bytes message length.
7
8use strict;
9use warnings;
10use Socket;
11
12our %args = (
13    client => {
14	connect => { domain => AF_UNSPEC, addr => "localhost", port => 514 },
15	func => sub {
16	    my $self = shift;
17	    write_lengths($self, 8190..8193,9000);
18	    write_log($self);
19	},
20    },
21    syslogd => {
22	loghost => '@tls://localhost:$connectport',
23	options => ["-u"],
24	loggrep => {
25	    get_charlog() => 5,
26	},
27    },
28    server => {
29	listen => { domain => AF_UNSPEC, proto => "tls", addr => "localhost" },
30	# >>> 8213 <13>Jan 31 00:10:11 0123456789ABC...567\n
31	loggrep => {
32	    get_charlog() => 5,
33	    qr/^>>> 8211 .{19} .{8190}$/ => 1,
34	    qr/^>>> 8212 .{19} .{8191}$/ => 1,
35	    qr/^>>> 8213 .{19} .{8192}$/ => 3,
36	},
37    },
38);
39
401;
41