0s autopkgtest [23:08:54]: starting date and time: 2024-03-26 23:08:54+0000 0s autopkgtest [23:08:54]: git checkout: 4a1cd702 l/adt_testbed: don't blame the testbed for unsolvable build deps 0s autopkgtest [23:08:54]: host juju-7f2275-prod-proposed-migration-environment-3; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.dond8o3b/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed --apt-upgrade gopacket --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=libpcap/1.10.4-4.1ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-3@bos02-s390x-11.secgroup --name adt-noble-s390x-gopacket-20240326-230854-juju-7f2275-prod-proposed-migration-environment-3-20aa2fa9-2728-4c8c-b4ed-7002629ec429 --image adt/ubuntu-noble-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-3 --net-id=net_prod-proposed-migration -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 116s autopkgtest [23:10:50]: testbed dpkg architecture: s390x 117s autopkgtest [23:10:51]: testbed apt version: 2.7.12 117s autopkgtest [23:10:51]: @@@@@@@@@@@@@@@@@@@@ test bed setup 118s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 118s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [8504 B] 118s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [3985 kB] 119s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [55.4 kB] 119s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [497 kB] 119s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main s390x Packages [694 kB] 119s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main s390x c-n-f Metadata [3032 B] 119s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted s390x Packages [1372 B] 119s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted s390x c-n-f Metadata [116 B] 119s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x Packages [4152 kB] 120s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x c-n-f Metadata [7292 B] 120s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse s390x Packages [48.3 kB] 120s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse s390x c-n-f Metadata [116 B] 123s Fetched 9569 kB in 4s (2594 kB/s) 123s Reading package lists... 125s Reading package lists... 126s Building dependency tree... 126s Reading state information... 126s Calculating upgrade... 126s The following packages will be upgraded: 126s psmisc 127s 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 127s Need to get 178 kB of archives. 127s After this operation, 28.7 kB disk space will be freed. 127s Get:1 http://ftpmaster.internal/ubuntu noble/main s390x psmisc s390x 23.7-1 [178 kB] 127s Fetched 178 kB in 0s (401 kB/s) 128s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52170 files and directories currently installed.) 128s Preparing to unpack .../psmisc_23.7-1_s390x.deb ... 128s Unpacking psmisc (23.7-1) over (23.6-2) ... 128s Setting up psmisc (23.7-1) ... 128s Processing triggers for man-db (2.12.0-3) ... 129s Reading package lists... 129s Building dependency tree... 129s Reading state information... 129s 0 upgraded, 0 newly installed, 0 to remove and 244 not upgraded. 130s Hit:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease 130s Hit:2 http://ftpmaster.internal/ubuntu noble InRelease 130s Hit:3 http://ftpmaster.internal/ubuntu noble-updates InRelease 130s Hit:4 http://ftpmaster.internal/ubuntu noble-security InRelease 132s Reading package lists... 132s Reading package lists... 133s Building dependency tree... 133s Reading state information... 133s Calculating upgrade... 134s The following packages were automatically installed and are no longer required: 134s libaio1 libnetplan0 python3-distutils python3-lib2to3 134s Use 'sudo apt autoremove' to remove them. 134s The following packages will be REMOVED: 134s libapt-pkg6.0 libarchive13 libatm1 libcurl3-gnutls libcurl4 libdb5.3 libelf1 134s libext2fs2 libgdbm-compat4 libgdbm6 libglib2.0-0 libgnutls30 libgpgme11 134s libhogweed6 libmagic1 libnettle8 libnpth0 libnvme1 libparted2 libperl5.38 134s libpng16-16 libpsl5 libreadline8 libreiserfscore0 libssl3 libtirpc3 liburcu8 134s libuv1 134s The following NEW packages will be installed: 134s bpfcc-tools bpftrace fontconfig-config fonts-dejavu-core fonts-dejavu-mono 134s hwdata ieee-data libaio1t64 libapt-pkg6.0t64 libarchive13t64 libatm1t64 134s libbpfcc libc-dev-bin libc-devtools libc6-dev libclang-cpp18 libclang1-18 134s libcrypt-dev libcurl3t64-gnutls libcurl4t64 libdb5.3t64 libdeflate0 134s libdw1t64 libelf1t64 libext2fs2t64 libfontconfig1 libfreetype6 libgd3 134s libgdbm-compat4t64 libgdbm6t64 libglib2.0-0t64 libgnutls30t64 libgpgme11t64 134s libhogweed6t64 libjbig0 libjpeg-turbo8 libjpeg8 libllvm18 libmagic1t64 134s libnetplan1 libnettle8t64 libnpth0t64 libnvme1t64 libparted2t64 134s libperl5.38t64 libpng16-16t64 libpsl5t64 libreadline8t64 libreiserfscore0t64 134s libsharpyuv0 libssl3t64 libtiff6 libtirpc3t64 liburcu8t64 libuv1t64 libwebp7 134s libxpm4 linux-headers-6.8.0-20 linux-headers-6.8.0-20-generic 134s linux-image-6.8.0-20-generic linux-libc-dev linux-modules-6.8.0-20-generic 134s linux-modules-extra-6.8.0-20-generic linux-tools-6.8.0-20 134s linux-tools-6.8.0-20-generic linux-tools-common manpages manpages-dev 134s python3-bpfcc python3-netaddr rpcsvc-proto ubuntu-kernel-accessories 134s xdg-user-dirs 134s The following packages have been kept back: 134s s390-tools 134s The following packages will be upgraded: 134s apparmor apt apt-utils base-files bash bind9-dnsutils bind9-host bind9-libs 134s binutils binutils-common binutils-s390x-linux-gnu bolt bsdextrautils 134s bsdutils btrfs-progs coreutils cryptsetup-bin curl dbus dbus-bin dbus-daemon 134s dbus-session-bus-common dbus-system-bus-common dbus-user-session dhcpcd-base 134s dirmngr dmsetup dpkg dpkg-dev e2fsprogs e2fsprogs-l10n eject fdisk file ftp 134s fwupd gawk gcc-13-base gcc-14-base gir1.2-girepository-2.0 gir1.2-glib-2.0 134s gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv 134s groff-base ibverbs-providers inetutils-telnet info initramfs-tools 134s initramfs-tools-bin initramfs-tools-core install-info iproute2 jq keyboxd 134s kmod kpartx krb5-locales libapparmor1 libaudit-common libaudit1 libbinutils 134s libblkid1 libblockdev-crypto3 libblockdev-fs3 libblockdev-loop3 134s libblockdev-mdraid3 libblockdev-nvme3 libblockdev-part3 libblockdev-swap3 134s libblockdev-utils3 libblockdev3 libbpf1 libbrotli1 libcap-ng0 libcom-err2 134s libcryptsetup12 libctf-nobfd0 libctf0 libdbus-1-3 libdebconfclient0 134s libdevmapper1.02.1 libdpkg-perl libevent-core-2.1-7 libexpat1 libfdisk1 134s libfido2-1 libftdi1-2 libfwupd2 libgcc-s1 libgirepository-1.0-1 134s libglib2.0-data libgssapi-krb5-2 libgudev-1.0-0 libgusb2 libibverbs1 134s libjcat1 libjq1 libjson-glib-1.0-0 libjson-glib-1.0-common libk5crypto3 134s libkmod2 libkrb5-3 libkrb5support0 libldap-common libldap2 134s liblocale-gettext-perl liblzma5 libmagic-mgc libmbim-glib4 libmbim-proxy 134s libmm-glib0 libmount1 libnghttp2-14 libnsl2 libnss-systemd libpam-modules 134s libpam-modules-bin libpam-runtime libpam-systemd libpam0g libplymouth5 134s libpolkit-agent-1-0 libpolkit-gobject-1-0 libproc2-0 libprotobuf-c1 134s libpython3-stdlib libpython3.11-minimal libpython3.11-stdlib 134s libpython3.12-minimal libpython3.12-stdlib libqmi-glib5 libqmi-proxy 134s libqrtr-glib0 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db 134s libseccomp2 libselinux1 libsemanage-common libsemanage2 libsframe1 libslang2 134s libsmartcols1 libsqlite3-0 libss2 libssh-4 libstdc++6 libsystemd-shared 134s libsystemd0 libtext-charwidth-perl libtext-iconv-perl libtirpc-common 134s libudev1 libudisks2-0 libusb-1.0-0 libuuid1 libvolume-key1 libxml2 libxmlb2 134s libxmuu1 linux-generic linux-headers-generic linux-headers-virtual 134s linux-image-generic linux-image-virtual linux-virtual logsave lshw lsof 134s man-db motd-news-config mount mtr-tiny multipath-tools netplan-generator 134s netplan.io openssh-client openssh-server openssh-sftp-server openssl parted 134s perl perl-base perl-modules-5.38 pinentry-curses plymouth 134s plymouth-theme-ubuntu-text procps python-apt-common python3 python3-apt 134s python3-cryptography python3-dbus python3-distutils python3-gdbm python3-gi 134s python3-lib2to3 python3-minimal python3-netplan python3-pkg-resources 134s python3-pyrsistent python3-setuptools python3-typing-extensions python3-yaml 134s python3.11 python3.11-minimal python3.12 python3.12-minimal readline-common 134s rsync rsyslog s390-tools-data shared-mime-info sudo systemd systemd-dev 134s systemd-resolved systemd-sysv systemd-timesyncd tcpdump telnet tnftp 134s ubuntu-pro-client ubuntu-pro-client-l10n udev udisks2 usb.ids util-linux 134s uuid-runtime vim-common vim-tiny wget xxd xz-utils zlib1g 134s 243 upgraded, 73 newly installed, 28 to remove and 1 not upgraded. 134s Need to get 228 MB of archives. 134s After this operation, 524 MB of additional disk space will be used. 134s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main s390x motd-news-config all 13ubuntu8 [5098 B] 134s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main s390x base-files s390x 13ubuntu8 [74.2 kB] 134s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bash s390x 5.2.21-2ubuntu3 [845 kB] 135s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bsdutils s390x 1:2.39.3-9ubuntu2 [96.1 kB] 135s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libbrotli1 s390x 1.1.0-2build1 [375 kB] 136s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgssapi-krb5-2 s390x 1.20.1-6ubuntu1 [149 kB] 136s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libkrb5-3 s390x 1.20.1-6ubuntu1 [360 kB] 136s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libkrb5support0 s390x 1.20.1-6ubuntu1 [34.6 kB] 136s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libk5crypto3 s390x 1.20.1-6ubuntu1 [90.3 kB] 136s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libcom-err2 s390x 1.47.0-2.4~exp1ubuntu2 [22.9 kB] 136s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/main s390x zlib1g s390x 1:1.3.dfsg-3.1ubuntu1 [75.7 kB] 136s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/main s390x librtmp1 s390x 2.4+20151223.gitfa8646d.1-2build6 [58.4 kB] 136s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/main s390x udisks2 s390x 2.10.1-6 [298 kB] 136s Get:14 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libudisks2-0 s390x 2.10.1-6 [179 kB] 136s Get:15 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblkid1 s390x 2.39.3-9ubuntu2 [128 kB] 136s Get:16 http://ftpmaster.internal/ubuntu noble-proposed/main s390x liblzma5 s390x 5.6.0-0.2 [137 kB] 137s Get:17 http://ftpmaster.internal/ubuntu noble-proposed/main s390x kmod s390x 31+20240202-2ubuntu4 [107 kB] 137s Get:18 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libkmod2 s390x 31+20240202-2ubuntu4 [56.3 kB] 137s Get:19 http://ftpmaster.internal/ubuntu noble-proposed/main s390x systemd-dev all 255.4-1ubuntu5 [103 kB] 137s Get:20 http://ftpmaster.internal/ubuntu noble-proposed/main s390x systemd-timesyncd s390x 255.4-1ubuntu5 [35.3 kB] 137s Get:21 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dbus-session-bus-common all 1.14.10-4ubuntu2 [80.3 kB] 137s Get:22 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libaudit-common all 1:3.1.2-2.1 [5674 B] 137s Get:23 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libcap-ng0 s390x 0.8.4-2build1 [15.7 kB] 137s Get:24 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libaudit1 s390x 1:3.1.2-2.1 [48.9 kB] 137s Get:25 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpam0g s390x 1.5.3-5ubuntu3 [69.8 kB] 137s Get:26 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libselinux1 s390x 3.5-2ubuntu1 [84.7 kB] 137s Get:27 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libcurl4t64 s390x 8.5.0-2ubuntu8 [363 kB] 137s Get:28 http://ftpmaster.internal/ubuntu noble-proposed/main s390x curl s390x 8.5.0-2ubuntu8 [227 kB] 137s Get:29 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpsl5t64 s390x 0.21.2-1.1 [57.6 kB] 137s Get:30 http://ftpmaster.internal/ubuntu noble-proposed/main s390x wget s390x 1.21.4-1ubuntu2 [351 kB] 137s Get:31 http://ftpmaster.internal/ubuntu noble-proposed/main s390x tnftp s390x 20230507-2build1 [107 kB] 138s Get:32 http://ftpmaster.internal/ubuntu noble-proposed/main s390x tcpdump s390x 4.99.4-3ubuntu2 [490 kB] 138s Get:33 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsystemd-shared s390x 255.4-1ubuntu5 [2131 kB] 139s Get:34 http://ftpmaster.internal/ubuntu noble-proposed/main s390x systemd-resolved s390x 255.4-1ubuntu5 [304 kB] 139s Get:35 http://ftpmaster.internal/ubuntu noble-proposed/main s390x sudo s390x 1.9.15p5-3ubuntu3 [968 kB] 139s Get:36 http://ftpmaster.internal/ubuntu noble-proposed/main s390x rsync s390x 3.2.7-1build1 [446 kB] 140s Get:37 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-cryptography s390x 41.0.7-4build2 [918 kB] 140s Get:38 http://ftpmaster.internal/ubuntu noble-proposed/main s390x openssl s390x 3.0.13-0ubuntu2 [1010 kB] 141s Get:39 http://ftpmaster.internal/ubuntu noble-proposed/main s390x openssh-sftp-server s390x 1:9.6p1-3ubuntu11 [39.0 kB] 141s Get:40 http://ftpmaster.internal/ubuntu noble-proposed/main s390x openssh-client s390x 1:9.6p1-3ubuntu11 [935 kB] 142s Get:41 http://ftpmaster.internal/ubuntu noble-proposed/main s390x openssh-server s390x 1:9.6p1-3ubuntu11 [529 kB] 142s Get:42 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libssh-4 s390x 0.10.6-2build1 [189 kB] 142s Get:43 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsasl2-modules s390x 2.1.28+dfsg1-5ubuntu1 [76.6 kB] 142s Get:44 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3.12 s390x 3.12.2-4build3 [645 kB] 143s Get:45 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3.12-minimal s390x 3.12.2-4build3 [2419 kB] 144s Get:46 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpython3.12-minimal s390x 3.12.2-4build3 [829 kB] 144s Get:47 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libparted2t64 s390x 3.6-3.1build2 [172 kB] 144s Get:48 http://ftpmaster.internal/ubuntu noble-proposed/main s390x parted s390x 3.6-3.1build2 [44.6 kB] 144s Get:49 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3.11 s390x 3.11.8-1build4 [589 kB] 145s Get:50 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3.11-minimal s390x 3.11.8-1build4 [2280 kB] 146s Get:51 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpython3.11-minimal s390x 3.11.8-1build4 [838 kB] 146s Get:52 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpython3.11-stdlib s390x 3.11.8-1build4 [1944 kB] 147s Get:53 http://ftpmaster.internal/ubuntu noble-proposed/main s390x shared-mime-info s390x 2.4-1build1 [474 kB] 147s Get:54 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gir1.2-girepository-2.0 s390x 1.79.1-1ubuntu6 [24.5 kB] 147s Get:55 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gir1.2-glib-2.0 s390x 2.79.3-3ubuntu5 [180 kB] 147s Get:56 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgirepository-1.0-1 s390x 1.79.1-1ubuntu6 [84.0 kB] 147s Get:57 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-gi s390x 3.47.0-3build1 [236 kB] 148s Get:58 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-dbus s390x 1.3.2-5build2 [100 kB] 148s Get:59 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libnetplan1 s390x 1.0-1 [123 kB] 148s Get:60 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-netplan s390x 1.0-1 [23.0 kB] 148s Get:61 http://ftpmaster.internal/ubuntu noble-proposed/main s390x netplan-generator s390x 1.0-1 [59.1 kB] 148s Get:62 http://ftpmaster.internal/ubuntu noble-proposed/main s390x initramfs-tools-bin s390x 0.142ubuntu23 [20.5 kB] 148s Get:63 http://ftpmaster.internal/ubuntu noble-proposed/main s390x initramfs-tools-core all 0.142ubuntu23 [50.1 kB] 148s Get:64 http://ftpmaster.internal/ubuntu noble-proposed/main s390x initramfs-tools all 0.142ubuntu23 [9058 B] 148s Get:65 http://ftpmaster.internal/ubuntu noble-proposed/main s390x netplan.io s390x 1.0-1 [65.4 kB] 148s Get:66 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libxmlb2 s390x 0.3.15-1build1 [70.6 kB] 148s Get:67 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgpgme11t64 s390x 1.18.0-4.1ubuntu3 [150 kB] 148s Get:68 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libvolume-key1 s390x 0.3.12-7build1 [40.8 kB] 148s Get:69 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libqrtr-glib0 s390x 1.2.2-1ubuntu3 [17.5 kB] 148s Get:70 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libqmi-glib5 s390x 1.35.2-0ubuntu1 [918 kB] 149s Get:71 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libqmi-proxy s390x 1.35.2-0ubuntu1 [6122 B] 149s Get:72 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpolkit-agent-1-0 s390x 124-1ubuntu1 [17.8 kB] 149s Get:73 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpolkit-gobject-1-0 s390x 124-1ubuntu1 [48.3 kB] 149s Get:74 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libmm-glib0 s390x 1.23.4-0ubuntu1 [251 kB] 149s Get:75 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libmbim-glib4 s390x 1.31.2-0ubuntu2 [238 kB] 149s Get:76 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libmbim-proxy s390x 1.31.2-0ubuntu2 [6154 B] 149s Get:77 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libjson-glib-1.0-common all 1.8.0-2build1 [4210 B] 149s Get:78 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libjson-glib-1.0-0 s390x 1.8.0-2build1 [68.4 kB] 149s Get:79 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgusb2 s390x 0.4.8-1build1 [39.0 kB] 149s Get:80 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgudev-1.0-0 s390x 1:238-3ubuntu2 [15.7 kB] 149s Get:81 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libarchive13t64 s390x 3.7.2-1.1ubuntu2 [419 kB] 149s Get:82 http://ftpmaster.internal/ubuntu noble-proposed/main s390x fwupd s390x 1.9.15-2 [4435 kB] 151s Get:83 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libcurl3t64-gnutls s390x 8.5.0-2ubuntu8 [356 kB] 151s Get:84 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libfwupd2 s390x 1.9.15-2 [136 kB] 151s Get:85 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev3 s390x 3.1.0-1build1 [52.3 kB] 151s Get:86 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-utils3 s390x 3.1.0-1build1 [19.2 kB] 151s Get:87 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-swap3 s390x 3.1.0-1build1 [7778 B] 151s Get:88 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-part3 s390x 3.1.0-1build1 [15.4 kB] 151s Get:89 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libnvme1t64 s390x 1.8-3 [78.7 kB] 151s Get:90 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-nvme3 s390x 3.1.0-1build1 [18.3 kB] 151s Get:91 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-mdraid3 s390x 3.1.0-1build1 [13.2 kB] 151s Get:92 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-loop3 s390x 3.1.0-1build1 [7138 B] 151s Get:93 http://ftpmaster.internal/ubuntu noble-proposed/main s390x e2fsprogs-l10n all 1.47.0-2.4~exp1ubuntu2 [5996 B] 151s Get:94 http://ftpmaster.internal/ubuntu noble-proposed/main s390x logsave s390x 1.47.0-2.4~exp1ubuntu2 [22.5 kB] 151s Get:95 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libext2fs2t64 s390x 1.47.0-2.4~exp1ubuntu2 [235 kB] 151s Get:96 http://ftpmaster.internal/ubuntu noble-proposed/main s390x e2fsprogs s390x 1.47.0-2.4~exp1ubuntu2 [615 kB] 152s Get:97 http://ftpmaster.internal/ubuntu noble/main s390x libreiserfscore0t64 s390x 1:3.6.27-7.1 [85.5 kB] 152s Get:98 http://ftpmaster.internal/ubuntu noble-proposed/main s390x btrfs-progs s390x 6.6.3-1.1build1 [959 kB] 152s Get:99 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-fs3 s390x 3.1.0-1build1 [36.5 kB] 152s Get:100 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libblockdev-crypto3 s390x 3.1.0-1build1 [21.6 kB] 152s Get:101 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bolt s390x 0.9.6-2build1 [142 kB] 152s Get:102 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libglib2.0-0t64 s390x 2.79.3-3ubuntu5 [1566 kB] 153s Get:103 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libjcat1 s390x 0.2.0-2build2 [34.4 kB] 153s Get:104 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libldap2 s390x 2.6.7+dfsg-1~exp1ubuntu6 [202 kB] 153s Get:105 http://ftpmaster.internal/ubuntu noble-proposed/main s390x ubuntu-pro-client-l10n s390x 31.2.2 [19.4 kB] 153s Get:106 http://ftpmaster.internal/ubuntu noble-proposed/main s390x ubuntu-pro-client s390x 31.2.2 [214 kB] 153s Get:107 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gnupg-utils s390x 2.4.4-2ubuntu15 [116 kB] 153s Get:108 http://ftpmaster.internal/ubuntu noble-proposed/main s390x keyboxd s390x 2.4.4-2ubuntu15 [83.1 kB] 153s Get:109 http://ftpmaster.internal/ubuntu noble/main s390x libnpth0t64 s390x 1.6-3.1 [8148 B] 153s Get:110 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gpgv s390x 2.4.4-2ubuntu15 [165 kB] 153s Get:111 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gpg-wks-client s390x 2.4.4-2ubuntu15 [76.8 kB] 153s Get:112 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gpg-agent s390x 2.4.4-2ubuntu15 [240 kB] 153s Get:113 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gpg s390x 2.4.4-2ubuntu15 [589 kB] 153s Get:114 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dirmngr s390x 2.4.4-2ubuntu15 [340 kB] 154s Get:115 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gnupg all 2.4.4-2ubuntu15 [359 kB] 154s Get:116 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-apt s390x 2.7.7 [171 kB] 154s Get:117 http://ftpmaster.internal/ubuntu noble-proposed/main s390x apt-utils s390x 2.7.14 [214 kB] 154s Get:118 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libapt-pkg6.0t64 s390x 2.7.14 [1014 kB] 154s Get:119 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libnettle8t64 s390x 3.9.1-2.2 [210 kB] 154s Get:120 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libhogweed6t64 s390x 3.9.1-2.2 [204 kB] 154s Get:121 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgnutls30t64 s390x 3.8.3-1.1ubuntu2 [1044 kB] 154s Get:122 http://ftpmaster.internal/ubuntu noble-proposed/main s390x apt s390x 2.7.14 [1390 kB] 154s Get:123 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gpgconf s390x 2.4.4-2ubuntu15 [111 kB] 154s Get:124 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gpgsm s390x 2.4.4-2ubuntu15 [244 kB] 154s Get:125 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libreadline8t64 s390x 8.2-4 [170 kB] 154s Get:126 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gawk s390x 1:5.2.1-2build2 [496 kB] 155s Get:127 http://ftpmaster.internal/ubuntu noble-proposed/main s390x fdisk s390x 2.39.3-9ubuntu2 [124 kB] 155s Get:128 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpython3.12-stdlib s390x 3.12.2-4build3 [2046 kB] 155s Get:129 http://ftpmaster.internal/ubuntu noble-proposed/main s390x perl-base s390x 5.38.2-3.2 [1961 kB] 155s Get:130 http://ftpmaster.internal/ubuntu noble-proposed/main s390x perl-modules-5.38 all 5.38.2-3.2 [3110 kB] 156s Get:131 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-gdbm s390x 3.12.2-3ubuntu1.1 [19.0 kB] 156s Get:132 http://ftpmaster.internal/ubuntu noble-proposed/main s390x man-db s390x 2.12.0-3build4 [1246 kB] 156s Get:133 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgdbm6t64 s390x 1.23-5.1 [36.4 kB] 156s Get:134 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgdbm-compat4t64 s390x 1.23-5.1 [6880 B] 156s Get:135 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libperl5.38t64 s390x 5.38.2-3.2 [5007 kB] 158s Get:136 http://ftpmaster.internal/ubuntu noble-proposed/main s390x perl s390x 5.38.2-3.2 [231 kB] 158s Get:137 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdb5.3t64 s390x 5.3.28+dfsg2-6 [763 kB] 158s Get:138 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsasl2-modules-db s390x 2.1.28+dfsg1-5ubuntu1 [21.1 kB] 158s Get:139 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsasl2-2 s390x 2.1.28+dfsg1-5ubuntu1 [57.8 kB] 159s Get:140 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libfido2-1 s390x 1.14.0-1build1 [81.0 kB] 159s Get:141 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libcryptsetup12 s390x 2:2.7.0-1ubuntu2 [264 kB] 159s Get:142 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dhcpcd-base s390x 1:10.0.6-1ubuntu2 [217 kB] 159s Get:143 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libuv1t64 s390x 1.48.0-1.1 [101 kB] 159s Get:144 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bind9-host s390x 1:9.18.24-0ubuntu3 [50.5 kB] 159s Get:145 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bind9-dnsutils s390x 1:9.18.24-0ubuntu3 [162 kB] 159s Get:146 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bind9-libs s390x 1:9.18.24-0ubuntu3 [1243 kB] 160s Get:147 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libssl3t64 s390x 3.0.13-0ubuntu2 [1675 kB] 161s Get:148 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libnss-systemd s390x 255.4-1ubuntu5 [166 kB] 161s Get:149 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libudev1 s390x 255.4-1ubuntu5 [178 kB] 161s Get:150 http://ftpmaster.internal/ubuntu noble-proposed/main s390x systemd s390x 255.4-1ubuntu5 [3533 kB] 163s Get:151 http://ftpmaster.internal/ubuntu noble-proposed/main s390x udev s390x 255.4-1ubuntu5 [1887 kB] 164s Get:152 http://ftpmaster.internal/ubuntu noble-proposed/main s390x systemd-sysv s390x 255.4-1ubuntu5 [11.9 kB] 164s Get:153 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpam-systemd s390x 255.4-1ubuntu5 [242 kB] 164s Get:154 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsystemd0 s390x 255.4-1ubuntu5 [443 kB] 164s Get:155 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpam-modules-bin s390x 1.5.3-5ubuntu3 [57.4 kB] 164s Get:156 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpam-modules s390x 1.5.3-5ubuntu3 [289 kB] 164s Get:157 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpam-runtime all 1.5.3-5ubuntu3 [40.8 kB] 164s Get:158 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dbus-user-session s390x 1.14.10-4ubuntu2 [9960 B] 164s Get:159 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libapparmor1 s390x 4.0.0-beta3-0ubuntu2 [50.8 kB] 164s Get:160 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libexpat1 s390x 2.6.1-2 [94.8 kB] 164s Get:161 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dbus-system-bus-common all 1.14.10-4ubuntu2 [81.5 kB] 164s Get:162 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dbus-bin s390x 1.14.10-4ubuntu2 [41.4 kB] 164s Get:163 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dbus s390x 1.14.10-4ubuntu2 [24.3 kB] 164s Get:164 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dbus-daemon s390x 1.14.10-4ubuntu2 [118 kB] 165s Get:165 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdbus-1-3 s390x 1.14.10-4ubuntu2 [213 kB] 165s Get:166 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libmount1 s390x 2.39.3-9ubuntu2 [138 kB] 165s Get:167 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libseccomp2 s390x 2.5.5-1ubuntu2 [53.4 kB] 165s Get:168 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdevmapper1.02.1 s390x 2:1.02.185-3ubuntu2 [142 kB] 165s Get:169 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libuuid1 s390x 2.39.3-9ubuntu2 [35.6 kB] 165s Get:170 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libfdisk1 s390x 2.39.3-9ubuntu2 [151 kB] 165s Get:171 http://ftpmaster.internal/ubuntu noble-proposed/main s390x mount s390x 2.39.3-9ubuntu2 [119 kB] 165s Get:172 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsqlite3-0 s390x 3.45.1-1ubuntu1 [747 kB] 168s Get:173 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gcc-14-base s390x 14-20240315-1ubuntu1 [47.0 kB] 168s Get:174 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgcc-s1 s390x 14-20240315-1ubuntu1 [35.9 kB] 168s Get:175 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libstdc++6 s390x 14-20240315-1ubuntu1 [908 kB] 168s Get:176 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dpkg s390x 1.22.6ubuntu5 [1278 kB] 168s Get:177 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-minimal s390x 3.12.2-0ubuntu1 [27.1 kB] 168s Get:178 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3 s390x 3.12.2-0ubuntu1 [24.1 kB] 168s Get:179 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpython3-stdlib s390x 3.12.2-0ubuntu1 [9804 B] 168s Get:180 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsmartcols1 s390x 2.39.3-9ubuntu2 [67.9 kB] 168s Get:181 http://ftpmaster.internal/ubuntu noble-proposed/main s390x bsdextrautils s390x 2.39.3-9ubuntu2 [76.3 kB] 168s Get:182 http://ftpmaster.internal/ubuntu noble-proposed/main s390x groff-base s390x 1.23.0-3build1 [1049 kB] 168s Get:183 http://ftpmaster.internal/ubuntu noble-proposed/main s390x pinentry-curses s390x 1.2.1-3ubuntu4 [37.6 kB] 168s Get:184 http://ftpmaster.internal/ubuntu noble-proposed/main s390x readline-common all 8.2-4 [56.4 kB] 168s Get:185 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libxml2 s390x 2.9.14+dfsg-1.3ubuntu2 [818 kB] 168s Get:186 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libbpf1 s390x 1:1.3.0-2build1 [176 kB] 168s Get:187 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libelf1t64 s390x 0.190-1.1build2 [69.7 kB] 168s Get:188 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libtirpc-common all 1.3.4+ds-1.1 [8018 B] 168s Get:189 http://ftpmaster.internal/ubuntu noble-proposed/main s390x lsof s390x 4.95.0-1build2 [248 kB] 168s Get:190 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libnsl2 s390x 1.3.0-3build2 [44.1 kB] 168s Get:191 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libtirpc3t64 s390x 1.3.4+ds-1.1 [85.8 kB] 168s Get:192 http://ftpmaster.internal/ubuntu noble-proposed/main s390x iproute2 s390x 6.1.0-1ubuntu5 [1156 kB] 169s Get:193 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-yaml s390x 6.0.1-2build1 [121 kB] 169s Get:194 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libusb-1.0-0 s390x 2:1.0.27-1 [54.8 kB] 169s Get:195 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libprotobuf-c1 s390x 1.4.1-1ubuntu3 [23.4 kB] 169s Get:196 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libnghttp2-14 s390x 1.59.0-1build1 [77.8 kB] 169s Get:197 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libproc2-0 s390x 2:4.0.4-4ubuntu2 [60.1 kB] 169s Get:198 http://ftpmaster.internal/ubuntu noble-proposed/main s390x procps s390x 2:4.0.4-4ubuntu2 [724 kB] 169s Get:199 http://ftpmaster.internal/ubuntu noble-proposed/main s390x coreutils s390x 9.4-3ubuntu3 [1482 kB] 170s Get:200 http://ftpmaster.internal/ubuntu noble-proposed/main s390x util-linux s390x 2.39.3-9ubuntu2 [1143 kB] 171s Get:201 http://ftpmaster.internal/ubuntu noble-proposed/main s390x file s390x 1:5.45-3 [22.2 kB] 171s Get:202 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libmagic-mgc s390x 1:5.45-3 [305 kB] 171s Get:203 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libmagic1t64 s390x 1:5.45-3 [93.1 kB] 172s Get:204 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libplymouth5 s390x 24.004.60-1ubuntu6 [151 kB] 172s Get:205 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpng16-16t64 s390x 1.6.43-3 [200 kB] 172s Get:206 http://ftpmaster.internal/ubuntu noble-proposed/main s390x multipath-tools s390x 0.9.4-5ubuntu6 [318 kB] 172s Get:207 http://ftpmaster.internal/ubuntu noble/main s390x liburcu8t64 s390x 0.14.0-3.1 [67.3 kB] 172s Get:208 http://ftpmaster.internal/ubuntu noble-proposed/main s390x liblocale-gettext-perl s390x 1.07-6ubuntu4 [15.8 kB] 172s Get:209 http://ftpmaster.internal/ubuntu noble-proposed/main s390x uuid-runtime s390x 2.39.3-9ubuntu2 [33.4 kB] 172s Get:210 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdebconfclient0 s390x 0.271ubuntu2 [11.4 kB] 172s Get:211 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsemanage-common all 3.5-1build4 [10.1 kB] 172s Get:212 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsemanage2 s390x 3.5-1build4 [96.7 kB] 172s Get:213 http://ftpmaster.internal/ubuntu noble-proposed/main s390x install-info s390x 7.1-3build1 [64.5 kB] 172s Get:214 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gcc-13-base s390x 13.2.0-21ubuntu1 [48.3 kB] 172s Get:215 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libss2 s390x 1.47.0-2.4~exp1ubuntu2 [17.2 kB] 172s Get:216 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dmsetup s390x 2:1.02.185-3ubuntu2 [80.4 kB] 172s Get:217 http://ftpmaster.internal/ubuntu noble-proposed/main s390x eject s390x 2.39.3-9ubuntu2 [26.2 kB] 172s Get:218 http://ftpmaster.internal/ubuntu noble-proposed/main s390x krb5-locales all 1.20.1-6ubuntu1 [13.8 kB] 172s Get:219 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libglib2.0-data all 2.79.3-3ubuntu5 [46.6 kB] 172s Get:220 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libslang2 s390x 2.3.3-3build1 [501 kB] 173s Get:221 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libtext-charwidth-perl s390x 0.04-11build2 [9484 B] 173s Get:222 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libtext-iconv-perl s390x 1.7-8build2 [13.8 kB] 173s Get:223 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python-apt-common all 2.7.7 [19.8 kB] 173s Get:224 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-setuptools all 68.1.2-2ubuntu1 [396 kB] 173s Get:225 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-pkg-resources all 68.1.2-2ubuntu1 [168 kB] 173s Get:226 http://ftpmaster.internal/ubuntu noble-proposed/main s390x rsyslog s390x 8.2312.0-3ubuntu7 [536 kB] 173s Get:227 http://ftpmaster.internal/ubuntu noble-proposed/main s390x vim-tiny s390x 2:9.1.0016-1ubuntu6 [879 kB] 173s Get:228 http://ftpmaster.internal/ubuntu noble-proposed/main s390x vim-common all 2:9.1.0016-1ubuntu6 [385 kB] 174s Get:229 http://ftpmaster.internal/ubuntu noble/main s390x xdg-user-dirs s390x 0.18-1 [18.5 kB] 174s Get:230 http://ftpmaster.internal/ubuntu noble-proposed/main s390x xxd s390x 2:9.1.0016-1ubuntu6 [63.5 kB] 174s Get:231 http://ftpmaster.internal/ubuntu noble-proposed/main s390x apparmor s390x 4.0.0-beta3-0ubuntu2 [710 kB] 174s Get:232 http://ftpmaster.internal/ubuntu noble-proposed/main s390x ftp all 20230507-2build1 [4724 B] 174s Get:233 http://ftpmaster.internal/ubuntu noble-proposed/main s390x inetutils-telnet s390x 2:2.5-3ubuntu3 [105 kB] 174s Get:234 http://ftpmaster.internal/ubuntu noble-proposed/main s390x info s390x 7.1-3build1 [152 kB] 174s Get:235 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libxmuu1 s390x 2:1.1.3-3build1 [8860 B] 174s Get:236 http://ftpmaster.internal/ubuntu noble-proposed/main s390x lshw s390x 02.19.git.2021.06.19.996aaad9c7-2build2 [346 kB] 174s Get:237 http://ftpmaster.internal/ubuntu noble/main s390x manpages all 6.05.01-1 [1340 kB] 174s Get:238 http://ftpmaster.internal/ubuntu noble-proposed/main s390x mtr-tiny s390x 0.95-1.1build1 [57.0 kB] 174s Get:239 http://ftpmaster.internal/ubuntu noble-proposed/main s390x plymouth-theme-ubuntu-text s390x 24.004.60-1ubuntu6 [10.2 kB] 174s Get:240 http://ftpmaster.internal/ubuntu noble-proposed/main s390x plymouth s390x 24.004.60-1ubuntu6 [147 kB] 174s Get:241 http://ftpmaster.internal/ubuntu noble-proposed/main s390x telnet all 0.17+2.5-3ubuntu3 [3682 B] 174s Get:242 http://ftpmaster.internal/ubuntu noble-proposed/main s390x usb.ids all 2024.03.18-1 [223 kB] 174s Get:243 http://ftpmaster.internal/ubuntu noble-proposed/main s390x xz-utils s390x 5.6.0-0.2 [274 kB] 174s Get:244 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libctf0 s390x 2.42-4ubuntu1 [98.4 kB] 174s Get:245 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libctf-nobfd0 s390x 2.42-4ubuntu1 [100 kB] 174s Get:246 http://ftpmaster.internal/ubuntu noble-proposed/main s390x binutils-s390x-linux-gnu s390x 2.42-4ubuntu1 [2270 kB] 175s Get:247 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libbinutils s390x 2.42-4ubuntu1 [477 kB] 175s Get:248 http://ftpmaster.internal/ubuntu noble-proposed/main s390x binutils s390x 2.42-4ubuntu1 [3056 B] 175s Get:249 http://ftpmaster.internal/ubuntu noble-proposed/main s390x binutils-common s390x 2.42-4ubuntu1 [217 kB] 175s Get:250 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsframe1 s390x 2.42-4ubuntu1 [14.2 kB] 175s Get:251 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libllvm18 s390x 1:18.1.2-1ubuntu2 [33.4 MB] 179s Get:252 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libclang-cpp18 s390x 1:18.1.2-1ubuntu2 [16.1 MB] 181s Get:253 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x libbpfcc s390x 0.29.1+ds-1ubuntu4 [697 kB] 181s Get:254 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x python3-bpfcc all 0.29.1+ds-1ubuntu4 [40.2 kB] 181s Get:255 http://ftpmaster.internal/ubuntu noble/main s390x ieee-data all 20220827.1 [2113 kB] 181s Get:256 http://ftpmaster.internal/ubuntu noble/main s390x python3-netaddr all 0.8.0-2ubuntu1 [319 kB] 182s Get:257 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x bpfcc-tools all 0.29.1+ds-1ubuntu4 [687 kB] 182s Get:258 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libclang1-18 s390x 1:18.1.2-1ubuntu2 [9349 kB] 183s Get:259 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdw1t64 s390x 0.190-1.1build2 [286 kB] 183s Get:260 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x bpftrace s390x 0.20.2-1ubuntu1 [1139 kB] 183s Get:261 http://ftpmaster.internal/ubuntu noble-proposed/main s390x cryptsetup-bin s390x 2:2.7.0-1ubuntu2 [211 kB] 183s Get:262 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dpkg-dev all 1.22.6ubuntu5 [1074 kB] 183s Get:263 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdpkg-perl all 1.22.6ubuntu5 [269 kB] 183s Get:264 http://ftpmaster.internal/ubuntu noble/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 183s Get:265 http://ftpmaster.internal/ubuntu noble/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 183s Get:266 http://ftpmaster.internal/ubuntu noble-proposed/main s390x fontconfig-config s390x 2.15.0-1.1ubuntu1 [37.4 kB] 183s Get:267 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gnupg-l10n all 2.4.4-2ubuntu15 [65.8 kB] 183s Get:268 http://ftpmaster.internal/ubuntu noble/main s390x hwdata all 0.379-1 [29.1 kB] 183s Get:269 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libibverbs1 s390x 50.0-2build1 [70.0 kB] 183s Get:270 http://ftpmaster.internal/ubuntu noble-proposed/main s390x ibverbs-providers s390x 50.0-2build1 [408 kB] 184s Get:271 http://ftpmaster.internal/ubuntu noble-proposed/main s390x jq s390x 1.7.1-3 [66.5 kB] 184s Get:272 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libjq1 s390x 1.7.1-3 [168 kB] 184s Get:273 http://ftpmaster.internal/ubuntu noble/main s390x libaio1t64 s390x 0.3.113-6 [7290 B] 184s Get:274 http://ftpmaster.internal/ubuntu noble/main s390x libatm1t64 s390x 1:2.5.1-5.1 [24.5 kB] 184s Get:275 http://ftpmaster.internal/ubuntu noble/main s390x libc-dev-bin s390x 2.39-0ubuntu6 [20.2 kB] 184s Get:276 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libfreetype6 s390x 2.13.2+dfsg-1build2 [437 kB] 184s Get:277 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libfontconfig1 s390x 2.15.0-1.1ubuntu1 [150 kB] 184s Get:278 http://ftpmaster.internal/ubuntu noble/main s390x libjpeg-turbo8 s390x 2.1.5-2ubuntu1 [128 kB] 184s Get:279 http://ftpmaster.internal/ubuntu noble/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 184s Get:280 http://ftpmaster.internal/ubuntu noble/main s390x libdeflate0 s390x 1.19-1 [46.0 kB] 184s Get:281 http://ftpmaster.internal/ubuntu noble/main s390x libjbig0 s390x 2.1-6.1ubuntu1 [29.8 kB] 184s Get:282 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libsharpyuv0 s390x 1.3.2-0.4build2 [14.9 kB] 184s Get:283 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libwebp7 s390x 1.3.2-0.4build2 [207 kB] 184s Get:284 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu1 [218 kB] 184s Get:285 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libxpm4 s390x 1:3.5.17-1build1 [41.4 kB] 184s Get:286 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgd3 s390x 2.3.3-9ubuntu3 [141 kB] 184s Get:287 http://ftpmaster.internal/ubuntu noble/main s390x libc-devtools s390x 2.39-0ubuntu6 [30.6 kB] 184s Get:288 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-libc-dev s390x 6.8.0-20.20 [1592 kB] 184s Get:289 http://ftpmaster.internal/ubuntu noble/main s390x libcrypt-dev s390x 1:4.4.36-4 [135 kB] 184s Get:290 http://ftpmaster.internal/ubuntu noble/main s390x rpcsvc-proto s390x 1.4.2-0ubuntu6 [64.7 kB] 184s Get:291 http://ftpmaster.internal/ubuntu noble/main s390x libc6-dev s390x 2.39-0ubuntu6 [1629 kB] 184s Get:292 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libevent-core-2.1-7 s390x 2.1.12-stable-9build1 [94.3 kB] 184s Get:293 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libftdi1-2 s390x 1.5-6build4 [29.3 kB] 184s Get:294 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libldap-common all 2.6.7+dfsg-1~exp1ubuntu6 [31.3 kB] 184s Get:295 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-modules-6.8.0-20-generic s390x 6.8.0-20.20 [21.0 MB] 189s Get:296 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-image-6.8.0-20-generic s390x 6.8.0-20.20 [9872 kB] 192s Get:297 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-modules-extra-6.8.0-20-generic s390x 6.8.0-20.20 [11.7 MB] 197s Get:298 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-generic s390x 6.8.0-20.20+1 [1734 B] 197s Get:299 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-image-generic s390x 6.8.0-20.20+1 [9688 B] 197s Get:300 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-virtual s390x 6.8.0-20.20+1 [1682 B] 197s Get:301 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-image-virtual s390x 6.8.0-20.20+1 [9700 B] 197s Get:302 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-headers-virtual s390x 6.8.0-20.20+1 [1642 B] 197s Get:303 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-headers-6.8.0-20 all 6.8.0-20.20 [13.6 MB] 206s Get:304 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-headers-6.8.0-20-generic s390x 6.8.0-20.20 [2579 kB] 208s Get:305 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-headers-generic s390x 6.8.0-20.20+1 [9608 B] 208s Get:306 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-tools-common all 6.8.0-20.20 [437 kB] 208s Get:307 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-tools-6.8.0-20 s390x 6.8.0-20.20 [2674 kB] 209s Get:308 http://ftpmaster.internal/ubuntu noble-proposed/main s390x linux-tools-6.8.0-20-generic s390x 6.8.0-20.20 [1724 B] 209s Get:309 http://ftpmaster.internal/ubuntu noble/main s390x manpages-dev all 6.05.01-1 [2018 kB] 210s Get:310 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-distutils all 3.12.2-3ubuntu1.1 [133 kB] 210s Get:311 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-lib2to3 all 3.12.2-3ubuntu1.1 [79.1 kB] 210s Get:312 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-pyrsistent s390x 0.20.0-1build1 [55.8 kB] 210s Get:313 http://ftpmaster.internal/ubuntu noble-proposed/main s390x python3-typing-extensions all 4.10.0-1 [60.7 kB] 210s Get:314 http://ftpmaster.internal/ubuntu noble-proposed/main s390x s390-tools-data all 2.31.0-0ubuntu3 [17.8 kB] 210s Get:315 http://ftpmaster.internal/ubuntu noble/main s390x ubuntu-kernel-accessories s390x 1.536build1 [10.5 kB] 210s Get:316 http://ftpmaster.internal/ubuntu noble-proposed/main s390x kpartx s390x 0.9.4-5ubuntu6 [32.8 kB] 211s Preconfiguring packages ... 211s Fetched 228 MB in 1min 16s (2996 kB/s) 211s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 211s Preparing to unpack .../motd-news-config_13ubuntu8_all.deb ... 211s Unpacking motd-news-config (13ubuntu8) over (13ubuntu7) ... 211s Preparing to unpack .../base-files_13ubuntu8_s390x.deb ... 211s Unpacking base-files (13ubuntu8) over (13ubuntu7) ... 212s Setting up base-files (13ubuntu8) ... 212s motd-news.service is a disabled or a static unit not running, not starting it. 212s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 212s Preparing to unpack .../bash_5.2.21-2ubuntu3_s390x.deb ... 212s Unpacking bash (5.2.21-2ubuntu3) over (5.2.21-2ubuntu2) ... 212s Setting up bash (5.2.21-2ubuntu3) ... 212s update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode 213s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 213s Preparing to unpack .../bsdutils_1%3a2.39.3-9ubuntu2_s390x.deb ... 213s Unpacking bsdutils (1:2.39.3-9ubuntu2) over (1:2.39.3-6ubuntu2) ... 213s Setting up bsdutils (1:2.39.3-9ubuntu2) ... 213s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 213s Preparing to unpack .../0-libbrotli1_1.1.0-2build1_s390x.deb ... 213s Unpacking libbrotli1:s390x (1.1.0-2build1) over (1.1.0-2) ... 213s Preparing to unpack .../1-libgssapi-krb5-2_1.20.1-6ubuntu1_s390x.deb ... 213s Unpacking libgssapi-krb5-2:s390x (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 213s Preparing to unpack .../2-libkrb5-3_1.20.1-6ubuntu1_s390x.deb ... 213s Unpacking libkrb5-3:s390x (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 213s Preparing to unpack .../3-libkrb5support0_1.20.1-6ubuntu1_s390x.deb ... 213s Unpacking libkrb5support0:s390x (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 213s Preparing to unpack .../4-libk5crypto3_1.20.1-6ubuntu1_s390x.deb ... 213s Unpacking libk5crypto3:s390x (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 213s Preparing to unpack .../5-libcom-err2_1.47.0-2.4~exp1ubuntu2_s390x.deb ... 213s Unpacking libcom-err2:s390x (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 213s Preparing to unpack .../6-zlib1g_1%3a1.3.dfsg-3.1ubuntu1_s390x.deb ... 213s Unpacking zlib1g:s390x (1:1.3.dfsg-3.1ubuntu1) over (1:1.3.dfsg-3ubuntu1) ... 213s Setting up zlib1g:s390x (1:1.3.dfsg-3.1ubuntu1) ... 213s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 213s Preparing to unpack .../librtmp1_2.4+20151223.gitfa8646d.1-2build6_s390x.deb ... 213s Unpacking librtmp1:s390x (2.4+20151223.gitfa8646d.1-2build6) over (2.4+20151223.gitfa8646d.1-2build4) ... 213s Preparing to unpack .../udisks2_2.10.1-6_s390x.deb ... 213s Unpacking udisks2 (2.10.1-6) over (2.10.1-1ubuntu2) ... 213s Preparing to unpack .../libudisks2-0_2.10.1-6_s390x.deb ... 213s Unpacking libudisks2-0:s390x (2.10.1-6) over (2.10.1-1ubuntu2) ... 213s Preparing to unpack .../libblkid1_2.39.3-9ubuntu2_s390x.deb ... 213s Unpacking libblkid1:s390x (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 213s Setting up libblkid1:s390x (2.39.3-9ubuntu2) ... 213s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 213s Preparing to unpack .../liblzma5_5.6.0-0.2_s390x.deb ... 213s Unpacking liblzma5:s390x (5.6.0-0.2) over (5.4.5-0.3) ... 213s Setting up liblzma5:s390x (5.6.0-0.2) ... 213s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 213s Preparing to unpack .../0-kmod_31+20240202-2ubuntu4_s390x.deb ... 213s Unpacking kmod (31+20240202-2ubuntu4) over (30+20230601-2ubuntu1) ... 213s Preparing to unpack .../1-libkmod2_31+20240202-2ubuntu4_s390x.deb ... 213s Unpacking libkmod2:s390x (31+20240202-2ubuntu4) over (30+20230601-2ubuntu1) ... 213s Preparing to unpack .../2-systemd-dev_255.4-1ubuntu5_all.deb ... 213s Unpacking systemd-dev (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 213s Preparing to unpack .../3-systemd-timesyncd_255.4-1ubuntu5_s390x.deb ... 213s Unpacking systemd-timesyncd (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 213s Preparing to unpack .../4-dbus-session-bus-common_1.14.10-4ubuntu2_all.deb ... 213s Unpacking dbus-session-bus-common (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 213s Preparing to unpack .../5-libaudit-common_1%3a3.1.2-2.1_all.deb ... 213s Unpacking libaudit-common (1:3.1.2-2.1) over (1:3.1.2-2) ... 213s Setting up libaudit-common (1:3.1.2-2.1) ... 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 214s Preparing to unpack .../libcap-ng0_0.8.4-2build1_s390x.deb ... 214s Unpacking libcap-ng0:s390x (0.8.4-2build1) over (0.8.4-2) ... 214s Setting up libcap-ng0:s390x (0.8.4-2build1) ... 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 214s Preparing to unpack .../libaudit1_1%3a3.1.2-2.1_s390x.deb ... 214s Unpacking libaudit1:s390x (1:3.1.2-2.1) over (1:3.1.2-2) ... 214s Setting up libaudit1:s390x (1:3.1.2-2.1) ... 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 214s Preparing to unpack .../libpam0g_1.5.3-5ubuntu3_s390x.deb ... 214s Unpacking libpam0g:s390x (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 214s Setting up libpam0g:s390x (1.5.3-5ubuntu3) ... 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 214s Preparing to unpack .../libselinux1_3.5-2ubuntu1_s390x.deb ... 214s Unpacking libselinux1:s390x (3.5-2ubuntu1) over (3.5-2build1) ... 214s Setting up libselinux1:s390x (3.5-2ubuntu1) ... 214s dpkg: libcurl4:s390x: dependency problems, but removing anyway as you requested: 214s s390-tools depends on libcurl4 (>= 7.16.2). 214s curl depends on libcurl4 (= 8.5.0-2ubuntu2). 214s 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 214s Removing libcurl4:s390x (8.5.0-2ubuntu2) ... 214s Selecting previously unselected package libcurl4t64:s390x. 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52162 files and directories currently installed.) 214s Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu8_s390x.deb ... 214s Unpacking libcurl4t64:s390x (8.5.0-2ubuntu8) ... 214s Preparing to unpack .../curl_8.5.0-2ubuntu8_s390x.deb ... 214s Unpacking curl (8.5.0-2ubuntu8) over (8.5.0-2ubuntu2) ... 214s dpkg: libpsl5:s390x: dependency problems, but removing anyway as you requested: 214s wget depends on libpsl5 (>= 0.16.0). 214s libcurl3-gnutls:s390x depends on libpsl5 (>= 0.16.0). 214s 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52168 files and directories currently installed.) 214s Removing libpsl5:s390x (0.21.2-1build1) ... 214s Selecting previously unselected package libpsl5t64:s390x. 214s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52163 files and directories currently installed.) 214s Preparing to unpack .../00-libpsl5t64_0.21.2-1.1_s390x.deb ... 214s Unpacking libpsl5t64:s390x (0.21.2-1.1) ... 214s Preparing to unpack .../01-wget_1.21.4-1ubuntu2_s390x.deb ... 214s Unpacking wget (1.21.4-1ubuntu2) over (1.21.4-1ubuntu1) ... 214s Preparing to unpack .../02-tnftp_20230507-2build1_s390x.deb ... 214s Unpacking tnftp (20230507-2build1) over (20230507-2) ... 214s Preparing to unpack .../03-tcpdump_4.99.4-3ubuntu2_s390x.deb ... 214s Unpacking tcpdump (4.99.4-3ubuntu2) over (4.99.4-3ubuntu1) ... 214s Preparing to unpack .../04-libsystemd-shared_255.4-1ubuntu5_s390x.deb ... 214s Unpacking libsystemd-shared:s390x (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 214s Preparing to unpack .../05-systemd-resolved_255.4-1ubuntu5_s390x.deb ... 214s Unpacking systemd-resolved (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 214s Preparing to unpack .../06-sudo_1.9.15p5-3ubuntu3_s390x.deb ... 214s Unpacking sudo (1.9.15p5-3ubuntu3) over (1.9.15p5-3ubuntu1) ... 214s Preparing to unpack .../07-rsync_3.2.7-1build1_s390x.deb ... 214s Unpacking rsync (3.2.7-1build1) over (3.2.7-1) ... 214s Preparing to unpack .../08-python3-cryptography_41.0.7-4build2_s390x.deb ... 214s Unpacking python3-cryptography (41.0.7-4build2) over (41.0.7-3) ... 215s Preparing to unpack .../09-openssl_3.0.13-0ubuntu2_s390x.deb ... 215s Unpacking openssl (3.0.13-0ubuntu2) over (3.0.10-1ubuntu4) ... 215s Preparing to unpack .../10-openssh-sftp-server_1%3a9.6p1-3ubuntu11_s390x.deb ... 215s Unpacking openssh-sftp-server (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 215s Preparing to unpack .../11-openssh-client_1%3a9.6p1-3ubuntu11_s390x.deb ... 215s Unpacking openssh-client (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 215s Preparing to unpack .../12-openssh-server_1%3a9.6p1-3ubuntu11_s390x.deb ... 215s Unpacking openssh-server (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 215s Preparing to unpack .../13-libssh-4_0.10.6-2build1_s390x.deb ... 215s Unpacking libssh-4:s390x (0.10.6-2build1) over (0.10.6-2) ... 215s Preparing to unpack .../14-libsasl2-modules_2.1.28+dfsg1-5ubuntu1_s390x.deb ... 215s Unpacking libsasl2-modules:s390x (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 215s Preparing to unpack .../15-python3.12_3.12.2-4build3_s390x.deb ... 215s Unpacking python3.12 (3.12.2-4build3) over (3.12.2-1) ... 215s Preparing to unpack .../16-python3.12-minimal_3.12.2-4build3_s390x.deb ... 215s Unpacking python3.12-minimal (3.12.2-4build3) over (3.12.2-1) ... 215s Preparing to unpack .../17-libpython3.12-minimal_3.12.2-4build3_s390x.deb ... 215s Unpacking libpython3.12-minimal:s390x (3.12.2-4build3) over (3.12.2-1) ... 215s dpkg: libparted2:s390x: dependency problems, but removing anyway as you requested: 215s parted depends on libparted2 (= 3.6-3). 215s 215s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52169 files and directories currently installed.) 215s Removing libparted2:s390x (3.6-3) ... 215s Selecting previously unselected package libparted2t64:s390x. 216s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52163 files and directories currently installed.) 216s Preparing to unpack .../00-libparted2t64_3.6-3.1build2_s390x.deb ... 216s Unpacking libparted2t64:s390x (3.6-3.1build2) ... 216s Preparing to unpack .../01-parted_3.6-3.1build2_s390x.deb ... 216s Unpacking parted (3.6-3.1build2) over (3.6-3) ... 216s Preparing to unpack .../02-python3.11_3.11.8-1build4_s390x.deb ... 216s Unpacking python3.11 (3.11.8-1build4) over (3.11.8-1) ... 216s Preparing to unpack .../03-python3.11-minimal_3.11.8-1build4_s390x.deb ... 216s Unpacking python3.11-minimal (3.11.8-1build4) over (3.11.8-1) ... 216s Preparing to unpack .../04-libpython3.11-minimal_3.11.8-1build4_s390x.deb ... 216s Unpacking libpython3.11-minimal:s390x (3.11.8-1build4) over (3.11.8-1) ... 216s Preparing to unpack .../05-libpython3.11-stdlib_3.11.8-1build4_s390x.deb ... 216s Unpacking libpython3.11-stdlib:s390x (3.11.8-1build4) over (3.11.8-1) ... 216s Preparing to unpack .../06-shared-mime-info_2.4-1build1_s390x.deb ... 216s Unpacking shared-mime-info (2.4-1build1) over (2.4-1) ... 216s Preparing to unpack .../07-gir1.2-girepository-2.0_1.79.1-1ubuntu6_s390x.deb ... 216s Unpacking gir1.2-girepository-2.0:s390x (1.79.1-1ubuntu6) over (1.79.1-1) ... 216s Preparing to unpack .../08-gir1.2-glib-2.0_2.79.3-3ubuntu5_s390x.deb ... 216s Unpacking gir1.2-glib-2.0:s390x (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 217s Preparing to unpack .../09-libgirepository-1.0-1_1.79.1-1ubuntu6_s390x.deb ... 217s Unpacking libgirepository-1.0-1:s390x (1.79.1-1ubuntu6) over (1.79.1-1) ... 217s Preparing to unpack .../10-python3-gi_3.47.0-3build1_s390x.deb ... 217s Unpacking python3-gi (3.47.0-3build1) over (3.47.0-3) ... 217s Preparing to unpack .../11-python3-dbus_1.3.2-5build2_s390x.deb ... 217s Unpacking python3-dbus (1.3.2-5build2) over (1.3.2-5build1) ... 217s Selecting previously unselected package libnetplan1:s390x. 217s Preparing to unpack .../12-libnetplan1_1.0-1_s390x.deb ... 217s Unpacking libnetplan1:s390x (1.0-1) ... 217s Preparing to unpack .../13-python3-netplan_1.0-1_s390x.deb ... 217s Unpacking python3-netplan (1.0-1) over (0.107.1-3) ... 217s Preparing to unpack .../14-netplan-generator_1.0-1_s390x.deb ... 217s Adding 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 217s Unpacking netplan-generator (1.0-1) over (0.107.1-3) ... 217s Preparing to unpack .../15-initramfs-tools-bin_0.142ubuntu23_s390x.deb ... 217s Unpacking initramfs-tools-bin (0.142ubuntu23) over (0.142ubuntu20) ... 218s Preparing to unpack .../16-initramfs-tools-core_0.142ubuntu23_all.deb ... 218s Unpacking initramfs-tools-core (0.142ubuntu23) over (0.142ubuntu20) ... 218s Preparing to unpack .../17-initramfs-tools_0.142ubuntu23_all.deb ... 218s Unpacking initramfs-tools (0.142ubuntu23) over (0.142ubuntu20) ... 218s Preparing to unpack .../18-netplan.io_1.0-1_s390x.deb ... 218s Unpacking netplan.io (1.0-1) over (0.107.1-3) ... 218s Preparing to unpack .../19-libxmlb2_0.3.15-1build1_s390x.deb ... 218s Unpacking libxmlb2:s390x (0.3.15-1build1) over (0.3.15-1) ... 218s dpkg: libgpgme11:s390x: dependency problems, but removing anyway as you requested: 218s libvolume-key1:s390x depends on libgpgme11 (>= 1.4.1). 218s libjcat1:s390x depends on libgpgme11 (>= 1.2.0). 218s 218s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52172 files and directories currently installed.) 218s Removing libgpgme11:s390x (1.18.0-4ubuntu1) ... 218s Selecting previously unselected package libgpgme11t64:s390x. 218s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52166 files and directories currently installed.) 218s Preparing to unpack .../00-libgpgme11t64_1.18.0-4.1ubuntu3_s390x.deb ... 218s Unpacking libgpgme11t64:s390x (1.18.0-4.1ubuntu3) ... 218s Preparing to unpack .../01-libvolume-key1_0.3.12-7build1_s390x.deb ... 218s Unpacking libvolume-key1:s390x (0.3.12-7build1) over (0.3.12-5build2) ... 218s Preparing to unpack .../02-libqrtr-glib0_1.2.2-1ubuntu3_s390x.deb ... 218s Unpacking libqrtr-glib0:s390x (1.2.2-1ubuntu3) over (1.2.2-1ubuntu2) ... 218s Preparing to unpack .../03-libqmi-glib5_1.35.2-0ubuntu1_s390x.deb ... 218s Unpacking libqmi-glib5:s390x (1.35.2-0ubuntu1) over (1.34.0-2) ... 218s Preparing to unpack .../04-libqmi-proxy_1.35.2-0ubuntu1_s390x.deb ... 218s Unpacking libqmi-proxy (1.35.2-0ubuntu1) over (1.34.0-2) ... 218s Preparing to unpack .../05-libpolkit-agent-1-0_124-1ubuntu1_s390x.deb ... 218s Unpacking libpolkit-agent-1-0:s390x (124-1ubuntu1) over (124-1) ... 218s Preparing to unpack .../06-libpolkit-gobject-1-0_124-1ubuntu1_s390x.deb ... 218s Unpacking libpolkit-gobject-1-0:s390x (124-1ubuntu1) over (124-1) ... 218s Preparing to unpack .../07-libmm-glib0_1.23.4-0ubuntu1_s390x.deb ... 218s Unpacking libmm-glib0:s390x (1.23.4-0ubuntu1) over (1.22.0-3) ... 218s Preparing to unpack .../08-libmbim-glib4_1.31.2-0ubuntu2_s390x.deb ... 218s Unpacking libmbim-glib4:s390x (1.31.2-0ubuntu2) over (1.30.0-1) ... 218s Preparing to unpack .../09-libmbim-proxy_1.31.2-0ubuntu2_s390x.deb ... 218s Unpacking libmbim-proxy (1.31.2-0ubuntu2) over (1.30.0-1) ... 218s Preparing to unpack .../10-libjson-glib-1.0-common_1.8.0-2build1_all.deb ... 218s Unpacking libjson-glib-1.0-common (1.8.0-2build1) over (1.8.0-2) ... 218s Preparing to unpack .../11-libjson-glib-1.0-0_1.8.0-2build1_s390x.deb ... 218s Unpacking libjson-glib-1.0-0:s390x (1.8.0-2build1) over (1.8.0-2) ... 218s Preparing to unpack .../12-libgusb2_0.4.8-1build1_s390x.deb ... 218s Unpacking libgusb2:s390x (0.4.8-1build1) over (0.4.8-1) ... 218s Preparing to unpack .../13-libgudev-1.0-0_1%3a238-3ubuntu2_s390x.deb ... 218s Unpacking libgudev-1.0-0:s390x (1:238-3ubuntu2) over (1:238-3) ... 218s dpkg: libarchive13:s390x: dependency problems, but removing anyway as you requested: 218s fwupd depends on libarchive13 (>= 3.2.1). 218s 218s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52173 files and directories currently installed.) 218s Removing libarchive13:s390x (3.7.2-1ubuntu2) ... 218s Selecting previously unselected package libarchive13t64:s390x. 218s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 218s Preparing to unpack .../libarchive13t64_3.7.2-1.1ubuntu2_s390x.deb ... 218s Unpacking libarchive13t64:s390x (3.7.2-1.1ubuntu2) ... 218s Preparing to unpack .../fwupd_1.9.15-2_s390x.deb ... 218s Unpacking fwupd (1.9.15-2) over (1.9.14-1) ... 219s dpkg: libcurl3-gnutls:s390x: dependency problems, but removing anyway as you requested: 219s libfwupd2:s390x depends on libcurl3-gnutls (>= 7.63.0). 219s 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52174 files and directories currently installed.) 219s Removing libcurl3-gnutls:s390x (8.5.0-2ubuntu2) ... 219s Selecting previously unselected package libcurl3t64-gnutls:s390x. 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 219s Preparing to unpack .../0-libcurl3t64-gnutls_8.5.0-2ubuntu8_s390x.deb ... 219s Unpacking libcurl3t64-gnutls:s390x (8.5.0-2ubuntu8) ... 219s Preparing to unpack .../1-libfwupd2_1.9.15-2_s390x.deb ... 219s Unpacking libfwupd2:s390x (1.9.15-2) over (1.9.14-1) ... 219s Preparing to unpack .../2-libblockdev3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s Preparing to unpack .../3-libblockdev-utils3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev-utils3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s Preparing to unpack .../4-libblockdev-swap3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev-swap3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s Preparing to unpack .../5-libblockdev-part3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev-part3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s dpkg: libnvme1: dependency problems, but removing anyway as you requested: 219s libblockdev-nvme3:s390x depends on libnvme1 (>= 1.7.1). 219s 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52174 files and directories currently installed.) 219s Removing libnvme1 (1.8-2) ... 219s Selecting previously unselected package libnvme1t64. 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52167 files and directories currently installed.) 219s Preparing to unpack .../0-libnvme1t64_1.8-3_s390x.deb ... 219s Unpacking libnvme1t64 (1.8-3) ... 219s Preparing to unpack .../1-libblockdev-nvme3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev-nvme3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s Preparing to unpack .../2-libblockdev-mdraid3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev-mdraid3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s Preparing to unpack .../3-libblockdev-loop3_3.1.0-1build1_s390x.deb ... 219s Unpacking libblockdev-loop3:s390x (3.1.0-1build1) over (3.1.0-1) ... 219s Preparing to unpack .../4-e2fsprogs-l10n_1.47.0-2.4~exp1ubuntu2_all.deb ... 219s Unpacking e2fsprogs-l10n (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 219s Preparing to unpack .../5-logsave_1.47.0-2.4~exp1ubuntu2_s390x.deb ... 219s Unpacking logsave (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 219s dpkg: libext2fs2:s390x: dependency problems, but removing anyway as you requested: 219s libblockdev-fs3:s390x depends on libext2fs2 (>= 1.42.11). 219s e2fsprogs depends on libext2fs2 (= 1.47.0-2ubuntu1). 219s btrfs-progs depends on libext2fs2 (>= 1.42). 219s 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52175 files and directories currently installed.) 219s Removing libext2fs2:s390x (1.47.0-2ubuntu1) ... 219s Selecting previously unselected package libext2fs2t64:s390x. 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52168 files and directories currently installed.) 219s Preparing to unpack .../libext2fs2t64_1.47.0-2.4~exp1ubuntu2_s390x.deb ... 219s Adding 'diversion of /lib/s390x-linux-gnu/libe2p.so.2 to /lib/s390x-linux-gnu/libe2p.so.2.usr-is-merged by libext2fs2t64' 219s Adding 'diversion of /lib/s390x-linux-gnu/libe2p.so.2.3 to /lib/s390x-linux-gnu/libe2p.so.2.3.usr-is-merged by libext2fs2t64' 219s Adding 'diversion of /lib/s390x-linux-gnu/libext2fs.so.2 to /lib/s390x-linux-gnu/libext2fs.so.2.usr-is-merged by libext2fs2t64' 219s Adding 'diversion of /lib/s390x-linux-gnu/libext2fs.so.2.4 to /lib/s390x-linux-gnu/libext2fs.so.2.4.usr-is-merged by libext2fs2t64' 219s Unpacking libext2fs2t64:s390x (1.47.0-2.4~exp1ubuntu2) ... 219s Setting up libcom-err2:s390x (1.47.0-2.4~exp1ubuntu2) ... 219s Setting up libext2fs2t64:s390x (1.47.0-2.4~exp1ubuntu2) ... 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52184 files and directories currently installed.) 219s Preparing to unpack .../e2fsprogs_1.47.0-2.4~exp1ubuntu2_s390x.deb ... 219s Unpacking e2fsprogs (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 219s dpkg: libreiserfscore0: dependency problems, but removing anyway as you requested: 219s btrfs-progs depends on libreiserfscore0 (>= 1:3.6.27). 219s 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52184 files and directories currently installed.) 219s Removing libreiserfscore0 (1:3.6.27-7) ... 219s Selecting previously unselected package libreiserfscore0t64. 219s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52179 files and directories currently installed.) 219s Preparing to unpack .../libreiserfscore0t64_1%3a3.6.27-7.1_s390x.deb ... 219s Unpacking libreiserfscore0t64 (1:3.6.27-7.1) ... 219s Preparing to unpack .../btrfs-progs_6.6.3-1.1build1_s390x.deb ... 219s Unpacking btrfs-progs (6.6.3-1.1build1) over (6.6.3-1.1) ... 220s Preparing to unpack .../libblockdev-fs3_3.1.0-1build1_s390x.deb ... 220s Unpacking libblockdev-fs3:s390x (3.1.0-1build1) over (3.1.0-1) ... 220s Preparing to unpack .../libblockdev-crypto3_3.1.0-1build1_s390x.deb ... 220s Unpacking libblockdev-crypto3:s390x (3.1.0-1build1) over (3.1.0-1) ... 220s Preparing to unpack .../bolt_0.9.6-2build1_s390x.deb ... 220s Unpacking bolt (0.9.6-2build1) over (0.9.6-2) ... 220s dpkg: libglib2.0-0:s390x: dependency problems, but removing anyway as you requested: 220s s390-tools depends on libglib2.0-0 (>= 2.77.0). 220s libnetplan0:s390x depends on libglib2.0-0 (>= 2.75.3). 220s libjcat1:s390x depends on libglib2.0-0 (>= 2.75.3). 220s 220s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52185 files and directories currently installed.) 220s Removing libglib2.0-0:s390x (2.79.2-1~ubuntu1) ... 220s Selecting previously unselected package libglib2.0-0t64:s390x. 220s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52160 files and directories currently installed.) 220s Preparing to unpack .../0-libglib2.0-0t64_2.79.3-3ubuntu5_s390x.deb ... 220s libglib2.0-0t64.preinst: Removing /var/lib/dpkg/info/libglib2.0-0:s390x.postrm to avoid loss of /usr/share/glib-2.0/schemas/gschemas.compiled... 220s removed '/var/lib/dpkg/info/libglib2.0-0:s390x.postrm' 220s Unpacking libglib2.0-0t64:s390x (2.79.3-3ubuntu5) ... 220s Preparing to unpack .../1-libjcat1_0.2.0-2build2_s390x.deb ... 220s Unpacking libjcat1:s390x (0.2.0-2build2) over (0.2.0-2) ... 220s Preparing to unpack .../2-libldap2_2.6.7+dfsg-1~exp1ubuntu6_s390x.deb ... 220s Unpacking libldap2:s390x (2.6.7+dfsg-1~exp1ubuntu6) over (2.6.7+dfsg-1~exp1ubuntu1) ... 220s Preparing to unpack .../3-ubuntu-pro-client-l10n_31.2.2_s390x.deb ... 220s Unpacking ubuntu-pro-client-l10n (31.2.2) over (31.1) ... 220s Preparing to unpack .../4-ubuntu-pro-client_31.2.2_s390x.deb ... 220s Unpacking ubuntu-pro-client (31.2.2) over (31.1) ... 220s Preparing to unpack .../5-gnupg-utils_2.4.4-2ubuntu15_s390x.deb ... 220s Unpacking gnupg-utils (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 220s Preparing to unpack .../6-keyboxd_2.4.4-2ubuntu15_s390x.deb ... 220s Unpacking keyboxd (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 220s dpkg: libnpth0:s390x: dependency problems, but removing anyway as you requested: 220s gpgv depends on libnpth0 (>= 0.90). 220s gpgsm depends on libnpth0 (>= 0.90). 220s gpg-agent depends on libnpth0 (>= 0.90). 220s gpg depends on libnpth0 (>= 0.90). 220s dirmngr depends on libnpth0 (>= 0.90). 220s 220s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52185 files and directories currently installed.) 220s Removing libnpth0:s390x (1.6-3build2) ... 220s Selecting previously unselected package libnpth0t64:s390x. 220s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52180 files and directories currently installed.) 220s Preparing to unpack .../libnpth0t64_1.6-3.1_s390x.deb ... 220s Unpacking libnpth0t64:s390x (1.6-3.1) ... 220s Setting up libnpth0t64:s390x (1.6-3.1) ... 220s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52186 files and directories currently installed.) 220s Preparing to unpack .../gpgv_2.4.4-2ubuntu15_s390x.deb ... 220s Unpacking gpgv (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 220s Setting up gpgv (2.4.4-2ubuntu15) ... 220s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52186 files and directories currently installed.) 220s Preparing to unpack .../0-gpg-wks-client_2.4.4-2ubuntu15_s390x.deb ... 220s Unpacking gpg-wks-client (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 220s Preparing to unpack .../1-gpg-agent_2.4.4-2ubuntu15_s390x.deb ... 220s Unpacking gpg-agent (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 221s Preparing to unpack .../2-gpg_2.4.4-2ubuntu15_s390x.deb ... 221s Unpacking gpg (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 221s Preparing to unpack .../3-dirmngr_2.4.4-2ubuntu15_s390x.deb ... 221s Unpacking dirmngr (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 221s Preparing to unpack .../4-gnupg_2.4.4-2ubuntu15_all.deb ... 221s Unpacking gnupg (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 221s Preparing to unpack .../5-python3-apt_2.7.7_s390x.deb ... 221s Unpacking python3-apt (2.7.7) over (2.7.6) ... 221s Preparing to unpack .../6-apt-utils_2.7.14_s390x.deb ... 221s Unpacking apt-utils (2.7.14) over (2.7.12) ... 221s dpkg: libapt-pkg6.0:s390x: dependency problems, but removing anyway as you requested: 221s apt depends on libapt-pkg6.0 (>= 2.7.12). 221s 221s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52184 files and directories currently installed.) 221s Removing libapt-pkg6.0:s390x (2.7.12) ... 221s dpkg: libnettle8:s390x: dependency problems, but removing anyway as you requested: 221s libhogweed6:s390x depends on libnettle8. 221s libgnutls30:s390x depends on libnettle8 (>= 3.9~). 221s 221s Removing libnettle8:s390x (3.9.1-2) ... 221s Selecting previously unselected package libapt-pkg6.0t64:s390x. 221s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52128 files and directories currently installed.) 221s Preparing to unpack .../libapt-pkg6.0t64_2.7.14_s390x.deb ... 221s Unpacking libapt-pkg6.0t64:s390x (2.7.14) ... 221s Setting up libapt-pkg6.0t64:s390x (2.7.14) ... 221s Selecting previously unselected package libnettle8t64:s390x. 221s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52178 files and directories currently installed.) 221s Preparing to unpack .../libnettle8t64_3.9.1-2.2_s390x.deb ... 221s Unpacking libnettle8t64:s390x (3.9.1-2.2) ... 221s Setting up libnettle8t64:s390x (3.9.1-2.2) ... 221s dpkg: libhogweed6:s390x: dependency problems, but removing anyway as you requested: 221s libgnutls30:s390x depends on libhogweed6 (>= 3.6). 221s 221s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52186 files and directories currently installed.) 221s Removing libhogweed6:s390x (3.9.1-2) ... 221s Selecting previously unselected package libhogweed6t64:s390x. 221s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52181 files and directories currently installed.) 221s Preparing to unpack .../libhogweed6t64_3.9.1-2.2_s390x.deb ... 221s Unpacking libhogweed6t64:s390x (3.9.1-2.2) ... 221s Setting up libhogweed6t64:s390x (3.9.1-2.2) ... 221s dpkg: libgnutls30:s390x: dependency problems, but removing anyway as you requested: 221s apt depends on libgnutls30 (>= 3.8.1). 221s 221s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52187 files and directories currently installed.) 221s Removing libgnutls30:s390x (3.8.3-1ubuntu1) ... 221s Selecting previously unselected package libgnutls30t64:s390x. 222s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52178 files and directories currently installed.) 222s Preparing to unpack .../libgnutls30t64_3.8.3-1.1ubuntu2_s390x.deb ... 222s Unpacking libgnutls30t64:s390x (3.8.3-1.1ubuntu2) ... 222s Setting up libgnutls30t64:s390x (3.8.3-1.1ubuntu2) ... 222s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52206 files and directories currently installed.) 222s Preparing to unpack .../archives/apt_2.7.14_s390x.deb ... 222s Unpacking apt (2.7.14) over (2.7.12) ... 222s Setting up apt (2.7.14) ... 223s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52206 files and directories currently installed.) 223s Preparing to unpack .../gpgconf_2.4.4-2ubuntu15_s390x.deb ... 223s Unpacking gpgconf (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 223s Preparing to unpack .../gpgsm_2.4.4-2ubuntu15_s390x.deb ... 223s Unpacking gpgsm (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 223s dpkg: libreadline8:s390x: dependency problems, but removing anyway as you requested: 223s libpython3.12-stdlib:s390x depends on libreadline8 (>= 7.0~beta). 223s gawk depends on libreadline8 (>= 6.0). 223s fdisk depends on libreadline8 (>= 6.0). 223s 223s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52206 files and directories currently installed.) 223s Removing libreadline8:s390x (8.2-3) ... 223s Selecting previously unselected package libreadline8t64:s390x. 223s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52194 files and directories currently installed.) 223s Preparing to unpack .../libreadline8t64_8.2-4_s390x.deb ... 223s Adding 'diversion of /lib/s390x-linux-gnu/libhistory.so.8 to /lib/s390x-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' 223s Adding 'diversion of /lib/s390x-linux-gnu/libhistory.so.8.2 to /lib/s390x-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' 223s Adding 'diversion of /lib/s390x-linux-gnu/libreadline.so.8 to /lib/s390x-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' 223s Adding 'diversion of /lib/s390x-linux-gnu/libreadline.so.8.2 to /lib/s390x-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' 223s Unpacking libreadline8t64:s390x (8.2-4) ... 223s Setting up libreadline8t64:s390x (8.2-4) ... 223s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52214 files and directories currently installed.) 223s Preparing to unpack .../gawk_1%3a5.2.1-2build2_s390x.deb ... 223s Unpacking gawk (1:5.2.1-2build2) over (1:5.2.1-2) ... 223s Preparing to unpack .../fdisk_2.39.3-9ubuntu2_s390x.deb ... 223s Unpacking fdisk (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 223s Preparing to unpack .../libpython3.12-stdlib_3.12.2-4build3_s390x.deb ... 223s Unpacking libpython3.12-stdlib:s390x (3.12.2-4build3) over (3.12.2-1) ... 224s Preparing to unpack .../perl-base_5.38.2-3.2_s390x.deb ... 224s Unpacking perl-base (5.38.2-3.2) over (5.38.2-3) ... 224s Setting up perl-base (5.38.2-3.2) ... 224s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52212 files and directories currently installed.) 224s Preparing to unpack .../perl-modules-5.38_5.38.2-3.2_all.deb ... 224s Unpacking perl-modules-5.38 (5.38.2-3.2) over (5.38.2-3) ... 224s Preparing to unpack .../python3-gdbm_3.12.2-3ubuntu1.1_s390x.deb ... 224s Unpacking python3-gdbm:s390x (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 224s Preparing to unpack .../man-db_2.12.0-3build4_s390x.deb ... 224s Unpacking man-db (2.12.0-3build4) over (2.12.0-3) ... 224s dpkg: libgdbm-compat4:s390x: dependency problems, but removing anyway as you requested: 224s libperl5.38:s390x depends on libgdbm-compat4 (>= 1.18-3). 224s 225s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52212 files and directories currently installed.) 225s Removing libgdbm-compat4:s390x (1.23-5) ... 225s dpkg: libgdbm6:s390x: dependency problems, but removing anyway as you requested: 225s libperl5.38:s390x depends on libgdbm6 (>= 1.21). 225s 225s Removing libgdbm6:s390x (1.23-5) ... 225s Selecting previously unselected package libgdbm6t64:s390x. 225s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52202 files and directories currently installed.) 225s Preparing to unpack .../libgdbm6t64_1.23-5.1_s390x.deb ... 225s Unpacking libgdbm6t64:s390x (1.23-5.1) ... 225s Selecting previously unselected package libgdbm-compat4t64:s390x. 225s Preparing to unpack .../libgdbm-compat4t64_1.23-5.1_s390x.deb ... 225s Unpacking libgdbm-compat4t64:s390x (1.23-5.1) ... 225s dpkg: libperl5.38:s390x: dependency problems, but removing anyway as you requested: 225s perl depends on libperl5.38 (= 5.38.2-3). 225s 225s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52214 files and directories currently installed.) 225s Removing libperl5.38:s390x (5.38.2-3) ... 225s Selecting previously unselected package libperl5.38t64:s390x. 225s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 51692 files and directories currently installed.) 225s Preparing to unpack .../libperl5.38t64_5.38.2-3.2_s390x.deb ... 225s Unpacking libperl5.38t64:s390x (5.38.2-3.2) ... 225s Preparing to unpack .../perl_5.38.2-3.2_s390x.deb ... 225s Unpacking perl (5.38.2-3.2) over (5.38.2-3) ... 225s dpkg: libdb5.3:s390x: dependency problems, but removing anyway as you requested: 225s libsasl2-modules-db:s390x depends on libdb5.3. 225s libpam-modules:s390x depends on libdb5.3. 225s iproute2 depends on libdb5.3. 225s 225s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52214 files and directories currently installed.) 225s Removing libdb5.3:s390x (5.3.28+dfsg2-4) ... 225s Selecting previously unselected package libdb5.3t64:s390x. 225s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52208 files and directories currently installed.) 225s Preparing to unpack .../0-libdb5.3t64_5.3.28+dfsg2-6_s390x.deb ... 225s Unpacking libdb5.3t64:s390x (5.3.28+dfsg2-6) ... 225s Preparing to unpack .../1-libsasl2-modules-db_2.1.28+dfsg1-5ubuntu1_s390x.deb ... 225s Unpacking libsasl2-modules-db:s390x (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 225s Preparing to unpack .../2-libsasl2-2_2.1.28+dfsg1-5ubuntu1_s390x.deb ... 225s Unpacking libsasl2-2:s390x (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 225s Preparing to unpack .../3-libfido2-1_1.14.0-1build1_s390x.deb ... 225s Unpacking libfido2-1:s390x (1.14.0-1build1) over (1.14.0-1) ... 225s Preparing to unpack .../4-libcryptsetup12_2%3a2.7.0-1ubuntu2_s390x.deb ... 225s Unpacking libcryptsetup12:s390x (2:2.7.0-1ubuntu2) over (2:2.7.0-1ubuntu1) ... 226s Preparing to unpack .../5-dhcpcd-base_1%3a10.0.6-1ubuntu2_s390x.deb ... 226s Unpacking dhcpcd-base (1:10.0.6-1ubuntu2) over (1:10.0.6-1ubuntu1) ... 226s dpkg: libuv1:s390x: dependency problems, but removing anyway as you requested: 226s bind9-libs:s390x depends on libuv1 (>= 1.40.0). 226s 226s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52214 files and directories currently installed.) 226s Removing libuv1:s390x (1.48.0-1) ... 226s Selecting previously unselected package libuv1t64:s390x. 226s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52209 files and directories currently installed.) 226s Preparing to unpack .../libuv1t64_1.48.0-1.1_s390x.deb ... 226s Unpacking libuv1t64:s390x (1.48.0-1.1) ... 226s Preparing to unpack .../bind9-host_1%3a9.18.24-0ubuntu3_s390x.deb ... 226s Unpacking bind9-host (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 226s Preparing to unpack .../bind9-dnsutils_1%3a9.18.24-0ubuntu3_s390x.deb ... 226s Unpacking bind9-dnsutils (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 226s Preparing to unpack .../bind9-libs_1%3a9.18.24-0ubuntu3_s390x.deb ... 226s Unpacking bind9-libs:s390x (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 226s dpkg: libssl3:s390x: dependency problems, but removing anyway as you requested: 226s systemd depends on libssl3 (>= 3.0.0). 226s s390-tools depends on libssl3 (>= 3.0.0). 226s linux-headers-6.8.0-11-generic depends on libssl3 (>= 3.0.0). 226s 226s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 226s Removing libssl3:s390x (3.0.10-1ubuntu4) ... 226s Selecting previously unselected package libssl3t64:s390x. 226s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52204 files and directories currently installed.) 226s Preparing to unpack .../libssl3t64_3.0.13-0ubuntu2_s390x.deb ... 226s Unpacking libssl3t64:s390x (3.0.13-0ubuntu2) ... 226s Setting up libssl3t64:s390x (3.0.13-0ubuntu2) ... 226s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 226s Preparing to unpack .../libnss-systemd_255.4-1ubuntu5_s390x.deb ... 226s Unpacking libnss-systemd:s390x (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 226s Preparing to unpack .../libudev1_255.4-1ubuntu5_s390x.deb ... 226s Unpacking libudev1:s390x (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 226s Setting up libudev1:s390x (255.4-1ubuntu5) ... 226s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 226s Preparing to unpack .../systemd_255.4-1ubuntu5_s390x.deb ... 226s Unpacking systemd (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 227s Preparing to unpack .../udev_255.4-1ubuntu5_s390x.deb ... 227s Unpacking udev (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 227s Preparing to unpack .../libsystemd0_255.4-1ubuntu5_s390x.deb ... 227s Unpacking libsystemd0:s390x (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 227s Setting up libsystemd0:s390x (255.4-1ubuntu5) ... 227s Setting up libcryptsetup12:s390x (2:2.7.0-1ubuntu2) ... 227s Setting up libkmod2:s390x (31+20240202-2ubuntu4) ... 227s Setting up libsystemd-shared:s390x (255.4-1ubuntu5) ... 227s Setting up systemd-dev (255.4-1ubuntu5) ... 227s Setting up systemd (255.4-1ubuntu5) ... 228s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 228s Preparing to unpack .../systemd-sysv_255.4-1ubuntu5_s390x.deb ... 228s Unpacking systemd-sysv (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 228s Preparing to unpack .../libpam-systemd_255.4-1ubuntu5_s390x.deb ... 228s Unpacking libpam-systemd:s390x (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 228s Preparing to unpack .../libpam-modules-bin_1.5.3-5ubuntu3_s390x.deb ... 228s Unpacking libpam-modules-bin (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 228s Setting up libpam-modules-bin (1.5.3-5ubuntu3) ... 228s pam_namespace.service is a disabled or a static unit not running, not starting it. 229s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 229s Preparing to unpack .../libpam-modules_1.5.3-5ubuntu3_s390x.deb ... 229s Unpacking libpam-modules:s390x (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 229s Setting up libpam-modules:s390x (1.5.3-5ubuntu3) ... 229s Installing new version of config file /etc/security/namespace.init ... 229s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 229s Preparing to unpack .../libpam-runtime_1.5.3-5ubuntu3_all.deb ... 229s Unpacking libpam-runtime (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 229s Setting up libpam-runtime (1.5.3-5ubuntu3) ... 229s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 229s Preparing to unpack .../0-dbus-user-session_1.14.10-4ubuntu2_s390x.deb ... 229s Unpacking dbus-user-session (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 229s Preparing to unpack .../1-libapparmor1_4.0.0-beta3-0ubuntu2_s390x.deb ... 229s Unpacking libapparmor1:s390x (4.0.0-beta3-0ubuntu2) over (4.0.0~alpha4-0ubuntu1) ... 229s Preparing to unpack .../2-libexpat1_2.6.1-2_s390x.deb ... 229s Unpacking libexpat1:s390x (2.6.1-2) over (2.6.0-1) ... 229s Preparing to unpack .../3-dbus-system-bus-common_1.14.10-4ubuntu2_all.deb ... 229s Unpacking dbus-system-bus-common (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 229s Preparing to unpack .../4-dbus-bin_1.14.10-4ubuntu2_s390x.deb ... 229s Unpacking dbus-bin (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 229s Preparing to unpack .../5-dbus_1.14.10-4ubuntu2_s390x.deb ... 229s Unpacking dbus (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 229s Preparing to unpack .../6-dbus-daemon_1.14.10-4ubuntu2_s390x.deb ... 229s Unpacking dbus-daemon (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 229s Preparing to unpack .../7-libdbus-1-3_1.14.10-4ubuntu2_s390x.deb ... 229s Unpacking libdbus-1-3:s390x (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 229s Preparing to unpack .../8-libmount1_2.39.3-9ubuntu2_s390x.deb ... 229s Unpacking libmount1:s390x (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 229s Setting up libmount1:s390x (2.39.3-9ubuntu2) ... 229s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 229s Preparing to unpack .../libseccomp2_2.5.5-1ubuntu2_s390x.deb ... 229s Unpacking libseccomp2:s390x (2.5.5-1ubuntu2) over (2.5.5-1ubuntu1) ... 229s Setting up libseccomp2:s390x (2.5.5-1ubuntu2) ... 229s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 229s Preparing to unpack .../libdevmapper1.02.1_2%3a1.02.185-3ubuntu2_s390x.deb ... 229s Unpacking libdevmapper1.02.1:s390x (2:1.02.185-3ubuntu2) over (2:1.02.185-3ubuntu1) ... 229s Preparing to unpack .../libuuid1_2.39.3-9ubuntu2_s390x.deb ... 229s Unpacking libuuid1:s390x (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 229s Setting up libuuid1:s390x (2.39.3-9ubuntu2) ... 229s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 229s Preparing to unpack .../libfdisk1_2.39.3-9ubuntu2_s390x.deb ... 229s Unpacking libfdisk1:s390x (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 230s Preparing to unpack .../mount_2.39.3-9ubuntu2_s390x.deb ... 230s Unpacking mount (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 230s Preparing to unpack .../libsqlite3-0_3.45.1-1ubuntu1_s390x.deb ... 230s Unpacking libsqlite3-0:s390x (3.45.1-1ubuntu1) over (3.45.1-1) ... 230s Preparing to unpack .../gcc-14-base_14-20240315-1ubuntu1_s390x.deb ... 230s Unpacking gcc-14-base:s390x (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 230s Setting up gcc-14-base:s390x (14-20240315-1ubuntu1) ... 230s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 230s Preparing to unpack .../libgcc-s1_14-20240315-1ubuntu1_s390x.deb ... 230s Unpacking libgcc-s1:s390x (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 230s Setting up libgcc-s1:s390x (14-20240315-1ubuntu1) ... 230s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 230s Preparing to unpack .../libstdc++6_14-20240315-1ubuntu1_s390x.deb ... 230s Unpacking libstdc++6:s390x (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 230s Setting up libstdc++6:s390x (14-20240315-1ubuntu1) ... 230s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 230s Preparing to unpack .../dpkg_1.22.6ubuntu5_s390x.deb ... 230s Unpacking dpkg (1.22.6ubuntu5) over (1.22.4ubuntu5) ... 230s Setting up dpkg (1.22.6ubuntu5) ... 231s Setting up libpython3.12-minimal:s390x (3.12.2-4build3) ... 231s Setting up libexpat1:s390x (2.6.1-2) ... 231s Setting up python3.12-minimal (3.12.2-4build3) ... 233s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 233s Preparing to unpack .../python3-minimal_3.12.2-0ubuntu1_s390x.deb ... 233s Unpacking python3-minimal (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 233s Setting up python3-minimal (3.12.2-0ubuntu1) ... 233s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 233s Preparing to unpack .../python3_3.12.2-0ubuntu1_s390x.deb ... 233s Unpacking python3 (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 233s Preparing to unpack .../libpython3-stdlib_3.12.2-0ubuntu1_s390x.deb ... 233s Unpacking libpython3-stdlib:s390x (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 233s Preparing to unpack .../libsmartcols1_2.39.3-9ubuntu2_s390x.deb ... 233s Unpacking libsmartcols1:s390x (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 233s Setting up libsmartcols1:s390x (2.39.3-9ubuntu2) ... 233s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 233s Preparing to unpack .../0-bsdextrautils_2.39.3-9ubuntu2_s390x.deb ... 233s Unpacking bsdextrautils (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 233s Preparing to unpack .../1-groff-base_1.23.0-3build1_s390x.deb ... 233s Unpacking groff-base (1.23.0-3build1) over (1.23.0-3) ... 233s Preparing to unpack .../2-pinentry-curses_1.2.1-3ubuntu4_s390x.deb ... 233s Unpacking pinentry-curses (1.2.1-3ubuntu4) over (1.2.1-3ubuntu1) ... 233s Preparing to unpack .../3-readline-common_8.2-4_all.deb ... 233s Unpacking readline-common (8.2-4) over (8.2-3) ... 234s Preparing to unpack .../4-libxml2_2.9.14+dfsg-1.3ubuntu2_s390x.deb ... 234s Unpacking libxml2:s390x (2.9.14+dfsg-1.3ubuntu2) over (2.9.14+dfsg-1.3ubuntu1) ... 234s Preparing to unpack .../5-libbpf1_1%3a1.3.0-2build1_s390x.deb ... 234s Unpacking libbpf1:s390x (1:1.3.0-2build1) over (1:1.3.0-2) ... 234s dpkg: libelf1:s390x: dependency problems, but removing anyway as you requested: 234s linux-headers-6.8.0-11-generic depends on libelf1 (>= 0.144). 234s iproute2 depends on libelf1 (>= 0.131). 234s 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 234s Removing libelf1:s390x (0.190-1) ... 234s Selecting previously unselected package libelf1t64:s390x. 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52210 files and directories currently installed.) 234s Preparing to unpack .../libelf1t64_0.190-1.1build2_s390x.deb ... 234s Unpacking libelf1t64:s390x (0.190-1.1build2) ... 234s Preparing to unpack .../libtirpc-common_1.3.4+ds-1.1_all.deb ... 234s Unpacking libtirpc-common (1.3.4+ds-1.1) over (1.3.4+ds-1build1) ... 234s Preparing to unpack .../lsof_4.95.0-1build2_s390x.deb ... 234s Unpacking lsof (4.95.0-1build2) over (4.95.0-1build1) ... 234s Preparing to unpack .../libnsl2_1.3.0-3build2_s390x.deb ... 234s Unpacking libnsl2:s390x (1.3.0-3build2) over (1.3.0-3) ... 234s dpkg: libtirpc3:s390x: dependency problems, but removing anyway as you requested: 234s iproute2 depends on libtirpc3 (>= 1.0.2). 234s 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 234s Removing libtirpc3:s390x (1.3.4+ds-1build1) ... 234s Selecting previously unselected package libtirpc3t64:s390x. 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52209 files and directories currently installed.) 234s Preparing to unpack .../0-libtirpc3t64_1.3.4+ds-1.1_s390x.deb ... 234s Adding 'diversion of /lib/s390x-linux-gnu/libtirpc.so.3 to /lib/s390x-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64' 234s Adding 'diversion of /lib/s390x-linux-gnu/libtirpc.so.3.0.0 to /lib/s390x-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' 234s Unpacking libtirpc3t64:s390x (1.3.4+ds-1.1) ... 234s Preparing to unpack .../1-iproute2_6.1.0-1ubuntu5_s390x.deb ... 234s Unpacking iproute2 (6.1.0-1ubuntu5) over (6.1.0-1ubuntu2) ... 234s Preparing to unpack .../2-python3-yaml_6.0.1-2build1_s390x.deb ... 234s Unpacking python3-yaml (6.0.1-2build1) over (6.0.1-2) ... 234s Preparing to unpack .../3-libusb-1.0-0_2%3a1.0.27-1_s390x.deb ... 234s Unpacking libusb-1.0-0:s390x (2:1.0.27-1) over (2:1.0.26-1) ... 234s Preparing to unpack .../4-libprotobuf-c1_1.4.1-1ubuntu3_s390x.deb ... 234s Unpacking libprotobuf-c1:s390x (1.4.1-1ubuntu3) over (1.4.1-1ubuntu2) ... 234s Preparing to unpack .../5-libnghttp2-14_1.59.0-1build1_s390x.deb ... 234s Unpacking libnghttp2-14:s390x (1.59.0-1build1) over (1.59.0-1) ... 234s Preparing to unpack .../6-libproc2-0_2%3a4.0.4-4ubuntu2_s390x.deb ... 234s Unpacking libproc2-0:s390x (2:4.0.4-4ubuntu2) over (2:4.0.4-4ubuntu1) ... 234s Preparing to unpack .../7-procps_2%3a4.0.4-4ubuntu2_s390x.deb ... 234s Unpacking procps (2:4.0.4-4ubuntu2) over (2:4.0.4-4ubuntu1) ... 234s Preparing to unpack .../8-coreutils_9.4-3ubuntu3_s390x.deb ... 234s Unpacking coreutils (9.4-3ubuntu3) over (9.4-2ubuntu4) ... 234s Setting up coreutils (9.4-3ubuntu3) ... 234s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52220 files and directories currently installed.) 234s Preparing to unpack .../util-linux_2.39.3-9ubuntu2_s390x.deb ... 234s Unpacking util-linux (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 235s Setting up util-linux (2.39.3-9ubuntu2) ... 236s fstrim.service is a disabled or a static unit not running, not starting it. 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52220 files and directories currently installed.) 236s Removing libatm1:s390x (1:2.5.1-5) ... 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 236s Preparing to unpack .../file_1%3a5.45-3_s390x.deb ... 236s Unpacking file (1:5.45-3) over (1:5.45-2) ... 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52215 files and directories currently installed.) 236s Removing libmagic1:s390x (1:5.45-2) ... 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52205 files and directories currently installed.) 236s Preparing to unpack .../libmagic-mgc_1%3a5.45-3_s390x.deb ... 236s Unpacking libmagic-mgc (1:5.45-3) over (1:5.45-2) ... 236s Selecting previously unselected package libmagic1t64:s390x. 236s Preparing to unpack .../libmagic1t64_1%3a5.45-3_s390x.deb ... 236s Unpacking libmagic1t64:s390x (1:5.45-3) ... 236s Preparing to unpack .../libplymouth5_24.004.60-1ubuntu6_s390x.deb ... 236s Unpacking libplymouth5:s390x (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52216 files and directories currently installed.) 236s Removing libpng16-16:s390x (1.6.43-1) ... 236s Selecting previously unselected package libpng16-16t64:s390x. 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52206 files and directories currently installed.) 236s Preparing to unpack .../libpng16-16t64_1.6.43-3_s390x.deb ... 236s Unpacking libpng16-16t64:s390x (1.6.43-3) ... 236s Preparing to unpack .../multipath-tools_0.9.4-5ubuntu6_s390x.deb ... 236s Unpacking multipath-tools (0.9.4-5ubuntu6) over (0.9.4-5ubuntu3) ... 236s dpkg: liburcu8:s390x: dependency problems, but removing anyway as you requested: 236s xfsprogs depends on liburcu8 (>= 0.13.0). 236s 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52216 files and directories currently installed.) 236s Removing liburcu8:s390x (0.14.0-3) ... 236s Selecting previously unselected package liburcu8t64:s390x. 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52197 files and directories currently installed.) 236s Preparing to unpack .../liburcu8t64_0.14.0-3.1_s390x.deb ... 236s Unpacking liburcu8t64:s390x (0.14.0-3.1) ... 236s Preparing to unpack .../liblocale-gettext-perl_1.07-6ubuntu4_s390x.deb ... 236s Unpacking liblocale-gettext-perl (1.07-6ubuntu4) over (1.07-6build1) ... 236s Preparing to unpack .../uuid-runtime_2.39.3-9ubuntu2_s390x.deb ... 236s Unpacking uuid-runtime (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 236s Preparing to unpack .../libdebconfclient0_0.271ubuntu2_s390x.deb ... 236s Unpacking libdebconfclient0:s390x (0.271ubuntu2) over (0.271ubuntu1) ... 236s Setting up libdebconfclient0:s390x (0.271ubuntu2) ... 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 236s Preparing to unpack .../libsemanage-common_3.5-1build4_all.deb ... 236s Unpacking libsemanage-common (3.5-1build4) over (3.5-1build2) ... 236s Setting up libsemanage-common (3.5-1build4) ... 236s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 236s Preparing to unpack .../libsemanage2_3.5-1build4_s390x.deb ... 236s Unpacking libsemanage2:s390x (3.5-1build4) over (3.5-1build2) ... 237s Setting up libsemanage2:s390x (3.5-1build4) ... 237s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 237s Preparing to unpack .../install-info_7.1-3build1_s390x.deb ... 237s Unpacking install-info (7.1-3build1) over (7.1-3) ... 237s Setting up install-info (7.1-3build1) ... 237s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 52217 files and directories currently installed.) 237s Preparing to unpack .../000-gcc-13-base_13.2.0-21ubuntu1_s390x.deb ... 237s Unpacking gcc-13-base:s390x (13.2.0-21ubuntu1) over (13.2.0-17ubuntu2) ... 237s Preparing to unpack .../001-libss2_1.47.0-2.4~exp1ubuntu2_s390x.deb ... 237s Unpacking libss2:s390x (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 237s Preparing to unpack .../002-dmsetup_2%3a1.02.185-3ubuntu2_s390x.deb ... 237s Unpacking dmsetup (2:1.02.185-3ubuntu2) over (2:1.02.185-3ubuntu1) ... 237s Preparing to unpack .../003-eject_2.39.3-9ubuntu2_s390x.deb ... 237s Unpacking eject (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 237s Preparing to unpack .../004-krb5-locales_1.20.1-6ubuntu1_all.deb ... 237s Unpacking krb5-locales (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 237s Preparing to unpack .../005-libglib2.0-data_2.79.3-3ubuntu5_all.deb ... 237s Unpacking libglib2.0-data (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 237s Preparing to unpack .../006-libslang2_2.3.3-3build1_s390x.deb ... 237s Unpacking libslang2:s390x (2.3.3-3build1) over (2.3.3-3) ... 237s Preparing to unpack .../007-libtext-charwidth-perl_0.04-11build2_s390x.deb ... 237s Unpacking libtext-charwidth-perl:s390x (0.04-11build2) over (0.04-11build1) ... 237s Preparing to unpack .../008-libtext-iconv-perl_1.7-8build2_s390x.deb ... 237s Unpacking libtext-iconv-perl:s390x (1.7-8build2) over (1.7-8build1) ... 237s Preparing to unpack .../009-python-apt-common_2.7.7_all.deb ... 237s Unpacking python-apt-common (2.7.7) over (2.7.6) ... 237s Preparing to unpack .../010-python3-setuptools_68.1.2-2ubuntu1_all.deb ... 237s Unpacking python3-setuptools (68.1.2-2ubuntu1) over (68.1.2-2) ... 237s Preparing to unpack .../011-python3-pkg-resources_68.1.2-2ubuntu1_all.deb ... 237s Unpacking python3-pkg-resources (68.1.2-2ubuntu1) over (68.1.2-2) ... 238s Preparing to unpack .../012-rsyslog_8.2312.0-3ubuntu7_s390x.deb ... 238s Unpacking rsyslog (8.2312.0-3ubuntu7) over (8.2312.0-3ubuntu3) ... 238s Preparing to unpack .../013-vim-tiny_2%3a9.1.0016-1ubuntu6_s390x.deb ... 238s Unpacking vim-tiny (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 238s Preparing to unpack .../014-vim-common_2%3a9.1.0016-1ubuntu6_all.deb ... 238s Unpacking vim-common (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 238s Selecting previously unselected package xdg-user-dirs. 238s Preparing to unpack .../015-xdg-user-dirs_0.18-1_s390x.deb ... 238s Unpacking xdg-user-dirs (0.18-1) ... 238s Preparing to unpack .../016-xxd_2%3a9.1.0016-1ubuntu6_s390x.deb ... 238s Unpacking xxd (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 238s Preparing to unpack .../017-apparmor_4.0.0-beta3-0ubuntu2_s390x.deb ... 238s Unpacking apparmor (4.0.0-beta3-0ubuntu2) over (4.0.0~alpha4-0ubuntu1) ... 239s Preparing to unpack .../018-ftp_20230507-2build1_all.deb ... 239s Unpacking ftp (20230507-2build1) over (20230507-2) ... 239s Preparing to unpack .../019-inetutils-telnet_2%3a2.5-3ubuntu3_s390x.deb ... 239s Unpacking inetutils-telnet (2:2.5-3ubuntu3) over (2:2.5-3ubuntu1) ... 239s Preparing to unpack .../020-info_7.1-3build1_s390x.deb ... 239s Unpacking info (7.1-3build1) over (7.1-3) ... 239s Preparing to unpack .../021-libxmuu1_2%3a1.1.3-3build1_s390x.deb ... 239s Unpacking libxmuu1:s390x (2:1.1.3-3build1) over (2:1.1.3-3) ... 239s Preparing to unpack .../022-lshw_02.19.git.2021.06.19.996aaad9c7-2build2_s390x.deb ... 239s Unpacking lshw (02.19.git.2021.06.19.996aaad9c7-2build2) over (02.19.git.2021.06.19.996aaad9c7-2build1) ... 239s Selecting previously unselected package manpages. 239s Preparing to unpack .../023-manpages_6.05.01-1_all.deb ... 239s Unpacking manpages (6.05.01-1) ... 239s Preparing to unpack .../024-mtr-tiny_0.95-1.1build1_s390x.deb ... 239s Unpacking mtr-tiny (0.95-1.1build1) over (0.95-1.1) ... 239s Preparing to unpack .../025-plymouth-theme-ubuntu-text_24.004.60-1ubuntu6_s390x.deb ... 239s Unpacking plymouth-theme-ubuntu-text (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 239s Preparing to unpack .../026-plymouth_24.004.60-1ubuntu6_s390x.deb ... 239s Unpacking plymouth (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 239s Preparing to unpack .../027-telnet_0.17+2.5-3ubuntu3_all.deb ... 239s Unpacking telnet (0.17+2.5-3ubuntu3) over (0.17+2.5-3ubuntu1) ... 239s Preparing to unpack .../028-usb.ids_2024.03.18-1_all.deb ... 239s Unpacking usb.ids (2024.03.18-1) over (2024.01.30-1) ... 239s Preparing to unpack .../029-xz-utils_5.6.0-0.2_s390x.deb ... 239s Unpacking xz-utils (5.6.0-0.2) over (5.4.5-0.3) ... 240s Preparing to unpack .../030-libctf0_2.42-4ubuntu1_s390x.deb ... 240s Unpacking libctf0:s390x (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Preparing to unpack .../031-libctf-nobfd0_2.42-4ubuntu1_s390x.deb ... 240s Unpacking libctf-nobfd0:s390x (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Preparing to unpack .../032-binutils-s390x-linux-gnu_2.42-4ubuntu1_s390x.deb ... 240s Unpacking binutils-s390x-linux-gnu (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Preparing to unpack .../033-libbinutils_2.42-4ubuntu1_s390x.deb ... 240s Unpacking libbinutils:s390x (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Preparing to unpack .../034-binutils_2.42-4ubuntu1_s390x.deb ... 240s Unpacking binutils (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Preparing to unpack .../035-binutils-common_2.42-4ubuntu1_s390x.deb ... 240s Unpacking binutils-common:s390x (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Preparing to unpack .../036-libsframe1_2.42-4ubuntu1_s390x.deb ... 240s Unpacking libsframe1:s390x (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 240s Selecting previously unselected package libllvm18:s390x. 240s Preparing to unpack .../037-libllvm18_1%3a18.1.2-1ubuntu2_s390x.deb ... 240s Unpacking libllvm18:s390x (1:18.1.2-1ubuntu2) ... 242s Selecting previously unselected package libclang-cpp18. 242s Preparing to unpack .../038-libclang-cpp18_1%3a18.1.2-1ubuntu2_s390x.deb ... 242s Unpacking libclang-cpp18 (1:18.1.2-1ubuntu2) ... 243s Selecting previously unselected package libbpfcc:s390x. 243s Preparing to unpack .../039-libbpfcc_0.29.1+ds-1ubuntu4_s390x.deb ... 243s Unpacking libbpfcc:s390x (0.29.1+ds-1ubuntu4) ... 243s Selecting previously unselected package python3-bpfcc. 243s Preparing to unpack .../040-python3-bpfcc_0.29.1+ds-1ubuntu4_all.deb ... 243s Unpacking python3-bpfcc (0.29.1+ds-1ubuntu4) ... 243s Selecting previously unselected package ieee-data. 243s Preparing to unpack .../041-ieee-data_20220827.1_all.deb ... 243s Unpacking ieee-data (20220827.1) ... 243s Selecting previously unselected package python3-netaddr. 243s Preparing to unpack .../042-python3-netaddr_0.8.0-2ubuntu1_all.deb ... 243s Unpacking python3-netaddr (0.8.0-2ubuntu1) ... 243s Selecting previously unselected package bpfcc-tools. 243s Preparing to unpack .../043-bpfcc-tools_0.29.1+ds-1ubuntu4_all.deb ... 243s Unpacking bpfcc-tools (0.29.1+ds-1ubuntu4) ... 243s Selecting previously unselected package libclang1-18. 243s Preparing to unpack .../044-libclang1-18_1%3a18.1.2-1ubuntu2_s390x.deb ... 243s Unpacking libclang1-18 (1:18.1.2-1ubuntu2) ... 243s Selecting previously unselected package libdw1t64:s390x. 243s Preparing to unpack .../045-libdw1t64_0.190-1.1build2_s390x.deb ... 243s Unpacking libdw1t64:s390x (0.190-1.1build2) ... 243s Selecting previously unselected package bpftrace. 243s Preparing to unpack .../046-bpftrace_0.20.2-1ubuntu1_s390x.deb ... 243s Unpacking bpftrace (0.20.2-1ubuntu1) ... 244s Preparing to unpack .../047-cryptsetup-bin_2%3a2.7.0-1ubuntu2_s390x.deb ... 244s Unpacking cryptsetup-bin (2:2.7.0-1ubuntu2) over (2:2.7.0-1ubuntu1) ... 244s Preparing to unpack .../048-dpkg-dev_1.22.6ubuntu5_all.deb ... 244s Unpacking dpkg-dev (1.22.6ubuntu5) over (1.22.4ubuntu5) ... 244s Preparing to unpack .../049-libdpkg-perl_1.22.6ubuntu5_all.deb ... 244s Unpacking libdpkg-perl (1.22.6ubuntu5) over (1.22.4ubuntu5) ... 244s Selecting previously unselected package fonts-dejavu-mono. 244s Preparing to unpack .../050-fonts-dejavu-mono_2.37-8_all.deb ... 244s Unpacking fonts-dejavu-mono (2.37-8) ... 244s Selecting previously unselected package fonts-dejavu-core. 244s Preparing to unpack .../051-fonts-dejavu-core_2.37-8_all.deb ... 244s Unpacking fonts-dejavu-core (2.37-8) ... 244s Selecting previously unselected package fontconfig-config. 244s Preparing to unpack .../052-fontconfig-config_2.15.0-1.1ubuntu1_s390x.deb ... 244s Unpacking fontconfig-config (2.15.0-1.1ubuntu1) ... 244s Preparing to unpack .../053-gnupg-l10n_2.4.4-2ubuntu15_all.deb ... 244s Unpacking gnupg-l10n (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 244s Selecting previously unselected package hwdata. 244s Preparing to unpack .../054-hwdata_0.379-1_all.deb ... 244s Unpacking hwdata (0.379-1) ... 244s Preparing to unpack .../055-libibverbs1_50.0-2build1_s390x.deb ... 244s Unpacking libibverbs1:s390x (50.0-2build1) over (50.0-2) ... 244s Preparing to unpack .../056-ibverbs-providers_50.0-2build1_s390x.deb ... 244s Unpacking ibverbs-providers:s390x (50.0-2build1) over (50.0-2) ... 244s Preparing to unpack .../057-jq_1.7.1-3_s390x.deb ... 244s Unpacking jq (1.7.1-3) over (1.7.1-2) ... 244s Preparing to unpack .../058-libjq1_1.7.1-3_s390x.deb ... 244s Unpacking libjq1:s390x (1.7.1-3) over (1.7.1-2) ... 244s Selecting previously unselected package libaio1t64:s390x. 244s Preparing to unpack .../059-libaio1t64_0.3.113-6_s390x.deb ... 244s Unpacking libaio1t64:s390x (0.3.113-6) ... 244s Selecting previously unselected package libatm1t64:s390x. 244s Preparing to unpack .../060-libatm1t64_1%3a2.5.1-5.1_s390x.deb ... 244s Unpacking libatm1t64:s390x (1:2.5.1-5.1) ... 244s Selecting previously unselected package libc-dev-bin. 244s Preparing to unpack .../061-libc-dev-bin_2.39-0ubuntu6_s390x.deb ... 244s Unpacking libc-dev-bin (2.39-0ubuntu6) ... 244s Selecting previously unselected package libfreetype6:s390x. 244s Preparing to unpack .../062-libfreetype6_2.13.2+dfsg-1build2_s390x.deb ... 244s Unpacking libfreetype6:s390x (2.13.2+dfsg-1build2) ... 244s Selecting previously unselected package libfontconfig1:s390x. 244s Preparing to unpack .../063-libfontconfig1_2.15.0-1.1ubuntu1_s390x.deb ... 244s Unpacking libfontconfig1:s390x (2.15.0-1.1ubuntu1) ... 244s Selecting previously unselected package libjpeg-turbo8:s390x. 244s Preparing to unpack .../064-libjpeg-turbo8_2.1.5-2ubuntu1_s390x.deb ... 244s Unpacking libjpeg-turbo8:s390x (2.1.5-2ubuntu1) ... 244s Selecting previously unselected package libjpeg8:s390x. 244s Preparing to unpack .../065-libjpeg8_8c-2ubuntu11_s390x.deb ... 244s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 244s Selecting previously unselected package libdeflate0:s390x. 244s Preparing to unpack .../066-libdeflate0_1.19-1_s390x.deb ... 244s Unpacking libdeflate0:s390x (1.19-1) ... 244s Selecting previously unselected package libjbig0:s390x. 244s Preparing to unpack .../067-libjbig0_2.1-6.1ubuntu1_s390x.deb ... 244s Unpacking libjbig0:s390x (2.1-6.1ubuntu1) ... 245s Selecting previously unselected package libsharpyuv0:s390x. 245s Preparing to unpack .../068-libsharpyuv0_1.3.2-0.4build2_s390x.deb ... 245s Unpacking libsharpyuv0:s390x (1.3.2-0.4build2) ... 245s Selecting previously unselected package libwebp7:s390x. 245s Preparing to unpack .../069-libwebp7_1.3.2-0.4build2_s390x.deb ... 245s Unpacking libwebp7:s390x (1.3.2-0.4build2) ... 245s Selecting previously unselected package libtiff6:s390x. 245s Preparing to unpack .../070-libtiff6_4.5.1+git230720-4ubuntu1_s390x.deb ... 245s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu1) ... 245s Selecting previously unselected package libxpm4:s390x. 245s Preparing to unpack .../071-libxpm4_1%3a3.5.17-1build1_s390x.deb ... 245s Unpacking libxpm4:s390x (1:3.5.17-1build1) ... 245s Selecting previously unselected package libgd3:s390x. 245s Preparing to unpack .../072-libgd3_2.3.3-9ubuntu3_s390x.deb ... 245s Unpacking libgd3:s390x (2.3.3-9ubuntu3) ... 245s Selecting previously unselected package libc-devtools. 245s Preparing to unpack .../073-libc-devtools_2.39-0ubuntu6_s390x.deb ... 245s Unpacking libc-devtools (2.39-0ubuntu6) ... 245s Selecting previously unselected package linux-libc-dev:s390x. 245s Preparing to unpack .../074-linux-libc-dev_6.8.0-20.20_s390x.deb ... 245s Unpacking linux-libc-dev:s390x (6.8.0-20.20) ... 245s Selecting previously unselected package libcrypt-dev:s390x. 245s Preparing to unpack .../075-libcrypt-dev_1%3a4.4.36-4_s390x.deb ... 245s Unpacking libcrypt-dev:s390x (1:4.4.36-4) ... 245s Selecting previously unselected package rpcsvc-proto. 245s Preparing to unpack .../076-rpcsvc-proto_1.4.2-0ubuntu6_s390x.deb ... 245s Unpacking rpcsvc-proto (1.4.2-0ubuntu6) ... 245s Selecting previously unselected package libc6-dev:s390x. 245s Preparing to unpack .../077-libc6-dev_2.39-0ubuntu6_s390x.deb ... 245s Unpacking libc6-dev:s390x (2.39-0ubuntu6) ... 245s Preparing to unpack .../078-libevent-core-2.1-7_2.1.12-stable-9build1_s390x.deb ... 245s Unpacking libevent-core-2.1-7:s390x (2.1.12-stable-9build1) over (2.1.12-stable-9) ... 245s Preparing to unpack .../079-libftdi1-2_1.5-6build4_s390x.deb ... 245s Unpacking libftdi1-2:s390x (1.5-6build4) over (1.5-6build3) ... 245s Preparing to unpack .../080-libldap-common_2.6.7+dfsg-1~exp1ubuntu6_all.deb ... 245s Unpacking libldap-common (2.6.7+dfsg-1~exp1ubuntu6) over (2.6.7+dfsg-1~exp1ubuntu1) ... 245s Selecting previously unselected package linux-modules-6.8.0-20-generic. 245s Preparing to unpack .../081-linux-modules-6.8.0-20-generic_6.8.0-20.20_s390x.deb ... 245s Unpacking linux-modules-6.8.0-20-generic (6.8.0-20.20) ... 245s Selecting previously unselected package linux-image-6.8.0-20-generic. 245s Preparing to unpack .../082-linux-image-6.8.0-20-generic_6.8.0-20.20_s390x.deb ... 245s Unpacking linux-image-6.8.0-20-generic (6.8.0-20.20) ... 246s Selecting previously unselected package linux-modules-extra-6.8.0-20-generic. 246s Preparing to unpack .../083-linux-modules-extra-6.8.0-20-generic_6.8.0-20.20_s390x.deb ... 246s Unpacking linux-modules-extra-6.8.0-20-generic (6.8.0-20.20) ... 246s Preparing to unpack .../084-linux-generic_6.8.0-20.20+1_s390x.deb ... 246s Unpacking linux-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 246s Preparing to unpack .../085-linux-image-generic_6.8.0-20.20+1_s390x.deb ... 246s Unpacking linux-image-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 246s Preparing to unpack .../086-linux-virtual_6.8.0-20.20+1_s390x.deb ... 246s Unpacking linux-virtual (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 246s Preparing to unpack .../087-linux-image-virtual_6.8.0-20.20+1_s390x.deb ... 246s Unpacking linux-image-virtual (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 246s Preparing to unpack .../088-linux-headers-virtual_6.8.0-20.20+1_s390x.deb ... 246s Unpacking linux-headers-virtual (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 246s Selecting previously unselected package linux-headers-6.8.0-20. 246s Preparing to unpack .../089-linux-headers-6.8.0-20_6.8.0-20.20_all.deb ... 246s Unpacking linux-headers-6.8.0-20 (6.8.0-20.20) ... 249s Selecting previously unselected package linux-headers-6.8.0-20-generic. 249s Preparing to unpack .../090-linux-headers-6.8.0-20-generic_6.8.0-20.20_s390x.deb ... 249s Unpacking linux-headers-6.8.0-20-generic (6.8.0-20.20) ... 250s Preparing to unpack .../091-linux-headers-generic_6.8.0-20.20+1_s390x.deb ... 250s Unpacking linux-headers-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 250s Selecting previously unselected package linux-tools-common. 250s Preparing to unpack .../092-linux-tools-common_6.8.0-20.20_all.deb ... 250s Unpacking linux-tools-common (6.8.0-20.20) ... 250s Selecting previously unselected package linux-tools-6.8.0-20. 250s Preparing to unpack .../093-linux-tools-6.8.0-20_6.8.0-20.20_s390x.deb ... 250s Unpacking linux-tools-6.8.0-20 (6.8.0-20.20) ... 250s Selecting previously unselected package linux-tools-6.8.0-20-generic. 250s Preparing to unpack .../094-linux-tools-6.8.0-20-generic_6.8.0-20.20_s390x.deb ... 250s Unpacking linux-tools-6.8.0-20-generic (6.8.0-20.20) ... 250s Selecting previously unselected package manpages-dev. 250s Preparing to unpack .../095-manpages-dev_6.05.01-1_all.deb ... 250s Unpacking manpages-dev (6.05.01-1) ... 250s Preparing to unpack .../096-python3-distutils_3.12.2-3ubuntu1.1_all.deb ... 250s Unpacking python3-distutils (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 250s Preparing to unpack .../097-python3-lib2to3_3.12.2-3ubuntu1.1_all.deb ... 250s Unpacking python3-lib2to3 (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 251s Preparing to unpack .../098-python3-pyrsistent_0.20.0-1build1_s390x.deb ... 251s Unpacking python3-pyrsistent:s390x (0.20.0-1build1) over (0.20.0-1) ... 251s Preparing to unpack .../099-python3-typing-extensions_4.10.0-1_all.deb ... 251s Unpacking python3-typing-extensions (4.10.0-1) over (4.9.0-1) ... 251s Preparing to unpack .../100-s390-tools-data_2.31.0-0ubuntu3_all.deb ... 251s Unpacking s390-tools-data (2.31.0-0ubuntu3) over (2.31.0-0ubuntu1) ... 251s Selecting previously unselected package ubuntu-kernel-accessories. 251s Preparing to unpack .../101-ubuntu-kernel-accessories_1.536build1_s390x.deb ... 251s Unpacking ubuntu-kernel-accessories (1.536build1) ... 251s Preparing to unpack .../102-kpartx_0.9.4-5ubuntu6_s390x.deb ... 251s Unpacking kpartx (0.9.4-5ubuntu6) over (0.9.4-5ubuntu3) ... 251s Setting up cryptsetup-bin (2:2.7.0-1ubuntu2) ... 251s Setting up pinentry-curses (1.2.1-3ubuntu4) ... 251s Setting up motd-news-config (13ubuntu8) ... 251s Setting up libtext-iconv-perl:s390x (1.7-8build2) ... 251s Setting up libtext-charwidth-perl:s390x (0.04-11build2) ... 251s Setting up libsharpyuv0:s390x (1.3.2-0.4build2) ... 251s Setting up liburcu8t64:s390x (0.14.0-3.1) ... 251s Setting up tcpdump (4.99.4-3ubuntu2) ... 251s Setting up libibverbs1:s390x (50.0-2build1) ... 251s Setting up systemd-sysv (255.4-1ubuntu5) ... 251s Setting up ubuntu-kernel-accessories (1.536build1) ... 251s Setting up libapparmor1:s390x (4.0.0-beta3-0ubuntu2) ... 251s Setting up libatm1t64:s390x (1:2.5.1-5.1) ... 251s Setting up libgdbm6t64:s390x (1.23-5.1) ... 251s Setting up bsdextrautils (2.39.3-9ubuntu2) ... 251s Setting up libxpm4:s390x (1:3.5.17-1build1) ... 251s Setting up libgdbm-compat4t64:s390x (1.23-5.1) ... 251s Setting up xdg-user-dirs (0.18-1) ... 251s Setting up ibverbs-providers:s390x (50.0-2build1) ... 251s Setting up linux-headers-6.8.0-20 (6.8.0-20.20) ... 251s Setting up libmagic-mgc (1:5.45-3) ... 251s Setting up gawk (1:5.2.1-2build2) ... 251s Setting up libjq1:s390x (1.7.1-3) ... 251s Setting up manpages (6.05.01-1) ... 251s Setting up libtirpc-common (1.3.4+ds-1.1) ... 251s Setting up libbrotli1:s390x (1.1.0-2build1) ... 251s Setting up libsqlite3-0:s390x (3.45.1-1ubuntu1) ... 251s Setting up libsasl2-modules:s390x (2.1.28+dfsg1-5ubuntu1) ... 251s Setting up libuv1t64:s390x (1.48.0-1.1) ... 251s Setting up libmagic1t64:s390x (1:5.45-3) ... 251s Setting up rsyslog (8.2312.0-3ubuntu7) ... 251s info: The user `syslog' is already a member of `adm'. 252s Setting up binutils-common:s390x (2.42-4ubuntu1) ... 252s Setting up libpsl5t64:s390x (0.21.2-1.1) ... 252s Setting up libnghttp2-14:s390x (1.59.0-1build1) ... 252s Setting up libdeflate0:s390x (1.19-1) ... 252s Setting up linux-libc-dev:s390x (6.8.0-20.20) ... 252s Setting up libreiserfscore0t64 (1:3.6.27-7.1) ... 252s Setting up libctf-nobfd0:s390x (2.42-4ubuntu1) ... 252s Setting up libnss-systemd:s390x (255.4-1ubuntu5) ... 252s Setting up krb5-locales (1.20.1-6ubuntu1) ... 252s Setting up file (1:5.45-3) ... 252s Setting up kmod (31+20240202-2ubuntu4) ... 253s Setting up lshw (02.19.git.2021.06.19.996aaad9c7-2build2) ... 253s Setting up libldap-common (2.6.7+dfsg-1~exp1ubuntu6) ... 253s Setting up libprotobuf-c1:s390x (1.4.1-1ubuntu3) ... 253s Setting up libjbig0:s390x (2.1-6.1ubuntu1) ... 253s Setting up xxd (2:9.1.0016-1ubuntu6) ... 253s Setting up libsframe1:s390x (2.42-4ubuntu1) ... 253s Setting up libelf1t64:s390x (0.190-1.1build2) ... 253s Setting up libkrb5support0:s390x (1.20.1-6ubuntu1) ... 253s Setting up libdw1t64:s390x (0.190-1.1build2) ... 253s Setting up linux-headers-6.8.0-20-generic (6.8.0-20.20) ... 253s Setting up eject (2.39.3-9ubuntu2) ... 253s Setting up apparmor (4.0.0-beta3-0ubuntu2) ... 253s Installing new version of config file /etc/apparmor.d/abstractions/authentication ... 253s Installing new version of config file /etc/apparmor.d/abstractions/crypto ... 253s Installing new version of config file /etc/apparmor.d/abstractions/kde-open5 ... 253s Installing new version of config file /etc/apparmor.d/abstractions/openssl ... 253s Installing new version of config file /etc/apparmor.d/code ... 253s Installing new version of config file /etc/apparmor.d/firefox ... 254s Reloading AppArmor profiles 255s Setting up libglib2.0-0t64:s390x (2.79.3-3ubuntu5) ... 255s No schema files found: doing nothing. 255s Setting up libglib2.0-data (2.79.3-3ubuntu5) ... 255s Setting up rpcsvc-proto (1.4.2-0ubuntu6) ... 255s Setting up vim-common (2:9.1.0016-1ubuntu6) ... 255s Setting up gcc-13-base:s390x (13.2.0-21ubuntu1) ... 255s Setting up libqrtr-glib0:s390x (1.2.2-1ubuntu3) ... 255s Setting up libslang2:s390x (2.3.3-3build1) ... 255s Setting up libnvme1t64 (1.8-3) ... 255s Setting up mtr-tiny (0.95-1.1build1) ... 255s Setting up gnupg-l10n (2.4.4-2ubuntu15) ... 255s Setting up librtmp1:s390x (2.4+20151223.gitfa8646d.1-2build6) ... 255s Setting up libdbus-1-3:s390x (1.14.10-4ubuntu2) ... 255s Setting up xz-utils (5.6.0-0.2) ... 255s Setting up perl-modules-5.38 (5.38.2-3.2) ... 255s Setting up libproc2-0:s390x (2:4.0.4-4ubuntu2) ... 255s Setting up libblockdev-utils3:s390x (3.1.0-1build1) ... 255s Setting up fonts-dejavu-mono (2.37-8) ... 255s Setting up libpng16-16t64:s390x (1.6.43-3) ... 255s Setting up systemd-timesyncd (255.4-1ubuntu5) ... 255s Setting up libevent-core-2.1-7:s390x (2.1.12-stable-9build1) ... 255s Setting up udev (255.4-1ubuntu5) ... 257s Setting up libss2:s390x (1.47.0-2.4~exp1ubuntu2) ... 257s Setting up usb.ids (2024.03.18-1) ... 257s Setting up sudo (1.9.15p5-3ubuntu3) ... 257s Setting up fonts-dejavu-core (2.37-8) ... 257s Setting up dhcpcd-base (1:10.0.6-1ubuntu2) ... 257s Setting up gir1.2-glib-2.0:s390x (2.79.3-3ubuntu5) ... 257s Setting up libk5crypto3:s390x (1.20.1-6ubuntu1) ... 257s Setting up libjpeg-turbo8:s390x (2.1.5-2ubuntu1) ... 257s Setting up logsave (1.47.0-2.4~exp1ubuntu2) ... 257s Setting up libwebp7:s390x (1.3.2-0.4build2) ... 257s Setting up libfdisk1:s390x (2.39.3-9ubuntu2) ... 257s Setting up libdb5.3t64:s390x (5.3.28+dfsg2-6) ... 257s Setting up libblockdev-nvme3:s390x (3.1.0-1build1) ... 257s Setting up libdevmapper1.02.1:s390x (2:1.02.185-3ubuntu2) ... 257s Setting up libblockdev-fs3:s390x (3.1.0-1build1) ... 257s Setting up libaio1t64:s390x (0.3.113-6) ... 257s Setting up python-apt-common (2.7.7) ... 257s Setting up mount (2.39.3-9ubuntu2) ... 257s Setting up dmsetup (2:1.02.185-3ubuntu2) ... 257s Setting up uuid-runtime (2.39.3-9ubuntu2) ... 258s uuidd.service is a disabled or a static unit not running, not starting it. 258s Setting up libmm-glib0:s390x (1.23.4-0ubuntu1) ... 258s Setting up groff-base (1.23.0-3build1) ... 258s Setting up libcrypt-dev:s390x (1:4.4.36-4) ... 258s Setting up libplymouth5:s390x (24.004.60-1ubuntu6) ... 258s Setting up dbus-session-bus-common (1.14.10-4ubuntu2) ... 258s Setting up kpartx (0.9.4-5ubuntu6) ... 258s Setting up jq (1.7.1-3) ... 258s Setting up procps (2:4.0.4-4ubuntu2) ... 258s Setting up gpgconf (2.4.4-2ubuntu15) ... 258s Setting up libgirepository-1.0-1:s390x (1.79.1-1ubuntu6) ... 258s Setting up libjson-glib-1.0-common (1.8.0-2build1) ... 258s Setting up libkrb5-3:s390x (1.20.1-6ubuntu1) ... 258s Setting up libpython3.11-minimal:s390x (3.11.8-1build4) ... 258s Setting up libusb-1.0-0:s390x (2:1.0.27-1) ... 258s Setting up libperl5.38t64:s390x (5.38.2-3.2) ... 258s Setting up tnftp (20230507-2build1) ... 258s Setting up libbinutils:s390x (2.42-4ubuntu1) ... 258s Setting up dbus-system-bus-common (1.14.10-4ubuntu2) ... 259s Setting up libfido2-1:s390x (1.14.0-1build1) ... 259s Setting up libc-dev-bin (2.39-0ubuntu6) ... 259s Setting up openssl (3.0.13-0ubuntu2) ... 259s Setting up linux-modules-6.8.0-20-generic (6.8.0-20.20) ... 259s Setting up readline-common (8.2-4) ... 259s Setting up libxml2:s390x (2.9.14+dfsg-1.3ubuntu2) ... 259s Setting up libxmuu1:s390x (2:1.1.3-3build1) ... 259s Setting up dbus-bin (1.14.10-4ubuntu2) ... 259s Setting up info (7.1-3build1) ... 259s Setting up liblocale-gettext-perl (1.07-6ubuntu4) ... 259s Setting up gpg (2.4.4-2ubuntu15) ... 259s Setting up libgudev-1.0-0:s390x (1:238-3ubuntu2) ... 259s Setting up libpolkit-gobject-1-0:s390x (124-1ubuntu1) ... 259s Setting up libbpf1:s390x (1:1.3.0-2build1) ... 259s Setting up libmbim-glib4:s390x (1.31.2-0ubuntu2) ... 259s Setting up rsync (3.2.7-1build1) ... 261s rsync.service is a disabled or a static unit not running, not starting it. 261s Setting up libudisks2-0:s390x (2.10.1-6) ... 261s Setting up bolt (0.9.6-2build1) ... 261s bolt.service is a disabled or a static unit not running, not starting it. 261s Setting up s390-tools-data (2.31.0-0ubuntu3) ... 261s Setting up libllvm18:s390x (1:18.1.2-1ubuntu2) ... 261s Setting up gnupg-utils (2.4.4-2ubuntu15) ... 261s Setting up initramfs-tools-bin (0.142ubuntu23) ... 261s Setting up libctf0:s390x (2.42-4ubuntu1) ... 261s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 261s Setting up python3.11-minimal (3.11.8-1build4) ... 263s Setting up libclang1-18 (1:18.1.2-1ubuntu2) ... 263s Setting up manpages-dev (6.05.01-1) ... 263s Setting up linux-modules-extra-6.8.0-20-generic (6.8.0-20.20) ... 264s Setting up apt-utils (2.7.14) ... 264s Setting up binutils-s390x-linux-gnu (2.42-4ubuntu1) ... 264s Setting up gpg-agent (2.4.4-2ubuntu15) ... 264s Setting up libpython3.12-stdlib:s390x (3.12.2-4build3) ... 264s Setting up libblockdev-mdraid3:s390x (3.1.0-1build1) ... 264s Setting up wget (1.21.4-1ubuntu2) ... 264s Setting up linux-image-6.8.0-20-generic (6.8.0-20.20) ... 265s I: /boot/vmlinuz is now a symlink to vmlinuz-6.8.0-20-generic 265s I: /boot/initrd.img is now a symlink to initrd.img-6.8.0-20-generic 265s Setting up libblockdev-swap3:s390x (3.1.0-1build1) ... 265s Setting up plymouth (24.004.60-1ubuntu6) ... 265s update-initramfs: Generating /boot/initrd.img-6.8.0-11-generic 265s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 270s Not invoking zipl: initrd doesn't exist yet 270s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 270s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 271s Setting up fontconfig-config (2.15.0-1.1ubuntu1) ... 271s Setting up libxmlb2:s390x (0.3.15-1build1) ... 271s Setting up btrfs-progs (6.6.3-1.1build1) ... 271s Setting up libpython3.11-stdlib:s390x (3.11.8-1build4) ... 271s Setting up python3.12 (3.12.2-4build3) ... 272s Setting up libblockdev-loop3:s390x (3.1.0-1build1) ... 272s Setting up gpgsm (2.4.4-2ubuntu15) ... 272s Setting up inetutils-telnet (2:2.5-3ubuntu3) ... 272s Setting up e2fsprogs (1.47.0-2.4~exp1ubuntu2) ... 272s update-initramfs: deferring update (trigger activated) 273s e2scrub_all.service is a disabled or a static unit not running, not starting it. 273s Setting up libparted2t64:s390x (3.6-3.1build2) ... 273s Setting up linux-headers-generic (6.8.0-20.20+1) ... 273s Setting up dbus-daemon (1.14.10-4ubuntu2) ... 273s Setting up binutils (2.42-4ubuntu1) ... 273s Setting up libmbim-proxy (1.31.2-0ubuntu2) ... 273s Setting up vim-tiny (2:9.1.0016-1ubuntu6) ... 273s Setting up libnetplan1:s390x (1.0-1) ... 273s Setting up man-db (2.12.0-3build4) ... 273s Updating database of manual pages ... 276s man-db.service is a disabled or a static unit not running, not starting it. 276s Setting up libblockdev3:s390x (3.1.0-1build1) ... 276s Setting up fdisk (2.39.3-9ubuntu2) ... 276s Setting up multipath-tools (0.9.4-5ubuntu6) ... 277s Setting up libjson-glib-1.0-0:s390x (1.8.0-2build1) ... 277s Setting up libblockdev-part3:s390x (3.1.0-1build1) ... 277s Setting up libsasl2-modules-db:s390x (2.1.28+dfsg1-5ubuntu1) ... 277s Setting up hwdata (0.379-1) ... 277s Setting up libftdi1-2:s390x (1.5-6build4) ... 277s Setting up perl (5.38.2-3.2) ... 277s Setting up plymouth-theme-ubuntu-text (24.004.60-1ubuntu6) ... 277s update-initramfs: deferring update (trigger activated) 277s Setting up libfreetype6:s390x (2.13.2+dfsg-1build2) ... 277s Setting up gir1.2-girepository-2.0:s390x (1.79.1-1ubuntu6) ... 277s Setting up dbus (1.14.10-4ubuntu2) ... 277s A reboot is required to replace the running dbus-daemon. 277s Please reboot the system when convenient. 277s Setting up shared-mime-info (2.4-1build1) ... 278s Setting up libgssapi-krb5-2:s390x (1.20.1-6ubuntu1) ... 278s Setting up ftp (20230507-2build1) ... 278s Setting up keyboxd (2.4.4-2ubuntu15) ... 278s Setting up libdpkg-perl (1.22.6ubuntu5) ... 278s Setting up libsasl2-2:s390x (2.1.28+dfsg1-5ubuntu1) ... 278s Setting up libssh-4:s390x (0.10.6-2build1) ... 278s Setting up ieee-data (20220827.1) ... 278s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu1) ... 278s Setting up libpam-systemd:s390x (255.4-1ubuntu5) ... 278s Setting up libpolkit-agent-1-0:s390x (124-1ubuntu1) ... 279s Setting up libc6-dev:s390x (2.39-0ubuntu6) ... 279s Setting up libgpgme11t64:s390x (1.18.0-4.1ubuntu3) ... 279s Setting up libfontconfig1:s390x (2.15.0-1.1ubuntu1) ... 279s Setting up linux-image-virtual (6.8.0-20.20+1) ... 279s Setting up netplan-generator (1.0-1) ... 279s Removing 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 279s Setting up initramfs-tools-core (0.142ubuntu23) ... 279s Setting up libclang-cpp18 (1:18.1.2-1ubuntu2) ... 279s Setting up libbpfcc:s390x (0.29.1+ds-1ubuntu4) ... 279s Setting up linux-tools-common (6.8.0-20.20) ... 279s Setting up libarchive13t64:s390x (3.7.2-1.1ubuntu2) ... 279s Setting up libldap2:s390x (2.6.7+dfsg-1~exp1ubuntu6) ... 279s Setting up libpython3-stdlib:s390x (3.12.2-0ubuntu1) ... 279s Setting up systemd-resolved (255.4-1ubuntu5) ... 279s Setting up python3.11 (3.11.8-1build4) ... 281s Setting up linux-image-generic (6.8.0-20.20+1) ... 281s Setting up telnet (0.17+2.5-3ubuntu3) ... 281s Setting up initramfs-tools (0.142ubuntu23) ... 281s update-initramfs: deferring update (trigger activated) 281s Setting up linux-headers-virtual (6.8.0-20.20+1) ... 281s Setting up linux-generic (6.8.0-20.20+1) ... 281s Setting up libcurl4t64:s390x (8.5.0-2ubuntu8) ... 281s Setting up bpftrace (0.20.2-1ubuntu1) ... 281s Setting up bind9-libs:s390x (1:9.18.24-0ubuntu3) ... 281s Setting up libtirpc3t64:s390x (1.3.4+ds-1.1) ... 281s Setting up e2fsprogs-l10n (1.47.0-2.4~exp1ubuntu2) ... 281s Setting up iproute2 (6.1.0-1ubuntu5) ... 281s Setting up openssh-client (1:9.6p1-3ubuntu11) ... 281s Setting up libgusb2:s390x (0.4.8-1build1) ... 281s Setting up libcurl3t64-gnutls:s390x (8.5.0-2ubuntu8) ... 281s Setting up parted (3.6-3.1build2) ... 281s Setting up libqmi-glib5:s390x (1.35.2-0ubuntu1) ... 281s Setting up linux-tools-6.8.0-20 (6.8.0-20.20) ... 281s Setting up python3 (3.12.2-0ubuntu1) ... 282s Setting up libjcat1:s390x (0.2.0-2build2) ... 282s Setting up dpkg-dev (1.22.6ubuntu5) ... 282s Setting up linux-virtual (6.8.0-20.20+1) ... 282s Setting up dirmngr (2.4.4-2ubuntu15) ... 282s Setting up dbus-user-session (1.14.10-4ubuntu2) ... 282s Setting up linux-tools-6.8.0-20-generic (6.8.0-20.20) ... 282s Setting up python3-cryptography (41.0.7-4build2) ... 282s Setting up python3-gi (3.47.0-3build1) ... 283s Setting up libgd3:s390x (2.3.3-9ubuntu3) ... 283s Setting up python3-typing-extensions (4.10.0-1) ... 283s Setting up lsof (4.95.0-1build2) ... 283s Setting up python3-pyrsistent:s390x (0.20.0-1build1) ... 283s Setting up python3-netaddr (0.8.0-2ubuntu1) ... 284s Setting up libnsl2:s390x (1.3.0-3build2) ... 284s Setting up gnupg (2.4.4-2ubuntu15) ... 284s Setting up python3-netplan (1.0-1) ... 284s Setting up curl (8.5.0-2ubuntu8) ... 284s Setting up libvolume-key1:s390x (0.3.12-7build1) ... 284s Setting up bind9-host (1:9.18.24-0ubuntu3) ... 284s Setting up python3-lib2to3 (3.12.2-3ubuntu1.1) ... 284s Setting up python3-bpfcc (0.29.1+ds-1ubuntu4) ... 285s Setting up libc-devtools (2.39-0ubuntu6) ... 285s Setting up python3-pkg-resources (68.1.2-2ubuntu1) ... 285s Setting up python3-distutils (3.12.2-3ubuntu1.1) ... 285s python3.12: can't get files for byte-compilation 285s Setting up openssh-sftp-server (1:9.6p1-3ubuntu11) ... 285s Setting up python3-dbus (1.3.2-5build2) ... 286s Setting up python3-setuptools (68.1.2-2ubuntu1) ... 287s Setting up gpg-wks-client (2.4.4-2ubuntu15) ... 287s Setting up openssh-server (1:9.6p1-3ubuntu11) ... 287s Replacing config file /etc/ssh/sshd_config with new version 289s Created symlink /etc/systemd/system/ssh.service.requires/ssh.socket → /usr/lib/systemd/system/ssh.socket. 291s Setting up libblockdev-crypto3:s390x (3.1.0-1build1) ... 291s Setting up python3-gdbm:s390x (3.12.2-3ubuntu1.1) ... 291s Setting up python3-apt (2.7.7) ... 291s Setting up libfwupd2:s390x (1.9.15-2) ... 291s Setting up python3-yaml (6.0.1-2build1) ... 292s Setting up libqmi-proxy (1.35.2-0ubuntu1) ... 292s Setting up netplan.io (1.0-1) ... 292s Setting up bpfcc-tools (0.29.1+ds-1ubuntu4) ... 292s Setting up bind9-dnsutils (1:9.18.24-0ubuntu3) ... 292s Setting up ubuntu-pro-client (31.2.2) ... 294s Setting up fwupd (1.9.15-2) ... 295s fwupd-offline-update.service is a disabled or a static unit not running, not starting it. 295s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 295s fwupd.service is a disabled or a static unit not running, not starting it. 295s Setting up ubuntu-pro-client-l10n (31.2.2) ... 295s Setting up udisks2 (2.10.1-6) ... 296s Processing triggers for ufw (0.36.2-5) ... 296s Processing triggers for debianutils (5.17) ... 296s Processing triggers for install-info (7.1-3build1) ... 296s Processing triggers for libc-bin (2.39-0ubuntu6) ... 296s Processing triggers for linux-image-6.8.0-20-generic (6.8.0-20.20) ... 296s /etc/kernel/postinst.d/initramfs-tools: 296s update-initramfs: Generating /boot/initrd.img-6.8.0-20-generic 296s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 302s Using config file '/etc/zipl.conf' 302s Building bootmap in '/boot' 302s Adding IPL section 'ubuntu' (default) 302s Preparing boot device for LD-IPL: vda (0000). 302s Done. 302s /etc/kernel/postinst.d/zz-zipl: 302s Using config file '/etc/zipl.conf' 302s Building bootmap in '/boot' 302s Adding IPL section 'ubuntu' (default) 302s Preparing boot device for LD-IPL: vda (0000). 302s Done. 302s Processing triggers for initramfs-tools (0.142ubuntu23) ... 302s update-initramfs: Generating /boot/initrd.img-6.8.0-20-generic 302s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 308s Using config file '/etc/zipl.conf' 308s Building bootmap in '/boot' 308s Adding IPL section 'ubuntu' (default) 308s Preparing boot device for LD-IPL: vda (0000). 308s Done. 310s Reading package lists... 310s Building dependency tree... 310s Reading state information... 311s The following packages will be REMOVED: 311s libaio1* libnetplan0* python3-distutils* python3-lib2to3* 311s 0 upgraded, 0 newly installed, 4 to remove and 1 not upgraded. 311s After this operation, 1445 kB disk space will be freed. 311s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81786 files and directories currently installed.) 311s Removing libaio1:s390x (0.3.113-5) ... 311s Removing libnetplan0:s390x (0.107.1-3) ... 311s Removing python3-distutils (3.12.2-3ubuntu1.1) ... 312s Removing python3-lib2to3 (3.12.2-3ubuntu1.1) ... 312s Processing triggers for libc-bin (2.39-0ubuntu6) ... 313s autopkgtest [23:14:06]: rebooting testbed after setup commands that affected boot 342s autopkgtest [23:14:36]: testbed running kernel: Linux 6.8.0-20-generic #20-Ubuntu SMP Mon Mar 18 10:49:25 UTC 2024 345s autopkgtest [23:14:39]: @@@@@@@@@@@@@@@@@@@@ apt-source gopacket 347s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/universe gopacket 1.1.19-4build1 (dsc) [2179 B] 347s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/universe gopacket 1.1.19-4build1 (tar) [951 kB] 347s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/universe gopacket 1.1.19-4build1 (diff) [4148 B] 347s gpgv: Signature made Thu Mar 14 13:10:58 2024 UTC 347s gpgv: using RSA key 568BF22A66337CBFC9A6B9B72C83DBC8E9BD0E37 347s gpgv: Can't check signature: No public key 347s dpkg-source: warning: cannot verify inline signature for ./gopacket_1.1.19-4build1.dsc: no acceptable signature found 348s autopkgtest [23:14:42]: testing package gopacket version 1.1.19-4build1 348s autopkgtest [23:14:42]: build not needed 350s autopkgtest [23:14:44]: test dh-golang-autopkgtest: preparing testbed 352s Reading package lists... 352s Building dependency tree... 352s Reading state information... 352s Starting pkgProblemResolver with broken count: 0 353s Starting 2 pkgProblemResolver with broken count: 0 353s Done 353s The following additional packages will be installed: 353s autoconf automake autopoint autotools-dev build-essential cpp cpp-13 353s cpp-13-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit dh-autoreconf 353s dh-golang dh-strip-nondeterminism dwz g++ g++-13 g++-13-s390x-linux-gnu 353s g++-s390x-linux-gnu gcc gcc-13 gcc-13-s390x-linux-gnu gcc-s390x-linux-gnu 353s gettext golang-1.22-go golang-1.22-src golang-github-google-gopacket-dev 353s golang-go golang-golang-x-crypto-dev golang-golang-x-net-dev 353s golang-golang-x-sys-dev golang-golang-x-term-dev golang-golang-x-text-dev 353s golang-src intltool-debian libarchive-zip-perl libasan8 libatomic1 libcc1-0 353s libdbus-1-dev libdebhelper-perl libfile-stripnondeterminism-perl 353s libgcc-13-dev libgomp1 libibverbs-dev libisl23 libitm1 libmpc3 libnl-3-dev 353s libnl-route-3-dev libpcap0.8-dev libpcap0.8t64 libpkgconf3 libstdc++-13-dev 353s libsub-override-perl libtool libubsan1 m4 pkgconf pkgconf-bin po-debconf 353s sgml-base xml-core 353s Suggested packages: 353s autoconf-archive gnu-standards autoconf-doc cpp-doc gcc-13-locales 353s cpp-13-doc dh-make g++-multilib g++-13-multilib gcc-13-doc gcc-multilib flex 353s bison gdb gcc-doc gcc-13-multilib gdb-s390x-linux-gnu gettext-doc 353s libasprintf-dev libgettextpo-dev bzr | brz git mercurial subversion 353s libstdc++-13-doc libtool-doc gfortran | fortran95-compiler gcj-jdk m4-doc 353s libmail-box-perl sgml-base-doc 353s Recommended packages: 353s libarchive-cpio-perl libltdl-dev libmail-sendmail-perl 353s The following packages will be REMOVED: 353s libpcap0.8 353s The following NEW packages will be installed: 353s autoconf automake autopkgtest-satdep autopoint autotools-dev build-essential 353s cpp cpp-13 cpp-13-s390x-linux-gnu cpp-s390x-linux-gnu debhelper debugedit 353s dh-autoreconf dh-golang dh-strip-nondeterminism dwz g++ g++-13 353s g++-13-s390x-linux-gnu g++-s390x-linux-gnu gcc gcc-13 gcc-13-s390x-linux-gnu 353s gcc-s390x-linux-gnu gettext golang-1.22-go golang-1.22-src 353s golang-github-google-gopacket-dev golang-go golang-golang-x-crypto-dev 353s golang-golang-x-net-dev golang-golang-x-sys-dev golang-golang-x-term-dev 353s golang-golang-x-text-dev golang-src intltool-debian libarchive-zip-perl 353s libasan8 libatomic1 libcc1-0 libdbus-1-dev libdebhelper-perl 353s libfile-stripnondeterminism-perl libgcc-13-dev libgomp1 libibverbs-dev 353s libisl23 libitm1 libmpc3 libnl-3-dev libnl-route-3-dev libpcap0.8-dev 353s libpcap0.8t64 libpkgconf3 libstdc++-13-dev libsub-override-perl libtool 353s libubsan1 m4 pkgconf pkgconf-bin po-debconf sgml-base xml-core 353s 0 upgraded, 64 newly installed, 1 to remove and 1 not upgraded. 353s Need to get 108 MB/108 MB of archives. 353s After this operation, 481 MB of additional disk space will be used. 353s Get:1 /tmp/autopkgtest.1ui73v/1-autopkgtest-satdep.deb autopkgtest-satdep s390x 0 [808 B] 353s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpcap0.8t64 s390x 1.10.4-4.1ubuntu2 [154 kB] 354s Get:3 http://ftpmaster.internal/ubuntu noble/main s390x sgml-base all 1.31 [11.4 kB] 354s Get:4 http://ftpmaster.internal/ubuntu noble/main s390x m4 s390x 1.4.19-4 [255 kB] 354s Get:5 http://ftpmaster.internal/ubuntu noble/main s390x autoconf all 2.71-3 [339 kB] 354s Get:6 http://ftpmaster.internal/ubuntu noble/main s390x autotools-dev all 20220109.1 [44.9 kB] 354s Get:7 http://ftpmaster.internal/ubuntu noble/main s390x automake all 1:1.16.5-1.3ubuntu1 [558 kB] 354s Get:8 http://ftpmaster.internal/ubuntu noble/main s390x autopoint all 0.21-14ubuntu1 [422 kB] 355s Get:9 http://ftpmaster.internal/ubuntu noble/main s390x libisl23 s390x 0.26-3 [722 kB] 355s Get:10 http://ftpmaster.internal/ubuntu noble/main s390x libmpc3 s390x 1.3.1-1 [54.9 kB] 355s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/main s390x cpp-13-s390x-linux-gnu s390x 13.2.0-21ubuntu1 [9935 kB] 360s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/main s390x cpp-13 s390x 13.2.0-21ubuntu1 [1026 B] 360s Get:13 http://ftpmaster.internal/ubuntu noble/main s390x cpp-s390x-linux-gnu s390x 4:13.2.0-7ubuntu1 [5308 B] 360s Get:14 http://ftpmaster.internal/ubuntu noble/main s390x cpp s390x 4:13.2.0-7ubuntu1 [22.4 kB] 360s Get:15 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libcc1-0 s390x 14-20240315-1ubuntu1 [50.0 kB] 360s Get:16 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgomp1 s390x 14-20240315-1ubuntu1 [151 kB] 360s Get:17 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libitm1 s390x 14-20240315-1ubuntu1 [31.1 kB] 360s Get:18 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libatomic1 s390x 14-20240315-1ubuntu1 [9396 B] 360s Get:19 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libasan8 s390x 14-20240315-1ubuntu1 [2997 kB] 362s Get:20 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libubsan1 s390x 14-20240315-1ubuntu1 [1186 kB] 363s Get:21 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libgcc-13-dev s390x 13.2.0-21ubuntu1 [1003 kB] 364s Get:22 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gcc-13-s390x-linux-gnu s390x 13.2.0-21ubuntu1 [19.1 MB] 372s Get:23 http://ftpmaster.internal/ubuntu noble-proposed/main s390x gcc-13 s390x 13.2.0-21ubuntu1 [469 kB] 372s Get:24 http://ftpmaster.internal/ubuntu noble/main s390x gcc-s390x-linux-gnu s390x 4:13.2.0-7ubuntu1 [1208 B] 372s Get:25 http://ftpmaster.internal/ubuntu noble/main s390x gcc s390x 4:13.2.0-7ubuntu1 [5014 B] 372s Get:26 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libstdc++-13-dev s390x 13.2.0-21ubuntu1 [2494 kB] 373s Get:27 http://ftpmaster.internal/ubuntu noble-proposed/main s390x g++-13-s390x-linux-gnu s390x 13.2.0-21ubuntu1 [11.3 MB] 375s Get:28 http://ftpmaster.internal/ubuntu noble-proposed/main s390x g++-13 s390x 13.2.0-21ubuntu1 [14.4 kB] 375s Get:29 http://ftpmaster.internal/ubuntu noble/main s390x g++-s390x-linux-gnu s390x 4:13.2.0-7ubuntu1 [956 B] 375s Get:30 http://ftpmaster.internal/ubuntu noble/main s390x g++ s390x 4:13.2.0-7ubuntu1 [1096 B] 375s Get:31 http://ftpmaster.internal/ubuntu noble/main s390x build-essential s390x 12.10ubuntu1 [4930 B] 375s Get:32 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdebhelper-perl all 13.14.1ubuntu5 [89.8 kB] 375s Get:33 http://ftpmaster.internal/ubuntu noble/main s390x libtool all 2.4.7-7 [166 kB] 376s Get:34 http://ftpmaster.internal/ubuntu noble/main s390x dh-autoreconf all 20 [16.1 kB] 376s Get:35 http://ftpmaster.internal/ubuntu noble/main s390x libarchive-zip-perl all 1.68-1 [90.2 kB] 376s Get:36 http://ftpmaster.internal/ubuntu noble/main s390x libsub-override-perl all 0.10-1 [10.0 kB] 376s Get:37 http://ftpmaster.internal/ubuntu noble/main s390x libfile-stripnondeterminism-perl all 1.13.1-1 [18.1 kB] 376s Get:38 http://ftpmaster.internal/ubuntu noble/main s390x dh-strip-nondeterminism all 1.13.1-1 [5362 B] 376s Get:39 http://ftpmaster.internal/ubuntu noble-proposed/main s390x debugedit s390x 1:5.0-5build1 [50.5 kB] 376s Get:40 http://ftpmaster.internal/ubuntu noble-proposed/main s390x dwz s390x 0.15-1build5 [122 kB] 376s Get:41 http://ftpmaster.internal/ubuntu noble/main s390x gettext s390x 0.21-14ubuntu1 [917 kB] 376s Get:42 http://ftpmaster.internal/ubuntu noble/main s390x intltool-debian all 0.35.0+20060710.6 [23.2 kB] 376s Get:43 http://ftpmaster.internal/ubuntu noble/main s390x po-debconf all 1.0.21+nmu1 [233 kB] 376s Get:44 http://ftpmaster.internal/ubuntu noble-proposed/main s390x debhelper all 13.14.1ubuntu5 [869 kB] 376s Get:45 http://ftpmaster.internal/ubuntu noble/main s390x golang-1.22-src all 1.22.1-1 [19.7 MB] 381s Get:46 http://ftpmaster.internal/ubuntu noble/main s390x golang-1.22-go s390x 1.22.1-1 [24.7 MB] 388s Get:47 http://ftpmaster.internal/ubuntu noble/universe s390x golang-golang-x-sys-dev all 0.17.0-1 [424 kB] 388s Get:48 http://ftpmaster.internal/ubuntu noble/universe s390x golang-golang-x-term-dev all 0.17.0-1 [14.7 kB] 388s Get:49 http://ftpmaster.internal/ubuntu noble/universe s390x golang-golang-x-text-dev all 0.14.0-2 [4641 kB] 389s Get:50 http://ftpmaster.internal/ubuntu noble/universe s390x golang-golang-x-crypto-dev all 1:0.19.0-1 [1712 kB] 390s Get:51 http://ftpmaster.internal/ubuntu noble/universe s390x golang-golang-x-net-dev all 1:0.21.0+dfsg-1 [918 kB] 390s Get:52 http://ftpmaster.internal/ubuntu noble/main s390x libpkgconf3 s390x 1.8.1-2 [30.4 kB] 390s Get:53 http://ftpmaster.internal/ubuntu noble/main s390x pkgconf-bin s390x 1.8.1-2 [20.8 kB] 390s Get:54 http://ftpmaster.internal/ubuntu noble/main s390x pkgconf s390x 1.8.1-2 [16.7 kB] 390s Get:55 http://ftpmaster.internal/ubuntu noble/main s390x xml-core all 0.19 [20.3 kB] 390s Get:56 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libdbus-1-dev s390x 1.14.10-4ubuntu2 [197 kB] 390s Get:57 http://ftpmaster.internal/ubuntu noble/main s390x libnl-3-dev s390x 3.7.0-0.3 [104 kB] 390s Get:58 http://ftpmaster.internal/ubuntu noble/main s390x libnl-route-3-dev s390x 3.7.0-0.3 [218 kB] 390s Get:59 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libibverbs-dev s390x 50.0-2build1 [717 kB] 390s Get:60 http://ftpmaster.internal/ubuntu noble-proposed/main s390x libpcap0.8-dev s390x 1.10.4-4.1ubuntu2 [273 kB] 390s Get:61 http://ftpmaster.internal/ubuntu noble-proposed/universe s390x golang-github-google-gopacket-dev all 1.1.19-4build1 [667 kB] 390s Get:62 http://ftpmaster.internal/ubuntu noble/main s390x golang-src all 2:1.22~2 [4992 B] 390s Get:63 http://ftpmaster.internal/ubuntu noble/main s390x golang-go s390x 2:1.22~2 [43.9 kB] 390s Get:64 http://ftpmaster.internal/ubuntu noble/main s390x dh-golang all 1.62 [25.2 kB] 391s Fetched 108 MB in 37s (2906 kB/s) 391s dpkg: libpcap0.8:s390x: dependency problems, but removing anyway as you requested: 391s tcpdump depends on libpcap0.8 (>= 1.9.1). 391s 391s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81562 files and directories currently installed.) 391s Removing libpcap0.8:s390x (1.10.4-4ubuntu3) ... 391s Selecting previously unselected package libpcap0.8t64:s390x. 392s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81551 files and directories currently installed.) 392s Preparing to unpack .../00-libpcap0.8t64_1.10.4-4.1ubuntu2_s390x.deb ... 392s Unpacking libpcap0.8t64:s390x (1.10.4-4.1ubuntu2) ... 392s Selecting previously unselected package sgml-base. 392s Preparing to unpack .../01-sgml-base_1.31_all.deb ... 392s Unpacking sgml-base (1.31) ... 392s Selecting previously unselected package m4. 392s Preparing to unpack .../02-m4_1.4.19-4_s390x.deb ... 392s Unpacking m4 (1.4.19-4) ... 392s Selecting previously unselected package autoconf. 392s Preparing to unpack .../03-autoconf_2.71-3_all.deb ... 392s Unpacking autoconf (2.71-3) ... 392s Selecting previously unselected package autotools-dev. 392s Preparing to unpack .../04-autotools-dev_20220109.1_all.deb ... 392s Unpacking autotools-dev (20220109.1) ... 392s Selecting previously unselected package automake. 392s Preparing to unpack .../05-automake_1%3a1.16.5-1.3ubuntu1_all.deb ... 392s Unpacking automake (1:1.16.5-1.3ubuntu1) ... 392s Selecting previously unselected package autopoint. 392s Preparing to unpack .../06-autopoint_0.21-14ubuntu1_all.deb ... 392s Unpacking autopoint (0.21-14ubuntu1) ... 392s Selecting previously unselected package libisl23:s390x. 392s Preparing to unpack .../07-libisl23_0.26-3_s390x.deb ... 392s Unpacking libisl23:s390x (0.26-3) ... 392s Selecting previously unselected package libmpc3:s390x. 392s Preparing to unpack .../08-libmpc3_1.3.1-1_s390x.deb ... 392s Unpacking libmpc3:s390x (1.3.1-1) ... 392s Selecting previously unselected package cpp-13-s390x-linux-gnu. 392s Preparing to unpack .../09-cpp-13-s390x-linux-gnu_13.2.0-21ubuntu1_s390x.deb ... 392s Unpacking cpp-13-s390x-linux-gnu (13.2.0-21ubuntu1) ... 392s Selecting previously unselected package cpp-13. 392s Preparing to unpack .../10-cpp-13_13.2.0-21ubuntu1_s390x.deb ... 392s Unpacking cpp-13 (13.2.0-21ubuntu1) ... 392s Selecting previously unselected package cpp-s390x-linux-gnu. 392s Preparing to unpack .../11-cpp-s390x-linux-gnu_4%3a13.2.0-7ubuntu1_s390x.deb ... 392s Unpacking cpp-s390x-linux-gnu (4:13.2.0-7ubuntu1) ... 392s Selecting previously unselected package cpp. 392s Preparing to unpack .../12-cpp_4%3a13.2.0-7ubuntu1_s390x.deb ... 392s Unpacking cpp (4:13.2.0-7ubuntu1) ... 392s Selecting previously unselected package libcc1-0:s390x. 392s Preparing to unpack .../13-libcc1-0_14-20240315-1ubuntu1_s390x.deb ... 392s Unpacking libcc1-0:s390x (14-20240315-1ubuntu1) ... 392s Selecting previously unselected package libgomp1:s390x. 392s Preparing to unpack .../14-libgomp1_14-20240315-1ubuntu1_s390x.deb ... 392s Unpacking libgomp1:s390x (14-20240315-1ubuntu1) ... 392s Selecting previously unselected package libitm1:s390x. 392s Preparing to unpack .../15-libitm1_14-20240315-1ubuntu1_s390x.deb ... 392s Unpacking libitm1:s390x (14-20240315-1ubuntu1) ... 392s Selecting previously unselected package libatomic1:s390x. 392s Preparing to unpack .../16-libatomic1_14-20240315-1ubuntu1_s390x.deb ... 392s Unpacking libatomic1:s390x (14-20240315-1ubuntu1) ... 392s Selecting previously unselected package libasan8:s390x. 392s Preparing to unpack .../17-libasan8_14-20240315-1ubuntu1_s390x.deb ... 392s Unpacking libasan8:s390x (14-20240315-1ubuntu1) ... 392s Selecting previously unselected package libubsan1:s390x. 392s Preparing to unpack .../18-libubsan1_14-20240315-1ubuntu1_s390x.deb ... 392s Unpacking libubsan1:s390x (14-20240315-1ubuntu1) ... 393s Selecting previously unselected package libgcc-13-dev:s390x. 393s Preparing to unpack .../19-libgcc-13-dev_13.2.0-21ubuntu1_s390x.deb ... 393s Unpacking libgcc-13-dev:s390x (13.2.0-21ubuntu1) ... 393s Selecting previously unselected package gcc-13-s390x-linux-gnu. 393s Preparing to unpack .../20-gcc-13-s390x-linux-gnu_13.2.0-21ubuntu1_s390x.deb ... 393s Unpacking gcc-13-s390x-linux-gnu (13.2.0-21ubuntu1) ... 393s Selecting previously unselected package gcc-13. 393s Preparing to unpack .../21-gcc-13_13.2.0-21ubuntu1_s390x.deb ... 393s Unpacking gcc-13 (13.2.0-21ubuntu1) ... 393s Selecting previously unselected package gcc-s390x-linux-gnu. 393s Preparing to unpack .../22-gcc-s390x-linux-gnu_4%3a13.2.0-7ubuntu1_s390x.deb ... 393s Unpacking gcc-s390x-linux-gnu (4:13.2.0-7ubuntu1) ... 393s Selecting previously unselected package gcc. 393s Preparing to unpack .../23-gcc_4%3a13.2.0-7ubuntu1_s390x.deb ... 393s Unpacking gcc (4:13.2.0-7ubuntu1) ... 393s Selecting previously unselected package libstdc++-13-dev:s390x. 393s Preparing to unpack .../24-libstdc++-13-dev_13.2.0-21ubuntu1_s390x.deb ... 393s Unpacking libstdc++-13-dev:s390x (13.2.0-21ubuntu1) ... 394s Selecting previously unselected package g++-13-s390x-linux-gnu. 394s Preparing to unpack .../25-g++-13-s390x-linux-gnu_13.2.0-21ubuntu1_s390x.deb ... 394s Unpacking g++-13-s390x-linux-gnu (13.2.0-21ubuntu1) ... 394s Selecting previously unselected package g++-13. 394s Preparing to unpack .../26-g++-13_13.2.0-21ubuntu1_s390x.deb ... 394s Unpacking g++-13 (13.2.0-21ubuntu1) ... 394s Selecting previously unselected package g++-s390x-linux-gnu. 394s Preparing to unpack .../27-g++-s390x-linux-gnu_4%3a13.2.0-7ubuntu1_s390x.deb ... 394s Unpacking g++-s390x-linux-gnu (4:13.2.0-7ubuntu1) ... 394s Selecting previously unselected package g++. 394s Preparing to unpack .../28-g++_4%3a13.2.0-7ubuntu1_s390x.deb ... 394s Unpacking g++ (4:13.2.0-7ubuntu1) ... 394s Selecting previously unselected package build-essential. 394s Preparing to unpack .../29-build-essential_12.10ubuntu1_s390x.deb ... 394s Unpacking build-essential (12.10ubuntu1) ... 394s Selecting previously unselected package libdebhelper-perl. 394s Preparing to unpack .../30-libdebhelper-perl_13.14.1ubuntu5_all.deb ... 394s Unpacking libdebhelper-perl (13.14.1ubuntu5) ... 394s Selecting previously unselected package libtool. 394s Preparing to unpack .../31-libtool_2.4.7-7_all.deb ... 394s Unpacking libtool (2.4.7-7) ... 394s Selecting previously unselected package dh-autoreconf. 394s Preparing to unpack .../32-dh-autoreconf_20_all.deb ... 394s Unpacking dh-autoreconf (20) ... 394s Selecting previously unselected package libarchive-zip-perl. 394s Preparing to unpack .../33-libarchive-zip-perl_1.68-1_all.deb ... 394s Unpacking libarchive-zip-perl (1.68-1) ... 395s Selecting previously unselected package libsub-override-perl. 395s Preparing to unpack .../34-libsub-override-perl_0.10-1_all.deb ... 395s Unpacking libsub-override-perl (0.10-1) ... 395s Selecting previously unselected package libfile-stripnondeterminism-perl. 395s Preparing to unpack .../35-libfile-stripnondeterminism-perl_1.13.1-1_all.deb ... 395s Unpacking libfile-stripnondeterminism-perl (1.13.1-1) ... 395s Selecting previously unselected package dh-strip-nondeterminism. 395s Preparing to unpack .../36-dh-strip-nondeterminism_1.13.1-1_all.deb ... 395s Unpacking dh-strip-nondeterminism (1.13.1-1) ... 395s Selecting previously unselected package debugedit. 395s Preparing to unpack .../37-debugedit_1%3a5.0-5build1_s390x.deb ... 395s Unpacking debugedit (1:5.0-5build1) ... 395s Selecting previously unselected package dwz. 395s Preparing to unpack .../38-dwz_0.15-1build5_s390x.deb ... 395s Unpacking dwz (0.15-1build5) ... 395s Selecting previously unselected package gettext. 395s Preparing to unpack .../39-gettext_0.21-14ubuntu1_s390x.deb ... 395s Unpacking gettext (0.21-14ubuntu1) ... 395s Selecting previously unselected package intltool-debian. 395s Preparing to unpack .../40-intltool-debian_0.35.0+20060710.6_all.deb ... 395s Unpacking intltool-debian (0.35.0+20060710.6) ... 395s Selecting previously unselected package po-debconf. 395s Preparing to unpack .../41-po-debconf_1.0.21+nmu1_all.deb ... 395s Unpacking po-debconf (1.0.21+nmu1) ... 395s Selecting previously unselected package debhelper. 395s Preparing to unpack .../42-debhelper_13.14.1ubuntu5_all.deb ... 395s Unpacking debhelper (13.14.1ubuntu5) ... 395s Selecting previously unselected package golang-1.22-src. 395s Preparing to unpack .../43-golang-1.22-src_1.22.1-1_all.deb ... 395s Unpacking golang-1.22-src (1.22.1-1) ... 398s Selecting previously unselected package golang-1.22-go. 398s Preparing to unpack .../44-golang-1.22-go_1.22.1-1_s390x.deb ... 398s Unpacking golang-1.22-go (1.22.1-1) ... 400s Selecting previously unselected package golang-golang-x-sys-dev. 400s Preparing to unpack .../45-golang-golang-x-sys-dev_0.17.0-1_all.deb ... 400s Unpacking golang-golang-x-sys-dev (0.17.0-1) ... 400s Selecting previously unselected package golang-golang-x-term-dev. 400s Preparing to unpack .../46-golang-golang-x-term-dev_0.17.0-1_all.deb ... 400s Unpacking golang-golang-x-term-dev (0.17.0-1) ... 400s Selecting previously unselected package golang-golang-x-text-dev. 400s Preparing to unpack .../47-golang-golang-x-text-dev_0.14.0-2_all.deb ... 400s Unpacking golang-golang-x-text-dev (0.14.0-2) ... 400s Selecting previously unselected package golang-golang-x-crypto-dev. 400s Preparing to unpack .../48-golang-golang-x-crypto-dev_1%3a0.19.0-1_all.deb ... 400s Unpacking golang-golang-x-crypto-dev (1:0.19.0-1) ... 401s Selecting previously unselected package golang-golang-x-net-dev. 401s Preparing to unpack .../49-golang-golang-x-net-dev_1%3a0.21.0+dfsg-1_all.deb ... 401s Unpacking golang-golang-x-net-dev (1:0.21.0+dfsg-1) ... 401s Selecting previously unselected package libpkgconf3:s390x. 401s Preparing to unpack .../50-libpkgconf3_1.8.1-2_s390x.deb ... 401s Unpacking libpkgconf3:s390x (1.8.1-2) ... 401s Selecting previously unselected package pkgconf-bin. 401s Preparing to unpack .../51-pkgconf-bin_1.8.1-2_s390x.deb ... 401s Unpacking pkgconf-bin (1.8.1-2) ... 401s Selecting previously unselected package pkgconf:s390x. 401s Preparing to unpack .../52-pkgconf_1.8.1-2_s390x.deb ... 401s Unpacking pkgconf:s390x (1.8.1-2) ... 401s Selecting previously unselected package xml-core. 401s Preparing to unpack .../53-xml-core_0.19_all.deb ... 401s Unpacking xml-core (0.19) ... 401s Selecting previously unselected package libdbus-1-dev:s390x. 401s Preparing to unpack .../54-libdbus-1-dev_1.14.10-4ubuntu2_s390x.deb ... 401s Unpacking libdbus-1-dev:s390x (1.14.10-4ubuntu2) ... 401s Selecting previously unselected package libnl-3-dev:s390x. 401s Preparing to unpack .../55-libnl-3-dev_3.7.0-0.3_s390x.deb ... 401s Unpacking libnl-3-dev:s390x (3.7.0-0.3) ... 401s Selecting previously unselected package libnl-route-3-dev:s390x. 401s Preparing to unpack .../56-libnl-route-3-dev_3.7.0-0.3_s390x.deb ... 401s Unpacking libnl-route-3-dev:s390x (3.7.0-0.3) ... 401s Selecting previously unselected package libibverbs-dev:s390x. 401s Preparing to unpack .../57-libibverbs-dev_50.0-2build1_s390x.deb ... 401s Unpacking libibverbs-dev:s390x (50.0-2build1) ... 401s Selecting previously unselected package libpcap0.8-dev:s390x. 401s Preparing to unpack .../58-libpcap0.8-dev_1.10.4-4.1ubuntu2_s390x.deb ... 401s Unpacking libpcap0.8-dev:s390x (1.10.4-4.1ubuntu2) ... 401s Selecting previously unselected package golang-github-google-gopacket-dev. 401s Preparing to unpack .../59-golang-github-google-gopacket-dev_1.1.19-4build1_all.deb ... 401s Unpacking golang-github-google-gopacket-dev (1.1.19-4build1) ... 401s Selecting previously unselected package golang-src. 401s Preparing to unpack .../60-golang-src_2%3a1.22~2_all.deb ... 401s Unpacking golang-src (2:1.22~2) ... 401s Selecting previously unselected package golang-go:s390x. 401s Preparing to unpack .../61-golang-go_2%3a1.22~2_s390x.deb ... 401s Unpacking golang-go:s390x (2:1.22~2) ... 401s Selecting previously unselected package dh-golang. 401s Preparing to unpack .../62-dh-golang_1.62_all.deb ... 401s Unpacking dh-golang (1.62) ... 401s Selecting previously unselected package autopkgtest-satdep. 401s Preparing to unpack .../63-1-autopkgtest-satdep.deb ... 401s Unpacking autopkgtest-satdep (0) ... 401s Setting up libarchive-zip-perl (1.68-1) ... 401s Setting up libdebhelper-perl (13.14.1ubuntu5) ... 401s Setting up golang-golang-x-sys-dev (0.17.0-1) ... 401s Setting up m4 (1.4.19-4) ... 401s Setting up golang-golang-x-term-dev (0.17.0-1) ... 401s Setting up libgomp1:s390x (14-20240315-1ubuntu1) ... 401s Setting up autotools-dev (20220109.1) ... 401s Setting up libpkgconf3:s390x (1.8.1-2) ... 401s Setting up golang-1.22-src (1.22.1-1) ... 401s Setting up libmpc3:s390x (1.3.1-1) ... 401s Setting up libatomic1:s390x (14-20240315-1ubuntu1) ... 401s Setting up autopoint (0.21-14ubuntu1) ... 401s Setting up pkgconf-bin (1.8.1-2) ... 401s Setting up autoconf (2.71-3) ... 401s Setting up libubsan1:s390x (14-20240315-1ubuntu1) ... 401s Setting up dwz (0.15-1build5) ... 401s Setting up libnl-3-dev:s390x (3.7.0-0.3) ... 401s Setting up golang-golang-x-text-dev (0.14.0-2) ... 401s Setting up libasan8:s390x (14-20240315-1ubuntu1) ... 401s Setting up debugedit (1:5.0-5build1) ... 401s Setting up libsub-override-perl (0.10-1) ... 401s Setting up libpcap0.8t64:s390x (1.10.4-4.1ubuntu2) ... 401s Setting up sgml-base (1.31) ... 401s Setting up golang-golang-x-crypto-dev (1:0.19.0-1) ... 401s Setting up libisl23:s390x (0.26-3) ... 401s Setting up golang-src (2:1.22~2) ... 401s Setting up libcc1-0:s390x (14-20240315-1ubuntu1) ... 401s Setting up libitm1:s390x (14-20240315-1ubuntu1) ... 401s Setting up automake (1:1.16.5-1.3ubuntu1) ... 402s update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode 402s Setting up libfile-stripnondeterminism-perl (1.13.1-1) ... 402s Setting up gettext (0.21-14ubuntu1) ... 402s Setting up golang-1.22-go (1.22.1-1) ... 402s Setting up pkgconf:s390x (1.8.1-2) ... 402s Setting up intltool-debian (0.35.0+20060710.6) ... 402s Setting up libnl-route-3-dev:s390x (3.7.0-0.3) ... 402s Setting up cpp-13-s390x-linux-gnu (13.2.0-21ubuntu1) ... 402s Setting up golang-golang-x-net-dev (1:0.21.0+dfsg-1) ... 402s Setting up dh-strip-nondeterminism (1.13.1-1) ... 402s Setting up libgcc-13-dev:s390x (13.2.0-21ubuntu1) ... 402s Setting up xml-core (0.19) ... 402s Setting up libstdc++-13-dev:s390x (13.2.0-21ubuntu1) ... 402s Setting up cpp-13 (13.2.0-21ubuntu1) ... 402s Setting up cpp-s390x-linux-gnu (4:13.2.0-7ubuntu1) ... 402s Setting up golang-go:s390x (2:1.22~2) ... 402s Setting up po-debconf (1.0.21+nmu1) ... 402s Setting up libibverbs-dev:s390x (50.0-2build1) ... 402s Setting up gcc-13-s390x-linux-gnu (13.2.0-21ubuntu1) ... 402s Setting up gcc-s390x-linux-gnu (4:13.2.0-7ubuntu1) ... 402s Setting up g++-13-s390x-linux-gnu (13.2.0-21ubuntu1) ... 402s Setting up gcc-13 (13.2.0-21ubuntu1) ... 402s Setting up cpp (4:13.2.0-7ubuntu1) ... 402s Setting up g++-13 (13.2.0-21ubuntu1) ... 402s Setting up libtool (2.4.7-7) ... 402s Setting up g++-s390x-linux-gnu (4:13.2.0-7ubuntu1) ... 402s Setting up gcc (4:13.2.0-7ubuntu1) ... 402s Setting up dh-autoreconf (20) ... 402s Setting up g++ (4:13.2.0-7ubuntu1) ... 402s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 402s Setting up build-essential (12.10ubuntu1) ... 402s Setting up debhelper (13.14.1ubuntu5) ... 402s Setting up dh-golang (1.62) ... 402s Processing triggers for libc-bin (2.39-0ubuntu6) ... 402s Processing triggers for man-db (2.12.0-3build4) ... 404s Processing triggers for install-info (7.1-3build1) ... 405s Processing triggers for sgml-base (1.31) ... 405s Setting up libdbus-1-dev:s390x (1.14.10-4ubuntu2) ... 405s Setting up libpcap0.8-dev:s390x (1.10.4-4.1ubuntu2) ... 405s Setting up golang-github-google-gopacket-dev (1.1.19-4build1) ... 405s Setting up autopkgtest-satdep (0) ... 409s (Reading database ... 101361 files and directories currently installed.) 409s Removing autopkgtest-satdep (0) ... 410s autopkgtest [23:15:44]: test dh-golang-autopkgtest: /usr/bin/dh_golang_autopkgtest 410s autopkgtest [23:15:44]: test dh-golang-autopkgtest: [----------------------- 410s [info] Testing github.com/google/gopacket... 410s [info] Source code installed by binary package, overriding dh_auto_configure... 410s -e: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 410s dh build --buildsystem=golang 410s dh_update_autotools_config -O--buildsystem=golang 410s dh_autoreconf -O--buildsystem=golang 410s debian/rules override_dh_auto_configure 410s make[1]: Entering directory '/tmp/autopkgtest.1ui73v/autopkgtest_tmp' 410s -e: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 410s mkdir -p "obj-s390x-linux-gnu" 410s # remove existing symlinks, since "cp -a" won't convert them 410s find "obj-s390x-linux-gnu" -type l -exec rm "{}" \; 410s cp -a /usr/share/gocode/src "obj-s390x-linux-gnu" 411s make[1]: Leaving directory '/tmp/autopkgtest.1ui73v/autopkgtest_tmp' 411s dh_auto_build -O--buildsystem=golang 411s dh_auto_build: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 411s cd obj-s390x-linux-gnu && go install -trimpath -v -p 1 github.com/google/gopacket github.com/google/gopacket/afpacket github.com/google/gopacket/bytediff github.com/google/gopacket/defrag/lcmdefrag github.com/google/gopacket/dumpcommand github.com/google/gopacket/ip4defrag github.com/google/gopacket/layers github.com/google/gopacket/macs github.com/google/gopacket/pcap github.com/google/gopacket/pcapgo github.com/google/gopacket/reassembly github.com/google/gopacket/routing github.com/google/gopacket/tcpassembly github.com/google/gopacket/tcpassembly/tcpreader 411s internal/goarch 411s internal/abi 412s internal/unsafeheader 412s internal/cpu 412s internal/bytealg 412s internal/chacha8rand 412s internal/coverage/rtcov 412s internal/godebugs 412s internal/goexperiment 412s internal/goos 412s runtime/internal/atomic 412s runtime/internal/math 412s runtime/internal/sys 412s runtime/internal/syscall 412s runtime 421s internal/reflectlite 422s errors 422s internal/race 422s sync/atomic 422s sync 422s io 422s unicode 422s unicode/utf8 422s bytes 423s internal/itoa 423s math/bits 423s math 423s strconv 424s reflect 426s cmp 426s slices 426s sort 427s internal/fmtsort 427s internal/oserror 427s syscall 428s internal/syscall/unix 428s time 429s internal/poll 430s internal/safefilepath 430s internal/syscall/execenv 430s internal/testlog 430s path 430s io/fs 430s os 431s fmt 431s strings 431s encoding/hex 431s context 432s vendor/golang.org/x/net/dns/dnsmessage 432s internal/bisect 432s internal/godebug 432s internal/nettrace 432s internal/singleflight 432s internal/intern 432s net/netip 433s runtime/cgo 434s net 437s runtime/debug 437s github.com/google/gopacket 438s encoding/binary 438s golang.org/x/net/bpf 438s golang.org/x/sys/unix 440s github.com/google/gopacket/afpacket 441s github.com/google/gopacket/bytediff 441s hash 441s hash/crc32 441s github.com/google/gopacket/layers 448s github.com/google/gopacket/defrag/lcmdefrag 448s encoding 448s flag 448s container/list 448s log/internal 448s log 448s github.com/google/gopacket/ip4defrag 448s github.com/google/gopacket/dumpcommand 448s github.com/google/gopacket/macs 450s github.com/google/gopacket/pcap 451s bufio 452s compress/flate 452s compress/gzip 452s github.com/google/gopacket/pcapgo 453s github.com/google/gopacket/reassembly 453s github.com/google/gopacket/routing 453s github.com/google/gopacket/tcpassembly 453s github.com/google/gopacket/tcpassembly/tcpreader 453s dh_auto_test -O--buildsystem=golang 453s dh_auto_test: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 453s cd obj-s390x-linux-gnu && go test -vet=off -v -p 1 github.com/google/gopacket github.com/google/gopacket/afpacket github.com/google/gopacket/bytediff github.com/google/gopacket/defrag/lcmdefrag github.com/google/gopacket/dumpcommand github.com/google/gopacket/ip4defrag github.com/google/gopacket/layers github.com/google/gopacket/macs github.com/google/gopacket/pcap github.com/google/gopacket/pcapgo github.com/google/gopacket/reassembly github.com/google/gopacket/routing github.com/google/gopacket/tcpassembly github.com/google/gopacket/tcpassembly/tcpreader 492s === RUN TestDumpEmbedded 492s --- PASS: TestDumpEmbedded (0.00s) 492s === RUN TestConcatPacketSources 492s --- PASS: TestConcatPacketSources (0.00s) 492s === RUN TestToDuration 492s --- PASS: TestToDuration (0.00s) 492s === RUN TestExponentialSizeIncreasePrepend 492s --- PASS: TestExponentialSizeIncreasePrepend (0.00s) 492s === RUN TestExponentialSizeIncreaseAppend 492s --- PASS: TestExponentialSizeIncreaseAppend (0.00s) 492s === RUN ExampleSerializeBuffer 492s --- PASS: ExampleSerializeBuffer (0.00s) 492s PASS 492s ok github.com/google/gopacket 0.007s 496s === RUN TestParseOptions 496s afpacket_test.go:32: got: afpacket.options{frameSize:4096, framesPerBlock:0, blockSize:2, numBlocks:128, addVLANHeader:false, blockTimeout:64000000, pollTimeout:-1000000, version:-1, socktype:3, iface:""} 496s err: block size 2 must be divisible by page size 4096 496s afpacket_test.go:32: got: afpacket.options{frameSize:333, framesPerBlock:0, blockSize:524288, numBlocks:128, addVLANHeader:false, blockTimeout:64000000, pollTimeout:-1000000, version:-1, socktype:3, iface:""} 496s err: block size 524288 must be divisible by frame size 333 496s afpacket_test.go:32: got: afpacket.options{frameSize:4096, framesPerBlock:0, blockSize:524288, numBlocks:128, addVLANHeader:false, blockTimeout:64000000, pollTimeout:-1000000, version:-3, socktype:3, iface:""} 496s err: tpacket version InvalidVersion is invalid 496s afpacket_test.go:32: got: afpacket.options{frameSize:4096, framesPerBlock:0, blockSize:524288, numBlocks:128, addVLANHeader:false, blockTimeout:64000000, pollTimeout:-1000000, version:5, socktype:3, iface:""} 496s err: tpacket version InvalidVersion is invalid 496s afpacket_test.go:32: got: afpacket.options{frameSize:1024, framesPerBlock:512, blockSize:524288, numBlocks:128, addVLANHeader:false, blockTimeout:64000000, pollTimeout:-1000000, version:-1, socktype:3, iface:""} 496s err: 496s --- PASS: TestParseOptions (0.00s) 496s PASS 496s ok github.com/google/gopacket/afpacket 0.003s 496s === RUN TestLCS 496s --- PASS: TestLCS (0.00s) 496s === RUN TestDiff 496s --- PASS: TestDiff (0.00s) 496s PASS 496s ok github.com/google/gopacket/bytediff 0.007s 504s === RUN TestOrderedLCMDefrag 504s --- PASS: TestOrderedLCMDefrag (0.00s) 504s === RUN TestUnorderedLCMDefrag 504s --- PASS: TestUnorderedLCMDefrag (0.00s) 504s === RUN TestNonLCMDefrag 504s --- PASS: TestNonLCMDefrag (0.00s) 504s PASS 504s ok github.com/google/gopacket/defrag/lcmdefrag 0.011s 504s ? github.com/google/gopacket/dumpcommand [no test files] 505s === RUN TestNotFrag 505s --- PASS: TestNotFrag (0.00s) 505s === RUN TestDefragPingMultipleFrags 505s --- PASS: TestDefragPingMultipleFrags (0.00s) 505s === RUN TestDefragPing1 505s --- PASS: TestDefragPing1 (0.00s) 505s === RUN TestDefragPing1and2 505s --- PASS: TestDefragPing1and2 (0.00s) 505s === RUN TestDefragTooSmall 505s --- PASS: TestDefragTooSmall (0.00s) 505s === RUN TestDefragFragmentOffset 505s --- PASS: TestDefragFragmentOffset (0.00s) 505s === RUN TestDefragDiscard 505s --- PASS: TestDefragDiscard (0.00s) 505s === RUN TestDefragMaxSize 505s --- PASS: TestDefragMaxSize (0.00s) 505s === RUN TestDefragIDField 505s --- PASS: TestDefragIDField (0.00s) 505s PASS 505s ok github.com/google/gopacket/ip4defrag 0.008s 515s === RUN TestASFPresencePongDecodeFromBytes 515s --- PASS: TestASFPresencePongDecodeFromBytes (0.00s) 515s === RUN TestASFPresencePongSupportsDCMI 515s --- PASS: TestASFPresencePongSupportsDCMI (0.00s) 515s === RUN TestASFPresencePongSerializeTo 515s --- PASS: TestASFPresencePongSerializeTo (0.00s) 515s === RUN TestASFDecodeFromBytes 515s --- PASS: TestASFDecodeFromBytes (0.00s) 515s === RUN TestASFSerializeTo 515s --- PASS: TestASFSerializeTo (0.00s) 515s === RUN TestBFDNoAuth 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 57 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 37 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 24 bytes 515s base_test.go:21: Got layer BFD, 24 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 71 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..57..] SrcMAC=00:10:94:00:00:02 DstMAC=00:00:01:00:00:01 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..37..] Version=4 IHL=5 TOS=0 Length=61 Id=0 Flags= FragOffset=0 TTL=10 Protocol=UDP Checksum=12120 SrcIP=192.85.1.2 DstIP=192.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..24..] SrcPort=49152 DstPort=3784(bfd-control) Length=32 Checksum=29233} 515s - Layer 4 (24 bytes) = BFD {Contents=[..24..] Payload=[] Version=1 Diagnostic=None State=Down Poll=false Final=false ControlPlaneIndependent=false AuthPresent=false Demand=false Multipoint=false DetectMultiplier=5 MyDiscriminator=1 YourDiscriminator=0 DesiredMinTxInterval=1000000 RequiredMinRxInterval=1000000 RequiredMinEchoRxInterval=0 AuthHeader=nil} 515s 515s --- PASS: TestBFDNoAuth (0.00s) 515s === RUN TestBFDAuthTypePassword 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 65 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 41 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 33 bytes 515s base_test.go:21: Got layer BFD, 33 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 79 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..65..] SrcMAC=00:10:94:00:00:02 DstMAC=00:00:01:00:00:01 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..41..] Version=4 IHL=5 TOS=0 Length=61 Id=0 Flags= FragOffset=0 TTL=10 Protocol=UDP Checksum=12120 SrcIP=192.85.1.2 DstIP=192.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..33..] SrcPort=49152 DstPort=3784(bfd-control) Length=41 Checksum=29233} 515s - Layer 4 (33 bytes) = BFD {Contents=[..33..] Payload=[] Version=1 Diagnostic=None State=Down Poll=false Final=false ControlPlaneIndependent=false AuthPresent=true Demand=false Multipoint=false DetectMultiplier=5 MyDiscriminator=1 YourDiscriminator=0 DesiredMinTxInterval=1000000 RequiredMinRxInterval=1000000 RequiredMinEchoRxInterval=0 AuthHeader={ AuthType=Simple Password KeyID=2 SequenceNumber=0 Data=[..6..]}} 515s 515s --- PASS: TestBFDAuthTypePassword (0.00s) 515s === RUN TestBFDAuthTypeKeyedMD5 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 80 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 515s base_test.go:21: Got layer BFD, 48 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 94 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..80..] SrcMAC=00:10:94:00:00:02 DstMAC=00:00:01:00:00:01 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..56..] Version=4 IHL=5 TOS=0 Length=76 Id=1 Flags= FragOffset=0 TTL=10 Protocol=UDP Checksum=12104 SrcIP=192.85.1.2 DstIP=192.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=1024 DstPort=3784(bfd-control) Length=56 Checksum=27340} 515s - Layer 4 (48 bytes) = BFD {Contents=[..48..] Payload=[] Version=1 Diagnostic=None State=Down Poll=false Final=false ControlPlaneIndependent=false AuthPresent=true Demand=false Multipoint=false DetectMultiplier=5 MyDiscriminator=1 YourDiscriminator=0 DesiredMinTxInterval=1000000 RequiredMinRxInterval=1000000 RequiredMinEchoRxInterval=0 AuthHeader={ AuthType=Keyed MD5 KeyID=2 SequenceNumber=5 Data=[..16..]}} 515s 515s --- PASS: TestBFDAuthTypeKeyedMD5 (0.00s) 515s === RUN TestBFDAuthTypeMeticulousKeyedSHA1 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 60 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 52 bytes 515s base_test.go:21: Got layer BFD, 52 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 98 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=00:10:94:00:00:02 DstMAC=00:00:01:00:00:01 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..60..] Version=4 IHL=5 TOS=0 Length=80 Id=0 Flags= FragOffset=0 TTL=10 Protocol=UDP Checksum=12101 SrcIP=192.85.1.2 DstIP=192.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..52..] SrcPort=1024 DstPort=3784(bfd-control) Length=60 Checksum=14218} 515s - Layer 4 (52 bytes) = BFD {Contents=[..52..] Payload=[] Version=1 Diagnostic=None State=Down Poll=false Final=false ControlPlaneIndependent=false AuthPresent=true Demand=false Multipoint=false DetectMultiplier=5 MyDiscriminator=1 YourDiscriminator=0 DesiredMinTxInterval=1000000 RequiredMinRxInterval=1000000 RequiredMinEchoRxInterval=0 AuthHeader={ AuthType=Meticulous Keyed SHA1 KeyID=2 SequenceNumber=5 Data=[..20..]}} 515s 515s --- PASS: TestBFDAuthTypeMeticulousKeyedSHA1 (0.00s) 515s === RUN TestFlowMapKey 515s --- PASS: TestFlowMapKey (0.00s) 515s === RUN TestDecodeSimpleTCPPacket 515s --- PASS: TestDecodeSimpleTCPPacket (0.00s) 515s === RUN TestDecodeSmallTCPPacketHasEmptyPayload 515s --- PASS: TestDecodeSmallTCPPacketHasEmptyPayload (0.00s) 515s === RUN TestDecodeVLANPacket 515s decode_test.go:568: Layer 0: &layers.Ethernet{BaseLayer:layers.BaseLayer{Contents:[]uint8{0x0, 0x10, 0xdb, 0xff, 0x10, 0x0, 0x0, 0x15, 0x2c, 0x9d, 0xcc, 0x0, 0x81, 0x0}, Payload:[]uint8{0x1, 0xf7, 0x8, 0x0, 0x45, 0x0, 0x0, 0x28, 0x29, 0x8d, 0x40, 0x0, 0x7d, 0x6, 0x83, 0xa0, 0xac, 0x1b, 0xca, 0x8e, 0x45, 0x16, 0x94, 0xe2, 0xd4, 0xa, 0x0, 0x50, 0xdf, 0xab, 0x9c, 0xc6, 0xcd, 0x1e, 0xe5, 0xd1, 0x50, 0x10, 0x1, 0x0, 0x5a, 0x74, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, SrcMAC:net.HardwareAddr{0x0, 0x15, 0x2c, 0x9d, 0xcc, 0x0}, DstMAC:net.HardwareAddr{0x0, 0x10, 0xdb, 0xff, 0x10, 0x0}, EthernetType:0x8100, Length:0x0} 515s decode_test.go:568: Layer 1: &layers.Dot1Q{BaseLayer:layers.BaseLayer{Contents:[]uint8{0x1, 0xf7, 0x8, 0x0}, Payload:[]uint8{0x45, 0x0, 0x0, 0x28, 0x29, 0x8d, 0x40, 0x0, 0x7d, 0x6, 0x83, 0xa0, 0xac, 0x1b, 0xca, 0x8e, 0x45, 0x16, 0x94, 0xe2, 0xd4, 0xa, 0x0, 0x50, 0xdf, 0xab, 0x9c, 0xc6, 0xcd, 0x1e, 0xe5, 0xd1, 0x50, 0x10, 0x1, 0x0, 0x5a, 0x74, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, Priority:0x0, DropEligible:false, VLANIdentifier:0x1f7, Type:0x800} 515s decode_test.go:568: Layer 2: &layers.IPv4{BaseLayer:layers.BaseLayer{Contents:[]uint8{0x45, 0x0, 0x0, 0x28, 0x29, 0x8d, 0x40, 0x0, 0x7d, 0x6, 0x83, 0xa0, 0xac, 0x1b, 0xca, 0x8e, 0x45, 0x16, 0x94, 0xe2}, Payload:[]uint8{0xd4, 0xa, 0x0, 0x50, 0xdf, 0xab, 0x9c, 0xc6, 0xcd, 0x1e, 0xe5, 0xd1, 0x50, 0x10, 0x1, 0x0, 0x5a, 0x74, 0x0, 0x0}}, Version:0x4, IHL:0x5, TOS:0x0, Length:0x28, Id:0x298d, Flags:0x2, FragOffset:0x0, TTL:0x7d, Protocol:0x6, Checksum:0x83a0, SrcIP:net.IP{0xac, 0x1b, 0xca, 0x8e}, DstIP:net.IP{0x45, 0x16, 0x94, 0xe2}, Options:[]layers.IPv4Option(nil), Padding:[]uint8(nil)} 515s decode_test.go:568: Layer 3: &layers.TCP{BaseLayer:layers.BaseLayer{Contents:[]uint8{0xd4, 0xa, 0x0, 0x50, 0xdf, 0xab, 0x9c, 0xc6, 0xcd, 0x1e, 0xe5, 0xd1, 0x50, 0x10, 0x1, 0x0, 0x5a, 0x74, 0x0, 0x0}, Payload:[]uint8{}}, SrcPort:0xd40a, DstPort:0x50, Seq:0xdfab9cc6, Ack:0xcd1ee5d1, DataOffset:0x5, FIN:false, SYN:false, RST:false, PSH:false, ACK:true, URG:false, ECE:false, CWR:false, NS:false, Window:0x100, Checksum:0x5a74, Urgent:0x0, sPort:[]uint8{0xd4, 0xa}, dPort:[]uint8{0x0, 0x50}, Options:[]layers.TCPOption{}, Padding:[]uint8(nil), opts:[4]layers.TCPOption{layers.TCPOption{OptionType:0x0, OptionLength:0x0, OptionData:[]uint8(nil)}, layers.TCPOption{OptionType:0x0, OptionLength:0x0, OptionData:[]uint8(nil)}, layers.TCPOption{OptionType:0x0, OptionLength:0x0, OptionData:[]uint8(nil)}, layers.TCPOption{OptionType:0x0, OptionLength:0x0, OptionData:[]uint8(nil)}}, tcpipchecksum:layers.tcpipchecksum{pseudoheader:layers.tcpipPseudoHeader(nil)}} 515s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 TCP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 50 bytes 515s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 46 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 20 bytes 515s base_test.go:21: Got layer TCP, 20 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 64 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..50..] SrcMAC=00:15:2c:9d:cc:00 DstMAC=00:10:db:ff:10:00 EthernetType=Dot1Q Length=0} 515s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 247, 8, 0] Payload=[..46..] Priority=0 DropEligible=false VLANIdentifier=503 Type=IPv4} 515s - Layer 3 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..20..] Version=4 IHL=5 TOS=0 Length=40 Id=10637 Flags=DF FragOffset=0 TTL=125 Protocol=TCP Checksum=33696 SrcIP=172.27.202.142 DstIP=69.22.148.226 Options=[] Padding=[]} 515s - Layer 4 (20 bytes) = TCP {Contents=[..20..] Payload=[] SrcPort=54282 DstPort=80(http) Seq=3752565958 Ack=3441354193 DataOffset=5 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=256 Checksum=23156 Urgent=0 Options=[] Padding=[]} 515s 515s --- PASS: TestDecodeVLANPacket (0.00s) 515s === RUN TestDecodeSCTPPackets 515s --- PASS: TestDecodeSCTPPackets (0.00s) 515s === RUN TestDecodeCiscoDiscovery 515s base_test.go:19: Checking packet layers, want [Ethernet LLC SNAP CiscoDiscovery CiscoDiscoveryInfo] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 451 bytes 515s base_test.go:21: Got layer LLC, 3 bytes, payload of 448 bytes 515s base_test.go:21: Got layer SNAP, 5 bytes, payload of 443 bytes 515s base_test.go:21: Got layer CiscoDiscovery, 4 bytes, payload of 439 bytes 515s base_test.go:21: Got layer CiscoDiscoveryInfo, 439 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 465 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..451..] SrcMAC=00:0b:be:18:9a:41 DstMAC=01:00:0c:cc:cc:cc EthernetType=LLC Length=451} 515s - Layer 2 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..448..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 515s - Layer 3 (05 bytes) = SNAP {Contents=[..5..] Payload=[..443..] OrganizationalCode=[0, 0, 12] Type=CiscoDiscovery} 515s - Layer 4 (04 bytes) = CiscoDiscovery {Contents=[2, 180, 9, 160] Payload=[..439..] Version=2 TTL=180 Checksum=2464 Values=[..13..]} 515s - Layer 5 (439 bytes) = CiscoDiscoveryInfo {Contents=[..439..] Payload=[] OUI=[0, 0, 12] ProtocolID=274 ClusterMaster=0.0.0.0 Unknown1=255.255.255.255 Version=1 SubVersion=2 Status=32 Unknown2=255 ClusterCommander=00:00:00:00:00:00 SwitchMAC=00:0b:be:18:9a:40 Unknown3=255 ManagementVLAN=0 DeviceID=myswitch Addresses=[192.168.0.253] PortID=FastEthernet0/1 Capabilities={ L3Router=false TBBridge=false SPBridge=false L2Switch=true IsHost=false IGMPFilter=true L1Repeater=false IsPhone=false RemotelyManaged=false} Version=Cisco Internetwork Operating System Software 515s IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA14, RELEASE SOFTWARE (fc1) 515s Technical Support: http://www.cisco.com/techsupport 515s Copyright (c) 1986-2010 by cisco Systems, Inc. 515s Compiled Tue 26-Oct-10 10:35 by nburra Platform=cisco WS-C2950-12 IPPrefixes=[] VTPDomain=MYDOMAIN NativeVLAN=1 FullDuplex=true VLANReply={ ID=0 VLAN=0} VLANQuery={ ID=0 VLAN=0} PowerConsumption=0 MTU=0 ExtendedTrust=0 UntrustedCOS=0 SysName= SysOID= MgmtAddresses=[192.168.0.253] Location={ Type=0 Location=} PowerRequest={ ID=0 MgmtID=0 Values=[]} PowerAvailable={ ID=0 MgmtID=0 Values=[]} SparePairPoe={ PSEFourWire=false PDArchShared=false PDRequestOn=false PSEOn=false} EnergyWise={ EncryptedData=[] Unknown1=0 SequenceNumber=0 ModelNumber= Unknown2=0 HardwareID= SerialNum= Unknown3=[] Role= Domain= Name= ReplyUnknown1=[] ReplyPort=[] ReplyAddress=[] ReplyUnknown2=[] ReplyUnknown3=[]} Unknown=[]} 515s 515s --- PASS: TestDecodeCiscoDiscovery (0.00s) 515s === RUN TestDecodeLinkLayerDiscovery 515s base_test.go:19: Checking packet layers, want [Ethernet LinkLayerDiscovery LinkLayerDiscoveryInfo] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 249 bytes 515s base_test.go:21: Got layer LinkLayerDiscovery, 249 bytes, payload of 0 bytes 515s base_test.go:21: Got layer LinkLayerDiscoveryInfo, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 263 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..249..] SrcMAC=00:01:30:f9:ad:a0 DstMAC=01:80:c2:00:00:0e EthernetType=LinkLayerDiscovery Length=0} 515s - Layer 2 (249 bytes) = LinkLayerDiscovery {Contents=[..249..] Payload=[] ChassisID={ Subtype=MAC Address ID=[..6..]} PortID={ Subtype=Interface Name ID=[49, 47, 49]} TTL=120 Values=[..13..]} 515s - Layer 3 (00 bytes) = LinkLayerDiscoveryInfo {Contents=[] Payload=[] PortDescription=Summit300-48-Port 1001 515s base_test.go:19: Checking packet layers, want [Ethernet LinkLayerDiscovery LinkLayerDiscoveryInfo] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 254 bytes 515s base_test.go:21: Got layer LinkLayerDiscovery, 254 bytes, payload of 0 bytes 515s base_test.go:21: Got layer LinkLayerDiscoveryInfo, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 268 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..254..] SrcMAC=00:13:21:57:ca:7f DstMAC=01:80:c2:00:00:0e EthernetType=LinkLayerDiscovery Length=0} 515s - Layer 2 (254 bytes) = LinkLayerDiscovery {Contents=[..254..] Payload=[] ChassisID={ Subtype=MAC Address ID=[..6..]} PortID={ Subtype=Local ID=[49]} TTL=120 Values=[..10..]} 515s - Layer 3 (00 bytes) = LinkLayerDiscoveryInfo {Contents=[] Payload=[] PortDescription=1 SysName=ProCurve Switch 2600-8-PWR SysDescription=ProCurve J8762A Switch 2600-8-PWR, revision H.08.89, ROM H.08.5X (/sw/code/build/fish(ts_08_5)) SysCapabilities={ SystemCap={ Other=false Repeater=false Bridge=true WLANAP=false Router=true Phone=false DocSis=false StationOnly=false CVLAN=false SVLAN=false TMPR=false} EnabledCap={ Other=false Repeater=false Bridge=true WLANAP=false Router=false Phone=false DocSis=false StationOnly=false CVLAN=false SVLAN=false TMPR=false}} MgmtAddress={ Subtype=IPv4 Address=[15, 255, 122, 148] InterfaceSubtype=IfIndex InterfaceNumber=0 OID=} OrgTLVs=[..5..] Unknown=[]} 515s 515s --- PASS: TestDecodeLinkLayerDiscovery (0.00s) 515s === RUN TestDecodeNortelDiscovery 515s base_test.go:19: Checking packet layers, want [Ethernet LLC SNAP NortelDiscovery] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 19 bytes 515s base_test.go:21: Got layer LLC, 3 bytes, payload of 16 bytes 515s base_test.go:21: Got layer SNAP, 5 bytes, payload of 11 bytes 515s base_test.go:21: Got layer NortelDiscovery, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..19..] SrcMAC=00:04:38:e0:cc:de DstMAC=01:00:81:00:01:00 EthernetType=LLC Length=19} 515s - Layer 2 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..16..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 515s - Layer 3 (05 bytes) = SNAP {Contents=[..5..] Payload=[..11..] OrganizationalCode=[0, 0, 129] Type=NortelDiscovery} 515s - Layer 4 (00 bytes) = NortelDiscovery {Contents=[] Payload=[] IPAddress=172.19.88.3 SegmentID=[0, 4, 21] Chassis=BayStack 450 10/100/1000 Switches Backplane=Ethernet, Fast Ethernet and Gigabit Ethernet State=Heartbeat NumLinks=0} 515s 515s --- PASS: TestDecodeNortelDiscovery (0.00s) 515s === RUN TestDecodeIPv6Jumbogram 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop TCP Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 70040 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 70000 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 69992 bytes 515s base_test.go:21: Got layer TCP, 20 bytes, payload of 69972 bytes 515s base_test.go:21: Got layer Payload, 69972 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 70054 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..70040..] SrcMAC=24:be:05:27:0b:17 DstMAC=00:1f:ca:b3:76:40 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..70000..] Version=6 TrafficClass=0 FlowLabel=0 Length=0 NextHeader=IPv6HopByHop HopLimit=64 SrcIP=::1 DstIP=::2 HopByHop={ Contents=[..8..] Payload=[..69992..] NextHeader=TCP HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 17, 112] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..69992..] NextHeader=TCP HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 17, 112] OptionAlignment=[0 0]}]} 515s - Layer 4 (20 bytes) = TCP {Contents=[..20..] Payload=[..69972..] SrcPort=8888(ddi-tcp-1) DstPort=80(http) Seq=0 Ack=0 DataOffset=5 FIN=false SYN=true RST=false PSH=false ACK=false URG=false ECE=false CWR=false NS=false Window=8192 Checksum=27864 Urgent=0 Options=[] Padding=[]} 515s - Layer 5 (69972 bytes) = Payload 69972 byte(s) 515s 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop TCP Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 70039 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 69999 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 69991 bytes 515s base_test.go:21: Got layer TCP, 20 bytes, payload of 69971 bytes 515s base_test.go:21: Got layer Payload, 69971 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 70053 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..70039..] SrcMAC=24:be:05:27:0b:17 DstMAC=00:1f:ca:b3:76:40 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..69999..] Version=6 TrafficClass=0 FlowLabel=0 Length=0 NextHeader=IPv6HopByHop HopLimit=64 SrcIP=::1 DstIP=::2 HopByHop={ Contents=[..8..] Payload=[..69991..] NextHeader=TCP HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 17, 112] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..69991..] NextHeader=TCP HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 17, 112] OptionAlignment=[0 0]}]} 515s - Layer 4 (20 bytes) = TCP {Contents=[..20..] Payload=[..69971..] SrcPort=8888(ddi-tcp-1) DstPort=80(http) Seq=0 Ack=0 DataOffset=5 FIN=false SYN=true RST=false PSH=false ACK=false URG=false ECE=false CWR=false NS=false Window=8192 Checksum=27864 Urgent=0 Options=[] Padding=[]} 515s - Layer 5 (69971 bytes) = Payload 69971 byte(s) 515s 515s --- PASS: TestDecodeIPv6Jumbogram (0.00s) 515s === RUN TestDecodeUDPPacketTooSmall 515s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 UDP Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 52 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 32 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 24 bytes 515s base_test.go:21: Got layer Payload, 24 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 70 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..56..] SrcMAC=00:10:db:ff:10:00 DstMAC=00:15:2c:9d:cc:00 EthernetType=Dot1Q Length=0} 515s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 247, 8, 0] Payload=[..52..] Priority=0 DropEligible=false VLANIdentifier=503 Type=IPv4} 515s - Layer 3 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..32..] Version=4 IHL=5 TOS=96 Length=60 Id=4009 Flags= FragOffset=0 TTL=110 Protocol=UDP Checksum=266 SrcIP=71.230.238.46 DstIP=172.22.89.115 Options=[] Padding=[]} 515s - Layer 4 (08 bytes) = UDP {Contents=[..8..] Payload=[..24..] SrcPort=80(http) DstPort=80(http) Length=40 Checksum=19885} 515s - Layer 5 (24 bytes) = Payload 24 byte(s) 515s 515s --- PASS: TestDecodeUDPPacketTooSmall (0.00s) 515s === RUN TestDecodingLayerParserFullTCPPacket 515s --- PASS: TestDecodingLayerParserFullTCPPacket (0.00s) 515s === RUN TestDecodingLayerMap 515s --- PASS: TestDecodingLayerMap (0.00s) 515s === RUN TestDecodingLayerSparse 515s --- PASS: TestDecodingLayerSparse (0.00s) 515s === RUN TestDecodingLayerArray 515s --- PASS: TestDecodingLayerArray (0.00s) 515s === RUN TestICMP 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 28 bytes 515s base_test.go:21: Got layer Payload, 28 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 70 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..56..] SrcMAC=00:1f:ca:b3:75:c0 DstMAC=24:be:05:27:0b:17 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..36..] Version=4 IHL=5 TOS=0 Length=56 Id=0 Flags= FragOffset=0 TTL=252 Protocol=ICMPv4 Checksum=55207 SrcIP=72.14.222.226 DstIP=172.29.20.15 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..28..] TypeCode=DestinationUnreachable(CommAdminProhibited) Checksum=37998 Id=0 Seq=0} 515s - Layer 4 (28 bytes) = Payload 28 byte(s) 515s 515s --- PASS: TestICMP (0.00s) 515s === RUN TestICMP6 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 32 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 28 bytes 515s base_test.go:21: Got layer ICMPv6NeighborSolicitation, 28 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 86 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=00:1f:ca:b3:75:c0 DstMAC=24:be:05:27:0b:17 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..32..] Version=6 TrafficClass=224 FlowLabel=0 Length=32 NextHeader=ICMPv6 HopLimit=255 SrcIP=fe80::21f:caff:feb3:75c0 DstIP=2620:0:1005:0:26be:5ff:fe27:b17 HopByHop=nil} 515s - Layer 3 (04 bytes) = ICMPv6 {Contents=[135, 0, 30, 186] Payload=[..28..] TypeCode=NeighborSolicitation Checksum=7866 TypeBytes=[]} 515s - Layer 4 (28 bytes) = ICMPv6NeighborSolicitation {Contents=[..28..] Payload=[] TargetAddress=2620:0:1005:0:26be:5ff:fe27:b17 Options=[ICMPv6Option(SourceAddress:00:1f:ca:b3:75:c0)]} 515s 515s --- PASS: TestICMP6 (0.00s) 515s === RUN TestMPLS 515s base_test.go:19: Checking packet layers, want [Ethernet MPLS IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 104 bytes 515s base_test.go:21: Got layer MPLS, 4 bytes, payload of 100 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 80 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 72 bytes 515s base_test.go:21: Got layer Payload, 72 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 118 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..104..] SrcMAC=00:30:96:05:28:38 DstMAC=00:30:96:e6:fc:39 EthernetType=MPLSUnicast Length=0} 515s - Layer 2 (04 bytes) = MPLS {Contents=[0, 1, 209, 255] Payload=[..100..] Label=29 TrafficClass=0 StackBottom=true TTL=255} 515s - Layer 3 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..80..] Version=4 IHL=5 TOS=0 Length=100 Id=11 Flags= FragOffset=0 TTL=255 Protocol=ICMPv4 Checksum=42345 SrcIP=10.1.2.1 DstIP=10.34.0.1 Options=[] Padding=[]} 515s - Layer 4 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=14966 Id=2618 Seq=1579} 515s - Layer 5 (72 bytes) = Payload 72 byte(s) 515s 515s --- PASS: TestMPLS (0.00s) 515s === RUN TestPPPGREIPv4IPv6VLAN 515s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv6 IPv4 GRE PPP IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 183 bytes 515s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 179 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 139 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 119 bytes 515s base_test.go:21: Got layer GRE, 16 bytes, payload of 103 bytes 515s base_test.go:21: Got layer PPP, 2 bytes, payload of 99 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 79 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 71 bytes 515s base_test.go:21: Got layer DNS, 71 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 197 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..183..] SrcMAC=00:12:1e:f2:61:3d DstMAC=c5:00:00:00:82:c4 EthernetType=Dot1Q Length=0} 515s - Layer 2 (04 bytes) = Dot1Q {Contents=[0, 100, 134, 221] Payload=[..179..] Priority=0 DropEligible=false VLANIdentifier=100 Type=IPv6} 515s - Layer 3 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..139..] Version=6 TrafficClass=0 FlowLabel=0 Length=139 NextHeader=IPv4 HopLimit=246 SrcIP=2402:f000:1:8e01::5555 DstIP=2607:fcd0:100:2300::b108:2a6b HopByHop=nil} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..119..] Version=4 IHL=5 TOS=0 Length=139 Id=36015 Flags= FragOffset=0 TTL=64 Protocol=GRE Checksum=30206 SrcIP=16.0.0.200 DstIP=192.52.166.154 Options=[] Padding=[]} 515s - Layer 5 (16 bytes) = GRE {Contents=[..16..] Payload=[..103..] ChecksumPresent=false RoutingPresent=false KeyPresent=true SeqPresent=true StrictSourceRoute=false AckPresent=true RecursionControl=0 Flags=16 Version=1 Protocol=PPP Checksum=0 Offset=0 Key=6756224 Seq=430001 Ack=539254nil} 515s - Layer 6 (02 bytes) = PPP {Contents=[0, 33] Payload=[..99..] PPPType=IPv4 HasPPTPHeader=true} 515s - Layer 7 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..79..] Version=4 IHL=5 TOS=0 Length=99 Id=0 Flags=DF FragOffset=0 TTL=60 Protocol=UDP Checksum=22119 SrcIP=172.16.44.3 DstIP=8.8.8.8 Options=[] Padding=[]} 515s - Layer 8 (08 bytes) = UDP {Contents=[..8..] Payload=[..71..] SrcPort=40768 DstPort=53(domain) Length=79 Checksum=64415} 515s - Layer 9 (71 bytes) = DNS {Contents=[..71..] Payload=[] ID=42540 QR=false OpCode=Query AA=false TC=false RD=true RA=false Z=0 ResponseCode=No Error QDCount=1 ANCount=0 NSCount=0 ARCount=0 Questions=[{Name=[..53..] Type=AAAA Class=IN}] Answers=[] Authorities=[] Additionals=[]} 515s 515s --- PASS: TestPPPGREIPv4IPv6VLAN (0.00s) 515s === RUN TestPPPoEICMPv6 515s base_test.go:19: Checking packet layers, want [Ethernet PPPoE PPP IPv6 ICMPv6 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 515s base_test.go:21: Got layer PPPoE, 6 bytes, payload of 66 bytes 515s base_test.go:21: Got layer PPP, 2 bytes, payload of 64 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 515s base_test.go:21: Got layer ICMPv6NeighborAdvertisement, 20 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 86 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=ca:01:0e:88:00:06 DstMAC=cc:05:0e:88:00:00 EthernetType=PPPoESession Length=0} 515s - Layer 2 (06 bytes) = PPPoE {Contents=[..6..] Payload=[..66..] Version=1 Type=1 Code=PPP SessionId=17 Length=66} 515s - Layer 3 (02 bytes) = PPP {Contents=[0, 87] Payload=[..64..] PPPType=IPv6 HasPPTPHeader=false} 515s - Layer 4 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..24..] Version=6 TrafficClass=224 FlowLabel=0 Length=24 NextHeader=ICMPv6 HopLimit=255 SrcIP=fe80::c801:eff:fe88:8 DstIP=ff02::1 HopByHop=nil} 515s - Layer 5 (04 bytes) = ICMPv6 {Contents=[136, 0, 80, 131] Payload=[..20..] TypeCode=NeighborAdvertisement Checksum=20611 TypeBytes=[]} 515s - Layer 6 (20 bytes) = ICMPv6NeighborAdvertisement {Contents=[..20..] Payload=[] Flags=128 TargetAddress=fe80::c801:eff:fe88:8 Options=[]} 515s 515s --- PASS: TestPPPoEICMPv6 (0.00s) 515s === RUN TestPFLogUDP 515s base_test.go:19: Checking packet layers, want [PFLog IPv4 UDP Payload] 515s base_test.go:21: Got layer PFLog, 64 bytes, payload of 44 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 24 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 16 bytes 515s base_test.go:21: Got layer Payload, 16 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 108 bytes 515s - Layer 1 (64 bytes) = PFLog {Contents=[..64..] Payload=[..44..] Length=61 Family=IPv4 Action=0 Reason=0 IFName=[..16..] Ruleset=[..16..] RuleNum=0 SubruleNum=174 UID=4294967167 PID=-1601830656 RuleUID=0 RulePID=-1061683200 Direction=2} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..24..] Version=4 IHL=5 TOS=0 Length=44 Id=534 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=20144 SrcIP=172.23.232.204 DstIP=172.23.232.255 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..16..] SrcPort=61695 DstPort=8612(canon-bjnp2) Length=24 Checksum=10789} 515s - Layer 4 (16 bytes) = Payload 16 byte(s) 515s 515s --- PASS: TestPFLogUDP (0.00s) 515s === RUN TestRegressionDot1QPriority 515s --- PASS: TestRegressionDot1QPriority (0.00s) 515s === RUN TestPacketMPLSInMPLS 515s base_test.go:19: Checking packet layers, want [Ethernet MPLS MPLS IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 515s base_test.go:21: Got layer MPLS, 4 bytes, payload of 104 bytes 515s base_test.go:21: Got layer MPLS, 4 bytes, payload of 100 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 80 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 72 bytes 515s base_test.go:21: Got layer Payload, 72 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 122 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..108..] SrcMAC=00:30:96:05:28:38 DstMAC=00:30:96:e6:fc:39 EthernetType=MPLSUnicast Length=0} 515s - Layer 2 (04 bytes) = MPLS {Contents=[0, 1, 32, 255] Payload=[..104..] Label=18 TrafficClass=0 StackBottom=false TTL=255} 515s - Layer 3 (04 bytes) = MPLS {Contents=[0, 1, 1, 255] Payload=[..100..] Label=16 TrafficClass=0 StackBottom=true TTL=255} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..80..] Version=4 IHL=5 TOS=0 Length=100 Id=80 Flags= FragOffset=0 TTL=255 Protocol=ICMPv4 Checksum=42758 SrcIP=10.31.0.1 DstIP=10.34.0.1 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=48401 Id=3941 Seq=4768} 515s - Layer 6 (72 bytes) = Payload 72 byte(s) 515s 515s --- PASS: TestPacketMPLSInMPLS (0.00s) 515s === RUN TestPacketIPv4Fragmented 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 Fragment] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 515s base_test.go:21: Got layer Fragment, 36 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 70 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..56..] SrcMAC=00:40:33:d9:7c:fd DstMAC=00:00:39:cf:d9:cd EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..36..] Version=4 IHL=5 TOS=0 Length=56 Id=242 Flags=MF FragOffset=0 TTL=64 Protocol=UDP Checksum=44855 SrcIP=10.1.1.1 DstIP=129.111.30.27 Options=[] Padding=[]} 515s - Layer 3 (36 bytes) = Fragment 36 byte(s) 515s 515s --- PASS: TestPacketIPv4Fragmented (0.00s) 515s === RUN TestSCTPChunkBadLength 515s --- PASS: TestSCTPChunkBadLength (0.00s) 515s === RUN TestSTP 515s base_test.go:19: Checking packet layers, want [Ethernet LLC STP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 38 bytes 515s base_test.go:21: Got layer LLC, 3 bytes, payload of 35 bytes 515s base_test.go:21: Got layer STP, 35 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..38..] SrcMAC=00:1c:0e:87:85:04 DstMAC=01:80:c2:00:00:00 EthernetType=LLC Length=38} 515s - Layer 2 (03 bytes) = LLC {Contents=[66, 66, 3] Payload=[..35..] DSAP=66 IG=false SSAP=66 CR=false Control=3} 515s - Layer 3 (35 bytes) = STP {Contents=[..35..] Payload=[]} 515s 515s --- PASS: TestSTP (0.00s) 515s === RUN TestDHCPv4EncodeRequest 515s --- PASS: TestDHCPv4EncodeRequest (0.00s) 515s === RUN TestDHCPv4EncodeResponse 515s --- PASS: TestDHCPv4EncodeResponse (0.00s) 515s === RUN TestDHCPv4DecodeOption 515s --- PASS: TestDHCPv4DecodeOption (0.00s) 515s === RUN TestDHCPv6EncodeRequest 515s --- PASS: TestDHCPv6EncodeRequest (0.00s) 515s === RUN TestDHCPv6EncodeReply 515s --- PASS: TestDHCPv6EncodeReply (0.00s) 515s === RUN TestPacketDNSRegression 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 68 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 48 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 40 bytes 515s base_test.go:21: Got layer DNS, 40 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 82 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..68..] SrcMAC=00:0f:35:bb:0b:40 DstMAC=00:22:19:b6:7e:22 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..48..] Version=4 IHL=5 TOS=0 Length=68 Id=35268 Flags= FragOffset=0 TTL=56 Protocol=UDP Checksum=12093 SrcIP=109.194.160.4 DstIP=95.211.92.14 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..40..] SrcPort=57766 DstPort=53(domain) Length=48 Checksum=42391} 515s - Layer 4 (40 bytes) = DNS {Contents=[..40..] Payload=[] ID=63000 QR=false OpCode=Query AA=false TC=false RD=false RA=false Z=1 ResponseCode=No Error QDCount=1 ANCount=0 NSCount=0 ARCount=1 Questions=[{Name=[..11..] Type=A Class=IN}] Answers=[] Authorities=[] Additionals=[{Name=[] Type=OPT Class=Unknown TTL=32768 DataLength=0 Data=[] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestPacketDNSRegression (0.00s) 515s === RUN TestParseDNSTypeTXT 515s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 515s base_test.go:21: Got layer Loopback, 4 bytes, payload of 115 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 95 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 87 bytes 515s base_test.go:21: Got layer DNS, 87 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 119 bytes 515s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..115..] Family=IPv4} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..95..] Version=4 IHL=5 TOS=0 Length=115 Id=0 Flags=DF FragOffset=0 TTL=57 Protocol=UDP Checksum=25752 SrcIP=208.67.222.222 DstIP=10.186.35.6 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..87..] SrcPort=53(domain) DstPort=33202 Length=95 Checksum=56501} 515s - Layer 4 (87 bytes) = DNS {Contents=[..87..] Payload=[] ID=39025 QR=true OpCode=Query AA=false TC=false RD=true RA=true Z=0 ResponseCode=No Error QDCount=1 ANCount=1 NSCount=0 ARCount=1 Questions=[{Name=[..10..] Type=TXT Class=IN}] Answers=[{Name=[..10..] Type=TXT Class=IN TTL=3600 DataLength=36 Data=[..36..] IP= NS=[] CNAME=[] PTR=[] TXTs=[[..35..]] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[..36..]}] Authorities=[] Additionals=[{Name=[] Type=OPT Class=Unknown TTL=0 DataLength=0 Data=[] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestParseDNSTypeTXT (0.00s) 515s === RUN TestParseDNSBadVers 515s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 515s base_test.go:21: Got layer Loopback, 4 bytes, payload of 56 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 28 bytes 515s base_test.go:21: Got layer DNS, 28 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..56..] Family=IPv4} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..36..] Version=4 IHL=5 TOS=0 Length=56 Id=42400 Flags=DF FragOffset=0 TTL=56 Protocol=UDP Checksum=189 SrcIP=192.5.5.241 DstIP=172.30.42.67 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..28..] SrcPort=53(domain) DstPort=64888 Length=36 Checksum=16577} 515s - Layer 4 (28 bytes) = DNS {Contents=[..28..] Payload=[] ID=36787 QR=true OpCode=Query AA=false TC=false RD=true RA=false Z=0 ResponseCode=Bad OPT Version QDCount=1 ANCount=0 NSCount=0 ARCount=1 Questions=[{Name=[] Type=TXT Class=IN}] Answers=[] Authorities=[] Additionals=[{Name=[] Type=OPT Class=Unknown TTL=16777216 DataLength=0 Data=[] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestParseDNSBadVers (0.00s) 515s === RUN TestParseDNSBadCookie 515s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 515s base_test.go:21: Got layer Loopback, 4 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer DNS, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 88 bytes 515s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..84..] Family=IPv4} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=65194 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=0 SrcIP=127.0.0.1 DstIP=127.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..56..] SrcPort=53(domain) DstPort=54954 Length=64 Checksum=65107} 515s - Layer 4 (56 bytes) = DNS {Contents=[..56..] Payload=[] ID=63147 QR=true OpCode=Query AA=false TC=false RD=true RA=true Z=0 ResponseCode=Bad Cookie QDCount=1 ANCount=0 NSCount=0 ARCount=1 Questions=[{Name=[] Type=SOA Class=IN}] Answers=[] Authorities=[] Additionals=[{Name=[] Type=OPT Class=Unknown TTL=16777216 DataLength=28 Data=[..28..] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[Cookie=36bf111fef2e01097d8ffe065c636ffb142d767494407a73] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestParseDNSBadCookie (0.00s) 515s === RUN TestParseDNSTypeURI 515s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 515s base_test.go:21: Got layer Loopback, 4 bytes, payload of 111 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 91 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 83 bytes 515s base_test.go:21: Got layer DNS, 83 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 115 bytes 515s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..111..] Family=IPv4} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..91..] Version=4 IHL=5 TOS=0 Length=111 Id=15973 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=15895 SrcIP=127.0.0.1 DstIP=127.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..83..] SrcPort=53(domain) DstPort=59347 Length=91 Checksum=65134} 515s - Layer 4 (83 bytes) = DNS {Contents=[..83..] Payload=[] ID=44845 QR=true OpCode=Query AA=true TC=false RD=true RA=true Z=0 ResponseCode=No Error QDCount=1 ANCount=1 NSCount=0 ARCount=1 Questions=[{Name=[..14..] Type=URI Class=IN}] Answers=[{Name=[..14..] Type=URI Class=IN TTL=10800 DataLength=28 Data=[..28..] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=10 Weight=5 Target=[..24..]} TXT=[]}] Authorities=[] Additionals=[{Name=[] Type=OPT Class=Unknown TTL=0 DataLength=0 Data=[] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestParseDNSTypeURI (0.00s) 515s === RUN TestParseDNSTypeOPT 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 88 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 68 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 60 bytes 515s base_test.go:21: Got layer DNS, 60 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 102 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..88..] SrcMAC=00:1c:c0:93:33:fb DstMAC=00:90:0b:12:91:c1 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..68..] Version=4 IHL=5 TOS=0 Length=90 Id=52824 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=26594 SrcIP=172.16.1.199 DstIP=75.75.75.75 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..60..] SrcPort=54784 DstPort=53(domain) Length=70 Checksum=17584} 515s - Layer 4 (60 bytes) = DNS {Contents=[..60..] Payload=[] ID=20498 QR=false OpCode=Query AA=false TC=false RD=true RA=false Z=0 ResponseCode=No Error QDCount=1 ANCount=0 NSCount=0 ARCount=1 Questions=[{Name=[..12..] Type=A Class=IN}] Answers=[] Authorities=[] Additionals=[{Name=[] Type=OPT Class=Unknown TTL=32768 DataLength=19 Data=[..19..] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[DeviceID=4f70656e444e530123456789abcdef] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestParseDNSTypeOPT (0.00s) 515s === RUN TestDNSEncodeQuery 515s --- PASS: TestDNSEncodeQuery (0.00s) 515s === RUN TestDNSEncodeQueryWithOPT 515s --- PASS: TestDNSEncodeQueryWithOPT (0.00s) 515s === RUN TestDNSEncodeResponse 515s --- PASS: TestDNSEncodeResponse (0.00s) 515s === RUN TestDNSMalformedPacket 515s --- PASS: TestDNSMalformedPacket (0.00s) 515s === RUN TestDNSMalformedPacket2 515s --- PASS: TestDNSMalformedPacket2 (0.00s) 515s === RUN TestBlankNameRootQuery 515s --- PASS: TestBlankNameRootQuery (0.00s) 515s === RUN TestAnotherMalformedDNS 515s --- PASS: TestAnotherMalformedDNS (0.00s) 515s === RUN TestMalformedDNSAgain 515s --- PASS: TestMalformedDNSAgain (0.00s) 515s === RUN TestMalformedDNSOhGodMakeItStop 515s --- PASS: TestMalformedDNSOhGodMakeItStop (0.00s) 515s === RUN TestMalformedDNSOPT 515s --- PASS: TestMalformedDNSOPT (0.00s) 515s === RUN TestPacketDNSPanic7 515s --- PASS: TestPacketDNSPanic7 (0.00s) 515s === RUN TestDNSPacketWriteAnswer 515s dns_test.go:1126: DNS {Contents=[..86..] Payload=[] ID=4660 QR=true OpCode=Query AA=false TC=false RD=false RA=false Z=0 ResponseCode=No Error QDCount=0 ANCount=2 NSCount=0 ARCount=0 Questions=[] Answers=[{Name=[..15..] Type=A Class=IN TTL=0 DataLength=4 Data=[127, 0, 0, 1] IP=127.0.0.1 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..15..] Type=AAAA Class=IN TTL=0 DataLength=16 Data=[..16..] IP=::1 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}] Authorities=[] Additionals=[]} 515s --- PASS: TestDNSPacketWriteAnswer (0.00s) 515s === RUN TestPacketDot11CtrlCTS 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 515s base_test.go:21: Got layer RadioTap, 25 bytes, payload of 14 bytes 515s base_test.go:21: Got layer Dot11, 10 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 39 bytes 515s - Layer 1 (25 bytes) = RadioTap {Contents=[..25..] Payload=[..14..] Version=0 Length=25 Present=2159 TSFT=20604983 Flags=SHORT-PREAMBLE,FCS Rate=24 Mb/s ChannelFrequency=5240 MHz ChannelFlags=OFDM,Ghz5 FHSS=0 DBMAntennaSignal=-79 DBMAntennaNoise=-92 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=1 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (10 bytes) = Dot11 {Contents=[..10..] Payload=[] Type=CtrlCTS Proto=0 Flags= DurationID=148 Address1=d8:a2:5e:97:61:c1 Address2= Address3= Address4= SequenceNumber=0 FragmentNumber=0 Checksum=2392150070 QOS=nil HTControl=nil DataLayer=nil} 515s 515s --- PASS: TestPacketDot11CtrlCTS (0.00s) 515s === RUN TestPacketDot11MgmtBeacon 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11MgmtBeacon Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement] 515s base_test.go:21: Got layer RadioTap, 18 bytes, payload of 221 bytes 515s base_test.go:21: Got layer Dot11, 24 bytes, payload of 193 bytes 515s base_test.go:21: Got layer Dot11MgmtBeacon, 193 bytes, payload of 181 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 5 bytes, payload of 176 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 10 bytes, payload of 166 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 3 bytes, payload of 163 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 6 bytes, payload of 157 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 3 bytes, payload of 154 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 26 bytes, payload of 128 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 32 bytes, payload of 96 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 28 bytes, payload of 68 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 28 bytes, payload of 40 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 24 bytes, payload of 16 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 6 bytes, payload of 10 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 10 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 239 bytes 515s - Layer 1 (18 bytes) = RadioTap {Contents=[..18..] Payload=[..221..] Version=0 Length=18 Present=18478 TSFT=0 Flags=FCS Rate=6 Mb/s ChannelFrequency=2412 MHz ChannelFlags=OFDM,Ghz2 FHSS=0 DBMAntennaSignal=-81 DBMAntennaNoise=0 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=5 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[..193..] Type=MgmtBeacon Proto=0 Flags= DurationID=0 Address1=ff:ff:ff:ff:ff:ff Address2=c0:8a:de:01:11:b8 Address3=c0:8a:de:01:11:b8 Address4= SequenceNumber=2431 FragmentNumber=0 Checksum=361761684 QOS=nil HTControl=nil DataLayer=nil} 515s - Layer 3 (193 bytes) = Dot11MgmtBeacon {Contents=[..193..] Payload=[..181..] Timestamp=84761702784 Interval=100 Flags=1057} 515s - Layer 4 (05 bytes) = Dot11InformationElement 802.11 Information Element (ID: SSID parameter set, Length: 3, SSID: Wi2) 515s - Layer 5 (10 bytes) = Dot11InformationElement 802.11 Information Element (ID: Supported Rates, Length: 8, Rates: 6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 Mbit) 515s - Layer 6 (03 bytes) = Dot11InformationElement 802.11 Information Element (ID: DS Parameter set, Length: 1, Info: 01) 515s - Layer 7 (06 bytes) = Dot11InformationElement 802.11 Information Element (ID: Traffic Indication Map (TIM), Length: 4, Info: 00010000) 515s - Layer 8 (03 bytes) = Dot11InformationElement 802.11 Information Element (ID: ERP Information, Length: 1, Info: 00) 515s - Layer 9 (26 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 24, OUI: 0050F202, Info: 0101810007A4000023A4000042435E0062322F00) 515s - Layer 10 (32 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 30, OUI: 00904C33, Info: 8C011BFFFF000000000000000000001000000000000000000000) 515s - Layer 11 (28 bytes) = Dot11InformationElement 802.11 Information Element (ID: HT Capabilities (802.11n D1.10), Length: 26, Info: 8C011BFFFF000000000000000000001000000000000000000000) 515s - Layer 12 (28 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 26, OUI: 00904C34, Info: 01000000000000000000000000000000000000000000) 515s - Layer 13 (24 bytes) = Dot11InformationElement 802.11 Information Element (ID: HT Information (802.11n D1.10), Length: 22, Info: 01000000000000000000000000000000000000000000) 515s - Layer 14 (06 bytes) = Dot11InformationElement 802.11 Information Element (ID: Extended Capabilities, Length: 4, Info: 00000000) 515s - Layer 15 (10 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 8, OUI: 00139201, Info: 00018500) 515s 515s --- PASS: TestPacketDot11MgmtBeacon (0.00s) 515s === RUN TestPacketDot11DataQOSData 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11DataQOSData Dot11Data LLC SNAP ARP] 515s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 66 bytes 515s base_test.go:21: Got layer Dot11, 26 bytes, payload of 36 bytes 515s base_test.go:21: Got layer Dot11DataQOSData, 0 bytes, payload of 36 bytes 515s base_test.go:21: Got layer Dot11Data, 0 bytes, payload of 36 bytes 515s base_test.go:21: Got layer LLC, 3 bytes, payload of 33 bytes 515s base_test.go:21: Got layer SNAP, 5 bytes, payload of 28 bytes 515s base_test.go:21: Got layer ARP, 28 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 96 bytes 515s - Layer 1 (32 bytes) = RadioTap {Contents=[..32..] Payload=[..66..] Version=0 Length=32 Present=264295 TSFT=638790765 Flags=SHORT-PREAMBLE,DATAPAD Rate=54 Mb/s ChannelFrequency=0 MHz ChannelFlags= FHSS=0 DBMAntennaSignal=-51 DBMAntennaNoise=-96 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=2 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (26 bytes) = Dot11 {Contents=[..26..] Payload=[..36..] Type=DataQOSData Proto=0 Flags=TO-DS DurationID=44 Address1=06:03:7f:07:a0:16 Address2=00:19:e3:d3:53:52 Address3=ff:ff:ff:ff:ff:ff Address4= SequenceNumber=1605 FragmentNumber=0 Checksum=3879274892 QOS={ TID=0 EOSP=false AckPolicy=normal-ack TXOP=0} HTControl=nil DataLayer={ Contents=[] Payload=[..36..]}} 515s - Layer 3 (00 bytes) = Dot11DataQOSData {Contents=[] Payload=[..36..]} 515s - Layer 4 (00 bytes) = Dot11Data {Contents=[] Payload=[..36..]} 515s - Layer 5 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..33..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 515s - Layer 6 (05 bytes) = SNAP {Contents=[..5..] Payload=[..28..] OrganizationalCode=[0, 0, 0] Type=ARP} 515s - Layer 7 (28 bytes) = ARP {Contents=[..28..] Payload=[] AddrType=Ethernet Protocol=IPv4 HwAddressSize=6 ProtAddressSize=4 Operation=1 SourceHwAddress=[..6..] SourceProtAddress=[169, 254, 247, 0] DstHwAddress=[..6..] DstProtAddress=[140, 180, 51, 68]} 515s 515s --- PASS: TestPacketDot11DataQOSData (0.00s) 515s === RUN TestPacketDot11MgmtAction 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11MgmtAction] 515s base_test.go:21: Got layer RadioTap, 18 bytes, payload of 35 bytes 515s base_test.go:21: Got layer Dot11, 24 bytes, payload of 7 bytes 515s base_test.go:21: Got layer Dot11MgmtAction, 7 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 53 bytes 515s - Layer 1 (18 bytes) = RadioTap {Contents=[..18..] Payload=[..35..] Version=0 Length=18 Present=18478 TSFT=0 Flags=FCS Rate=1 Mb/s ChannelFrequency=2412 MHz ChannelFlags=CCK,Ghz2 FHSS=0 DBMAntennaSignal=-67 DBMAntennaNoise=0 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=5 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[..7..] Type=MgmtAction Proto=0 Flags= DurationID=0 Address1=ff:ff:ff:ff:ff:ff Address2=8e:3a:e3:44:ac:c6 Address3=8e:3a:e3:44:ac:c6 Address4= SequenceNumber=432 FragmentNumber=0 Checksum=871381333 QOS=nil HTControl=nil DataLayer=nil} 515s - Layer 3 (07 bytes) = Dot11MgmtAction {Contents=[..7..] Payload=[]} 515s 515s --- PASS: TestPacketDot11MgmtAction (0.00s) 515s === RUN TestPacketDot11CtrlAck 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 515s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 14 bytes 515s base_test.go:21: Got layer Dot11, 10 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 46 bytes 515s - Layer 1 (32 bytes) = RadioTap {Contents=[..32..] Payload=[..14..] Version=0 Length=32 Present=264295 TSFT=638758038 Flags=SHORT-PREAMBLE,FCS,DATAPAD Rate=24 Mb/s ChannelFrequency=0 MHz ChannelFlags= FHSS=0 DBMAntennaSignal=-39 DBMAntennaNoise=-96 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=2 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (10 bytes) = Dot11 {Contents=[..10..] Payload=[] Type=CtrlAck Proto=0 Flags= DurationID=0 Address1=00:19:e3:d3:53:52 Address2= Address3= Address4= SequenceNumber=0 FragmentNumber=0 Checksum=2272717126 QOS=nil HTControl=nil DataLayer=nil} 515s 515s --- PASS: TestPacketDot11CtrlAck (0.00s) 515s === RUN TestPacketDot11DataARP 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11Data LLC SNAP ARP] 515s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 64 bytes 515s base_test.go:21: Got layer Dot11, 24 bytes, payload of 36 bytes 515s base_test.go:21: Got layer Dot11Data, 0 bytes, payload of 36 bytes 515s base_test.go:21: Got layer LLC, 3 bytes, payload of 33 bytes 515s base_test.go:21: Got layer SNAP, 5 bytes, payload of 28 bytes 515s base_test.go:21: Got layer ARP, 28 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 92 bytes 515s - Layer 1 (32 bytes) = RadioTap {Contents=[..32..] Payload=[..64..] Version=0 Length=32 Present=264295 TSFT=622463798 Flags=SHORT-PREAMBLE,DATAPAD Rate=6 Mb/s ChannelFrequency=0 MHz ChannelFlags= FHSS=0 DBMAntennaSignal=-39 DBMAntennaNoise=-96 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=2 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[..36..] Type=Data Proto=0 Flags=FROM-DS DurationID=0 Address1=ff:ff:ff:ff:ff:ff Address2=06:03:7f:07:a0:16 Address3=00:19:e3:d3:53:52 Address4= SequenceNumber=2046 FragmentNumber=0 Checksum=2997778574 QOS=nil HTControl=nil DataLayer={ Contents=[] Payload=[..36..]}} 515s - Layer 3 (00 bytes) = Dot11Data {Contents=[] Payload=[..36..]} 515s - Layer 4 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..33..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 515s - Layer 5 (05 bytes) = SNAP {Contents=[..5..] Payload=[..28..] OrganizationalCode=[0, 0, 0] Type=ARP} 515s - Layer 6 (28 bytes) = ARP {Contents=[..28..] Payload=[] AddrType=Ethernet Protocol=IPv4 HwAddressSize=6 ProtAddressSize=4 Operation=1 SourceHwAddress=[..6..] SourceProtAddress=[169, 254, 247, 0] DstHwAddress=[..6..] DstProtAddress=[67, 8, 14, 54]} 515s 515s --- PASS: TestPacketDot11DataARP (0.00s) 515s === RUN TestPacketDot11DataIP 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11Data LLC SNAP IPv4 UDP DHCPv4] 515s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 364 bytes 515s base_test.go:21: Got layer Dot11, 24 bytes, payload of 336 bytes 515s base_test.go:21: Got layer Dot11Data, 0 bytes, payload of 336 bytes 515s base_test.go:21: Got layer LLC, 3 bytes, payload of 333 bytes 515s base_test.go:21: Got layer SNAP, 5 bytes, payload of 328 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 308 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 300 bytes 515s base_test.go:21: Got layer DHCPv4, 300 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 392 bytes 515s - Layer 1 (32 bytes) = RadioTap {Contents=[..32..] Payload=[..364..] Version=0 Length=32 Present=264295 TSFT=632340487 Flags=SHORT-PREAMBLE,DATAPAD Rate=6 Mb/s ChannelFrequency=0 MHz ChannelFlags= FHSS=0 DBMAntennaSignal=-40 DBMAntennaNoise=-96 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=1 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[..336..] Type=Data Proto=0 Flags=FROM-DS DurationID=0 Address1=ff:ff:ff:ff:ff:ff Address2=06:03:7f:07:a0:16 Address3=00:19:e3:d3:53:52 Address4= SequenceNumber=2388 FragmentNumber=0 Checksum=206812417 QOS=nil HTControl=nil DataLayer={ Contents=[] Payload=[..336..]}} 515s - Layer 3 (00 bytes) = Dot11Data {Contents=[] Payload=[..336..]} 515s - Layer 4 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..333..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 515s - Layer 5 (05 bytes) = SNAP {Contents=[..5..] Payload=[..328..] OrganizationalCode=[0, 0, 0] Type=IPv4} 515s - Layer 6 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..308..] Version=4 IHL=5 TOS=0 Length=328 Id=50452 Flags= FragOffset=0 TTL=255 Protocol=UDP Checksum=62864 SrcIP=0.0.0.0 DstIP=255.255.255.255 Options=[] Padding=[]} 515s - Layer 7 (08 bytes) = UDP {Contents=[..8..] Payload=[..300..] SrcPort=68(bootpc) DstPort=67(bootps) Length=308 Checksum=11065} 515s - Layer 8 (300 bytes) = DHCPv4 {Contents=[..300..] Payload=[] Operation=Request HardwareType=Ethernet HardwareLen=6 HardwareOpts=0 Xid=320834627 Secs=60 Flags=0 ClientIP=0.0.0.0 YourClientIP=0.0.0.0 NextServerIP=0.0.0.0 RelayAgentIP=0.0.0.0 ClientHWAddr=00:19:e3:d3:53:52 ServerName=[..64..] File=[..128..] Options=[Option(MessageType:Discover), Option(ParamsRequest:SubnetMask,Router,DNS,DomainName,DomainSearch,Unknown,Unknown,NetBIOSOverTCPNS,NetBIOSOverTCPNodeType,NetBIOSOverTCPScope), Option(MaxDHCPSize:[5 220]), Option(ClientID:[1 0 25 227 211 83 82]), Option(LeaseTime:7776000), Option(Hostname:Macintosh-4)]} 515s 515s --- PASS: TestPacketDot11DataIP (0.00s) 515s === RUN TestPacketP6196 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11DataQOSData Dot11WEP] 515s base_test.go:21: Got layer RadioTap, 48 bytes, payload of 143 bytes 515s base_test.go:21: Got layer Dot11, 26 bytes, payload of 113 bytes 515s base_test.go:21: Got layer Dot11DataQOSData, 0 bytes, payload of 113 bytes 515s base_test.go:21: Got layer Dot11WEP, 113 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 191 bytes 515s - Layer 1 (48 bytes) = RadioTap {Contents=[..48..] Payload=[..143..] Version=0 Length=48 Present=1837163 TSFT=20605036 Flags=WEP,FCS Rate=0 Mb/s ChannelFrequency=5240 MHz ChannelFlags=OFDM,Ghz5 FHSS=0 DBMAntennaSignal=-69 DBMAntennaNoise=-92 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=1 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS=STBC#0,num-of-ESS#0 AMPDUStatus=ref#40140,delimiter CRC error,delimiter-CRC=30 VHT=} 515s - Layer 2 (26 bytes) = Dot11 {Contents=[..26..] Payload=[..113..] Type=DataQOSData Proto=0 Flags=TO-DS,WEP DurationID=44 Address1=00:25:9c:42:c2:62 Address2=d8:a2:5e:97:61:c1 Address3=00:25:9c:42:c2:5f Address4= SequenceNumber=3505 FragmentNumber=0 Checksum=3402204673 QOS={ TID=0 EOSP=false AckPolicy=normal-ack TXOP=0} HTControl=nil DataLayer={ Contents=[] Payload=[..113..]}} 515s - Layer 3 (00 bytes) = Dot11DataQOSData {Contents=[] Payload=[..113..]} 515s - Layer 4 (113 bytes) = Dot11WEP {Contents=[..113..] Payload=[]} 515s 515s --- PASS: TestPacketP6196 (0.00s) 515s === RUN TestPacketDot11HTControl 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11DataQOSData Dot11WEP] 515s base_test.go:21: Got layer RadioTap, 38 bytes, payload of 106 bytes 515s base_test.go:21: Got layer Dot11, 30 bytes, payload of 72 bytes 515s base_test.go:21: Got layer Dot11DataQOSData, 0 bytes, payload of 72 bytes 515s base_test.go:21: Got layer Dot11WEP, 72 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 140 bytes 515s - Layer 1 (38 bytes) = RadioTap {Contents=[..38..] Payload=[..106..] Version=0 Length=38 Present=2115627 TSFT=33976511 Flags= Rate=0 Mb/s ChannelFrequency=5240 MHz ChannelFlags=OFDM,Ghz5 FHSS=0 DBMAntennaSignal=-72 DBMAntennaNoise=0 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=0 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=long GI,40,user0(NSS#3MCS#7,BCC)} 515s - Layer 2 (30 bytes) = Dot11 {Contents=[..30..] Payload=[..72..] Type=DataQOSData Proto=0 Flags=TO-DS,Retry,WEP,Order DurationID=5168 Address1=01:02:03:04:05:06 Address2=11:12:13:14:15:16 Address3=21:22:23:24:25:26 Address4= SequenceNumber=3036 FragmentNumber=0 Checksum=2114147696 QOS={ TID=0 EOSP=false AckPolicy=normal-ack TXOP=20} HTControl={ ACConstraint=false RDGMorePPDU=true VHT=nil HT={ LinkAdapationControl={ TRQ=true MRQ=true MSI=1 MFSI=0 ASEL=nil MFB=20} CalibrationPosition=0 CalibrationSequence=0 CSISteering=0 NDPAnnouncement=false DEI=true}} DataLayer={ Contents=[] Payload=[..72..]}} 515s - Layer 3 (00 bytes) = Dot11DataQOSData {Contents=[] Payload=[..72..]} 515s - Layer 4 (72 bytes) = Dot11WEP {Contents=[..72..] Payload=[]} 515s 515s --- PASS: TestPacketDot11HTControl (0.00s) 515s === RUN TestInformationElement 515s --- PASS: TestInformationElement (0.00s) 515s === RUN TestEncodeDecodeDot1Q 515s --- PASS: TestEncodeDecodeDot1Q (0.00s) 515s === RUN TestPacketEAPOLKey 515s base_test.go:19: Checking packet layers, want [EAPOL EAPOLKey Dot11InformationElement] 515s base_test.go:21: Got layer EAPOL, 4 bytes, payload of 117 bytes 515s base_test.go:21: Got layer EAPOLKey, 95 bytes, payload of 22 bytes 515s base_test.go:21: Got layer Dot11InformationElement, 22 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 121 bytes 515s - Layer 1 (04 bytes) = EAPOL {Contents=[2, 3, 0, 117] Payload=[..117..] Version=2 Type=EAPOLKey Length=117} 515s - Layer 2 (95 bytes) = EAPOLKey {Contents=[..95..] Payload=[..22..] KeyDescriptorType=802.11 KeyDescriptorVersion=AES-HMAC-SHA1-128 KeyType=Pairwise KeyIndex=0 Install=false KeyACK=true KeyMIC=false Secure=false MICError=false Request=false HasEncryptedKeyData=false SMKMessage=false KeyLength=16 ReplayCounter=0 Nonce=[..32..] IV=[..16..] RSC=0 ID=0 MIC=[..16..] KeyDataLength=22 EncryptedKeyData=[]} 515s - Layer 3 (22 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 20, OUI: 000FAC04, Info: 592DA88096C461DA246C69001E877F3D) 515s 515s --- PASS: TestPacketEAPOLKey (0.00s) 515s === RUN TestNewIPEndpoint 515s --- PASS: TestNewIPEndpoint (0.00s) 515s === RUN TestDecodeAndEncode 515s --- PASS: TestDecodeAndEncode (0.00s) 515s === RUN TestDecodeGeneve1 515s base_test.go:19: Checking packet layers, want [Linux SLL IPv4 UDP Geneve Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Linux SLL, 16 bytes, payload of 134 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 114 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 106 bytes 515s base_test.go:21: Got layer Geneve, 8 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 150 bytes 515s - Layer 1 (16 bytes) = Linux SLL {Contents=[..16..] Payload=[..134..] PacketType=outgoing AddrLen=6 Addr=fa:16:3e:23:d3:42 EthernetType=IPv4 AddrType=1} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..114..] Version=4 IHL=5 TOS=0 Length=134 Id=34617 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=12597 SrcIP=192.168.0.83 DstIP=192.168.0.85 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..106..] SrcPort=12631 DstPort=6081(geneve) Length=114 Checksum=0} 515s - Layer 4 (08 bytes) = Geneve {Contents=[..8..] Payload=[..98..] Version=0 OptionsLength=0 OAMPacket=false CriticalOption=false Protocol=TransparentEthernetBridging VNI=0 Options=[]} 515s - Layer 5 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=a2:fe:54:48:88:51 DstMAC=ba:09:60:5f:a0:91 EthernetType=IPv4 Length=0} 515s - Layer 6 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=502 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=46943 SrcIP=192.168.0.1 DstIP=192.168.0.2 Options=[] Padding=[]} 515s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=31199 Id=3322 Seq=25540} 515s - Layer 8 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestDecodeGeneve1 (0.00s) 515s === RUN TestDecodeGeneve2 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP Geneve Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 134 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 114 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 106 bytes 515s base_test.go:21: Got layer Geneve, 8 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 148 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..134..] SrcMAC=02:88:0a:81:bd:6d DstMAC=12:be:4e:b6:a7:c7 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..114..] Version=4 IHL=5 TOS=0 Length=134 Id=8434 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=338 SrcIP=172.16.0.1 DstIP=172.16.0.2 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..106..] SrcPort=16550 DstPort=6081(geneve) Length=114 Checksum=0} 515s - Layer 4 (08 bytes) = Geneve {Contents=[..8..] Payload=[..98..] Version=0 OptionsLength=0 OAMPacket=false CriticalOption=false Protocol=TransparentEthernetBridging VNI=10 Options=[]} 515s - Layer 5 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=8e:ab:a2:a5:02:f7 DstMAC=d2:8c:db:12:53:d5 EthernetType=IPv4 Length=0} 515s - Layer 6 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=14362 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=33083 SrcIP=192.168.0.1 DstIP=192.168.0.2 Options=[] Padding=[]} 515s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=56733 Id=32478 Seq=707} 515s - Layer 8 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestDecodeGeneve2 (0.00s) 515s === RUN TestDecodeGeneve3 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP Geneve Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 142 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 122 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 114 bytes 515s base_test.go:21: Got layer Geneve, 16 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 156 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..142..] SrcMAC=00:1b:21:3c:ab:64 DstMAC=00:1b:21:3c:ac:30 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..122..] Version=4 IHL=5 TOS=0 Length=142 Id=57261 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=12975 SrcIP=20.0.0.1 DstIP=20.0.0.2 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..114..] SrcPort=12618 DstPort=6081(geneve) Length=122 Checksum=0} 515s - Layer 4 (16 bytes) = Geneve {Contents=[..16..] Payload=[..98..] Version=0 OptionsLength=8 OAMPacket=false CriticalOption=true Protocol=TransparentEthernetBridging VNI=10 Options=[{Class=0 Type=128 Flags=0 Length=8 Data=[0, 0, 0, 12]}]} 515s - Layer 5 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=b6:9e:d2:49:51:48 DstMAC=fe:71:d8:83:72:4f EthernetType=IPv4 Length=0} 515s - Layer 6 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=48546 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=16644 SrcIP=30.0.0.1 DstIP=30.0.0.2 Options=[] Padding=[]} 515s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=11348 Id=10578 Seq=23} 515s - Layer 8 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestDecodeGeneve3 (0.00s) 515s === RUN TestPacketGRE 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 88 bytes 515s base_test.go:21: Got layer GRE, 4 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 122 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..108..] SrcMAC=8e:7a:12:c3:a9:71 DstMAC=3a:56:6b:69:59:5e EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..88..] Version=4 IHL=5 TOS=0 Length=108 Id=33852 Flags=DF FragOffset=0 TTL=64 Protocol=GRE Checksum=13011 SrcIP=192.168.1.1 DstIP=192.168.1.2 Options=[] Padding=[]} 515s - Layer 3 (04 bytes) = GRE {Contents=[0, 0, 8, 0] Payload=[..84..] ChecksumPresent=false RoutingPresent=false KeyPresent=false SeqPresent=false StrictSourceRoute=false AckPresent=false RecursionControl=0 Flags=0 Version=0 Protocol=IPv4 Checksum=0 Offset=0 Key=0 Seq=0 Ack=0nil} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=1160 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=56062 SrcIP=172.16.1.1 DstIP=172.16.2.1 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=33476 Id=4724 Seq=1} 515s - Layer 6 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestPacketGRE (0.00s) 515s === RUN TestIPv4OverGREEncode 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 88 bytes 515s base_test.go:21: Got layer GRE, 4 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 122 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..108..] SrcMAC=8e:7a:12:c3:a9:71 DstMAC=3a:56:6b:69:59:5e EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..88..] Version=4 IHL=5 TOS=0 Length=108 Id=33852 Flags=DF FragOffset=0 TTL=64 Protocol=GRE Checksum=13011 SrcIP=192.168.1.1 DstIP=192.168.1.2 Options=[] Padding=[]} 515s - Layer 3 (04 bytes) = GRE {Contents=[0, 0, 8, 0] Payload=[..84..] ChecksumPresent=false RoutingPresent=false KeyPresent=false SeqPresent=false StrictSourceRoute=false AckPresent=false RecursionControl=0 Flags=0 Version=0 Protocol=IPv4 Checksum=0 Offset=0 Key=0 Seq=0 Ack=0nil} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=1160 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=56062 SrcIP=172.16.1.1 DstIP=172.16.2.1 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=33476 Id=4724 Seq=1} 515s - Layer 6 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestIPv4OverGREEncode (0.00s) 515s === RUN TestPacketEthernetOverGRE 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 122 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 102 bytes 515s base_test.go:21: Got layer GRE, 4 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 136 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..122..] SrcMAC=d6:b9:d8:80:56:ef DstMAC=ea:6b:4c:d3:55:13 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..102..] Version=4 IHL=5 TOS=0 Length=122 Id=2765 Flags=DF FragOffset=0 TTL=64 Protocol=GRE Checksum=44084 SrcIP=192.168.1.1 DstIP=192.168.1.2 Options=[] Padding=[]} 515s - Layer 3 (04 bytes) = GRE {Contents=[0, 0, 101, 88] Payload=[..98..] ChecksumPresent=false RoutingPresent=false KeyPresent=false SeqPresent=false StrictSourceRoute=false AckPresent=false RecursionControl=0 Flags=0 Version=0 Protocol=TransparentEthernetBridging Checksum=0 Offset=0 Key=0 Seq=0 Ack=0nil} 515s - Layer 4 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=6e:32:3e:c7:9d:ef DstMAC=aa:6a:36:e6:c6:30 EthernetType=IPv4 Length=0} 515s - Layer 5 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=55664 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=1813 SrcIP=172.16.1.1 DstIP=172.16.1.2 Options=[] Padding=[]} 515s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=16149 Id=3842 Seq=1} 515s - Layer 7 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestPacketEthernetOverGRE (0.00s) 515s === RUN TestEthernetOverGREEncode 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 122 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 102 bytes 515s base_test.go:21: Got layer GRE, 4 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 136 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..122..] SrcMAC=d6:b9:d8:80:56:ef DstMAC=ea:6b:4c:d3:55:13 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..102..] Version=4 IHL=5 TOS=0 Length=122 Id=2765 Flags=DF FragOffset=0 TTL=64 Protocol=GRE Checksum=44084 SrcIP=192.168.1.1 DstIP=192.168.1.2 Options=[] Padding=[]} 515s - Layer 3 (04 bytes) = GRE {Contents=[0, 0, 101, 88] Payload=[..98..] ChecksumPresent=false RoutingPresent=false KeyPresent=false SeqPresent=false StrictSourceRoute=false AckPresent=false RecursionControl=0 Flags=0 Version=0 Protocol=TransparentEthernetBridging Checksum=0 Offset=0 Key=0 Seq=0 Ack=0nil} 515s - Layer 4 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=6e:32:3e:c7:9d:ef DstMAC=aa:6a:36:e6:c6:30 EthernetType=IPv4 Length=0} 515s - Layer 5 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=55664 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=1813 SrcIP=172.16.1.1 DstIP=172.16.1.2 Options=[] Padding=[]} 515s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=16149 Id=3842 Seq=1} 515s - Layer 7 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestEthernetOverGREEncode (0.00s) 515s === RUN TestGREChecksum 515s gre_test.go:357: PACKET: 142 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..128..] SrcMAC=c2:00:57:75:00:00 DstMAC=c2:01:57:75:00:00 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..108..] Version=4 IHL=5 TOS=0 Length=128 Id=10 Flags= FragOffset=0 TTL=255 Protocol=GRE Checksum=42818 SrcIP=10.0.0.1 DstIP=10.0.0.2 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = GRE {Contents=[..8..] Payload=[..100..] ChecksumPresent=true RoutingPresent=false KeyPresent=false SeqPresent=false StrictSourceRoute=false AckPresent=false RecursionControl=0 Flags=0 Version=0 Protocol=IPv4 Checksum=30719 Offset=0 Key=0 Seq=0 Ack=0nil} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..80..] Version=4 IHL=5 TOS=0 Length=100 Id=10 Flags= FragOffset=0 TTL=255 Protocol=ICMPv4 Checksum=46473 SrcIP=1.1.1.1 DstIP=2.2.2.2 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=49108 Id=2 Seq=0} 515s - Layer 6 (72 bytes) = Payload 72 byte(s) 515s 515s gre_test.go:357: PACKET: 102 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..88..] SrcMAC=c2:00:57:75:00:00 DstMAC=c2:01:57:75:00:00 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..68..] Version=4 IHL=5 TOS=0 Length=88 Id=10 Flags= FragOffset=0 TTL=255 Protocol=GRE Checksum=42858 SrcIP=10.0.0.1 DstIP=10.0.0.2 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = GRE {Contents=[..8..] Payload=[..60..] ChecksumPresent=true RoutingPresent=false KeyPresent=false SeqPresent=false StrictSourceRoute=false AckPresent=false RecursionControl=0 Flags=0 Version=0 Protocol=IPv4 Checksum=33909 Offset=0 Key=0 Seq=0 Ack=0nil} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..40..] Version=4 IHL=5 TOS=0 Length=60 Id=964 Flags=DF FragOffset=0 TTL=1 Protocol=UDP Checksum=27057 SrcIP=2.3.4.5 DstIP=2.3.4.50 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = UDP {Contents=[..8..] Payload=[..32..] SrcPort=41781 DstPort=33434(traceroute) Length=40 Checksum=55436} 515s - Layer 6 (32 bytes) = Payload 32 byte(s) 515s 515s --- PASS: TestGREChecksum (0.00s) 515s === RUN TestGTPPacket 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP GTPv1U IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 124 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 104 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 96 bytes 515s base_test.go:21: Got layer GTPv1U, 12 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 138 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..124..] SrcMAC=00:0c:29:da:d1:de DstMAC=00:0c:29:e3:c6:4d EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..104..] Version=4 IHL=5 TOS=0 Length=124 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=26555 SrcIP=192.168.40.178 DstIP=192.168.40.179 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..96..] SrcPort=2152(gtp-user) DstPort=2152(gtp-user) Length=104 Checksum=49604} 515s - Layer 4 (12 bytes) = GTPv1U {Contents=[..12..] Payload=[..84..] Version=1 ProtocolType=1 Reserved=0 ExtensionHeaderFlag=false SequenceNumberFlag=true NPDUFlag=false MessageType=255 MessageLength=88 TEID=1 SequenceNumber=9851 NPDU=0 GTPExtensionHeaders=[]} 515s - Layer 5 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=1654 Flags= FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=38959 SrcIP=192.168.40.178 DstIP=202.11.40.158 Options=[] Padding=[]} 515s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoReply Checksum=14825 Id=0 Seq=10365} 515s - Layer 7 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestGTPPacket (0.00s) 515s === RUN TestGTPPacketWithEH 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP GTPv1U IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 128 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 108 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 100 bytes 515s base_test.go:21: Got layer GTPv1U, 16 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 142 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..128..] SrcMAC=00:0c:29:da:d1:de DstMAC=00:0c:29:e3:c6:4d EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..108..] Version=4 IHL=5 TOS=0 Length=128 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=26555 SrcIP=192.168.40.178 DstIP=192.168.40.179 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..100..] SrcPort=2152(gtp-user) DstPort=2152(gtp-user) Length=108 Checksum=49557} 515s - Layer 4 (16 bytes) = GTPv1U {Contents=[..16..] Payload=[..84..] Version=1 ProtocolType=1 Reserved=0 ExtensionHeaderFlag=true SequenceNumberFlag=true NPDUFlag=false MessageType=255 MessageLength=88 TEID=1050199 SequenceNumber=5 NPDU=0 GTPExtensionHeaders=[{Type=192 Content=[9, 4]}]} 515s - Layer 5 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=1701 Flags= FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=38912 SrcIP=192.168.40.178 DstIP=202.11.40.158 Options=[] Padding=[]} 515s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoReply Checksum=58294 Id=0 Seq=10412} 515s - Layer 7 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestGTPPacketWithEH (0.00s) 515s === RUN TestPacketICMPv6NeighborAnnouncementFlags 515s --- PASS: TestPacketICMPv6NeighborAnnouncementFlags (0.00s) 515s === RUN TestPacketICMPv6RouterAnnouncementFlags 515s --- PASS: TestPacketICMPv6RouterAnnouncementFlags (0.00s) 515s === RUN TestPacketICMPv6 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 515s base_test.go:21: Got layer ICMPv6NeighborAdvertisement, 20 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 78 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..64..] SrcMAC=24:be:05:27:0b:17 DstMAC=00:1f:ca:b3:76:40 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..24..] Version=6 TrafficClass=0 FlowLabel=0 Length=24 NextHeader=ICMPv6 HopLimit=255 SrcIP=2620:0:1005:0:26be:5ff:fe27:b17 DstIP=fe80::21f:caff:feb3:7640 HopByHop=nil} 515s - Layer 3 (04 bytes) = ICMPv6 {Contents=[136, 0, 30, 214] Payload=[..20..] TypeCode=NeighborAdvertisement Checksum=7894 TypeBytes=[]} 515s - Layer 4 (20 bytes) = ICMPv6NeighborAdvertisement {Contents=[..20..] Payload=[] Flags=64 TargetAddress=2620:0:1005:0:26be:5ff:fe27:b17 Options=[]} 515s 515s --- PASS: TestPacketICMPv6 (0.00s) 515s === RUN TestPacketICMPv6WithHopByHop 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 176 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 128 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 128 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 124 bytes 515s base_test.go:21: Got layer MLDv2MulticastListenerReport, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 190 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..176..] SrcMAC=1e:c3:e3:b7:c4:d5 DstMAC=33:33:00:00:00:16 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..128..] Version=6 TrafficClass=0 FlowLabel=0 Length=136 NextHeader=IPv6HopByHop HopLimit=1 SrcIP=:: DstIP=ff02::16 HopByHop={ Contents=[..8..] Payload=[..128..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..128..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]} 515s - Layer 4 (04 bytes) = ICMPv6 {Contents=[143, 0, 158, 237] Payload=[..124..] TypeCode=143(0) Checksum=40685 TypeBytes=[]} 515s - Layer 5 (00 bytes) = MLDv2MulticastListenerReport Number of Mcast Addr Records: 6 (actual 6), Multicast Address Records: [{RecordType:CHANGE_TO_INCLUDE_MODE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ffb7:c4d5 SourceAddresses:[] AuxiliaryData:[]} {RecordType:CHANGE_TO_INCLUDE_MODE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ff00:0 SourceAddresses:[] AuxiliaryData:[]} {RecordType:CHANGE_TO_EXCLUDE_MODE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ff11:79 SourceAddresses:[] AuxiliaryData:[]} {RecordType:CHANGE_TO_EXCLUDE_MODE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ff00:1 SourceAddresses:[] AuxiliaryData:[]} {RecordType:CHANGE_TO_EXCLUDE_MODE AuxDataLen:0 N:0 MulticastAddress:ff05::2 SourceAddresses:[] AuxiliaryData:[]} {RecordType:CHANGE_TO_EXCLUDE_MODE AuxDataLen:0 N:0 MulticastAddress:ff02::2 SourceAddresses:[] AuxiliaryData:[]}] 515s 515s --- PASS: TestPacketICMPv6WithHopByHop (0.00s) 515s === RUN TestPacketICMPv6RouterAdvertisement 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 ICMPv6RouterAdvertisement] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 104 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 60 bytes 515s base_test.go:21: Got layer ICMPv6RouterAdvertisement, 60 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 118 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..104..] SrcMAC=c2:00:54:f5:00:00 DstMAC=33:33:00:00:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..64..] Version=6 TrafficClass=224 FlowLabel=0 Length=64 NextHeader=ICMPv6 HopLimit=255 SrcIP=fe80::c000:54ff:fef5:0 DstIP=ff02::1 HopByHop=nil} 515s - Layer 3 (04 bytes) = ICMPv6 {Contents=[134, 0, 196, 254] Payload=[..60..] TypeCode=RouterAdvertisement Checksum=50430 TypeBytes=[]} 515s - Layer 4 (60 bytes) = ICMPv6RouterAdvertisement {Contents=[..60..] Payload=[] HopLimit=64 Flags=0 RouterLifetime=1800 ReachableTime=0 RetransTimer=0 Options=[ICMPv6Option(SourceAddress:c2:00:54:f5:00:00), ICMPv6Option(MTU:1500), ICMPv6Option(PrefixInfo:2001:db8:0:1::/64:true:true:720h0m0s:168h0m0s)]} 515s 515s --- PASS: TestPacketICMPv6RouterAdvertisement (0.00s) 515s === RUN TestPacketICMPv6NeighborSolicitation 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 ICMPv6NeighborSolicitation] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 515s base_test.go:21: Got layer ICMPv6NeighborSolicitation, 20 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 78 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..64..] SrcMAC=00:0c:29:0e:4c:67 DstMAC=33:33:ff:0e:4c:67 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..24..] Version=6 TrafficClass=0 FlowLabel=0 Length=24 NextHeader=ICMPv6 HopLimit=255 SrcIP=:: DstIP=ff02::1:ff0e:4c67 HopByHop=nil} 515s - Layer 3 (04 bytes) = ICMPv6 {Contents=[135, 0, 185, 48] Payload=[..20..] TypeCode=NeighborSolicitation Checksum=47408 TypeBytes=[]} 515s - Layer 4 (20 bytes) = ICMPv6NeighborSolicitation {Contents=[..20..] Payload=[] TargetAddress=fe80::20c:29ff:fe0e:4c67 Options=[]} 515s 515s --- PASS: TestPacketICMPv6NeighborSolicitation (0.00s) 515s === RUN TestIGMPv1MembershipReportPacket 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 8 bytes 515s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..46..] SrcMAC=00:30:c1:bf:57:55 DstMAC=01:00:5e:00:01:3c EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..8..] Version=4 IHL=5 TOS=0 Length=28 Id=27263 Flags= FragOffset=0 TTL=1 Protocol=IGMP Checksum=25445 SrcIP=10.60.0.132 DstIP=224.0.1.60 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMPv1 Membership Report MaxResponseTime=0s Checksum=3267 GroupAddress=224.0.1.60 Version=1} 515s 515s --- PASS: TestIGMPv1MembershipReportPacket (0.00s) 515s === RUN TestIGMPv2MembershipQuery 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 8 bytes 515s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..46..] SrcMAC=00:01:63:6f:c8:00 DstMAC=01:00:5e:00:00:01 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..8..] Version=4 IHL=5 TOS=192 Length=28 Id=339 Flags= FragOffset=0 TTL=1 Protocol=IGMP Checksum=52435 SrcIP=10.60.0.189 DstIP=224.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMP Membership Query MaxResponseTime=10s Checksum=61083 GroupAddress=0.0.0.0 Version=2} 515s 515s --- PASS: TestIGMPv2MembershipQuery (0.00s) 515s === RUN TestIGMPv2MembershipReport 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 515s base_test.go:21: Got layer IPv4, 24 bytes, payload of 8 bytes 515s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..46..] SrcMAC=00:15:58:dc:d9:f6 DstMAC=01:00:5e:7f:ff:fd EthernetType=IPv4 Length=0} 515s - Layer 2 (24 bytes) = IPv4 {Contents=[..24..] Payload=[..8..] Version=4 IHL=6 TOS=0 Length=32 Id=31216 Flags= FragOffset=0 TTL=1 Protocol=IGMP Checksum=43847 SrcIP=10.60.5.103 DstIP=239.255.255.253 Options=[IPv4Option(148:[0 0])] Padding=[]} 515s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMPv2 Membership Report MaxResponseTime=0s Checksum=64001 GroupAddress=239.255.255.253 Version=2} 515s 515s --- PASS: TestIGMPv2MembershipReport (0.00s) 515s === RUN TestIGMPv3MembershipQuery 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 515s base_test.go:21: Got layer IPv4, 24 bytes, payload of 12 bytes 515s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..46..] SrcMAC=00:26:44:6c:1e:da DstMAC=01:00:5e:00:00:01 EthernetType=IPv4 Length=0} 515s - Layer 2 (24 bytes) = IPv4 {Contents=[..24..] Payload=[..12..] Version=4 IHL=6 TOS=192 Length=36 Id=6129 Flags=DF FragOffset=0 TTL=1 Protocol=IGMP Checksum=10619 SrcIP=192.168.1.254 DstIP=224.0.0.1 Options=[IPv4Option(148:[0 0])] Padding=[]} 515s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMP Membership Query MaxResponseTime=2.4s Checksum=60627 GroupAddress=0.0.0.0 SupressRouterProcessing=false RobustnessValue=2 IntervalTime=2s SourceAddresses=[] NumberOfGroupRecords=0 NumberOfSources=0 GroupRecords=[] Version=3} 515s 515s --- PASS: TestIGMPv3MembershipQuery (0.00s) 515s === RUN TestIGMPv3MembershipReport2Records 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 48 bytes 515s base_test.go:21: Got layer IPv4, 24 bytes, payload of 24 bytes 515s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 62 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..48..] SrcMAC=00:25:2e:51:c3:81 DstMAC=01:00:5e:00:00:16 EthernetType=IPv4 Length=0} 515s - Layer 2 (24 bytes) = IPv4 {Contents=[..24..] Payload=[..24..] Version=4 IHL=6 TOS=88 Length=48 Id=316 Flags= FragOffset=0 TTL=1 Protocol=IGMP Checksum=33075 SrcIP=192.168.1.66 DstIP=224.0.0.22 Options=[IPv4Option(148:[0 0])] Padding=[]} 515s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMPv3 Membership Report MaxResponseTime=0s Checksum=62268 GroupAddress= SupressRouterProcessing=false RobustnessValue=0 IntervalTime=0s SourceAddresses=[] NumberOfGroupRecords=2 NumberOfSources=0 GroupRecords=[{Type=MODE_IS_EXCLUDE AuxDataLen=0 NumberOfSources=0 MulticastAddress=239.195.7.2 SourceAddresses=[] AuxData=0}, {Type=MODE_IS_EXCLUDE AuxDataLen=0 NumberOfSources=0 MulticastAddress=239.255.255.250 SourceAddresses=[] AuxData=0}] Version=3} 515s 515s --- PASS: TestIGMPv3MembershipReport2Records (0.00s) 515s === RUN TestGetIPOptLengthNoOpt 515s --- PASS: TestGetIPOptLengthNoOpt (0.00s) 515s === RUN TestGetIPOptLengthEndOfList 515s --- PASS: TestGetIPOptLengthEndOfList (0.00s) 515s === RUN TestGetIPOptLengthPaddingEndOfList 515s --- PASS: TestGetIPOptLengthPaddingEndOfList (0.00s) 515s === RUN TestGetIPOptLengthOptionEndOfList 515s --- PASS: TestGetIPOptLengthOptionEndOfList (0.00s) 515s === RUN TestIPOptResetDuringDecoding 515s --- PASS: TestIPOptResetDuringDecoding (0.00s) 515s === RUN TestChecksum 515s --- PASS: TestChecksum (0.00s) 515s === RUN TestIPv4InvalidOptionLength 515s --- PASS: TestIPv4InvalidOptionLength (0.00s) 515s === RUN TestIPv4Options 515s --- PASS: TestIPv4Options (0.00s) 515s === RUN TestSerializeIPv6HeaderTLVOptions 515s --- PASS: TestSerializeIPv6HeaderTLVOptions (0.00s) 515s === RUN TestPacketIPv6HopByHop0Serialize 515s --- PASS: TestPacketIPv6HopByHop0Serialize (0.00s) 515s === RUN TestPacketIPv6HopByHop0Decode 515s base_test.go:19: Checking packet layers, want [IPv6 IPv6HopByHop] 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 0 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 48 bytes, truncated 515s - Layer 1 (40 bytes) = IPv6 {Contents=[..40..] Payload=[] Version=6 TrafficClass=0 FlowLabel=0 Length=8 NextHeader=IPv6HopByHop HopLimit=64 SrcIP=2001:db8::1 DstIP=2001:db8::2 HopByHop={ Contents=[..8..] Payload=[] NextHeader=NoNextHeader HeaderLength=0 ActualLength=8 Options=[{OptionType=1 OptionLength=4 ActualLength=6 OptionData=[0, 0, 0, 0] OptionAlignment=[0 0]}]}} 515s - Layer 2 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[] NextHeader=NoNextHeader HeaderLength=0 ActualLength=8 Options=[{OptionType=1 OptionLength=4 ActualLength=6 OptionData=[0, 0, 0, 0] OptionAlignment=[0 0]}]} 515s 515s --- PASS: TestPacketIPv6HopByHop0Decode (0.00s) 515s === RUN TestPacketIPv6Destination0Serialize 515s --- PASS: TestPacketIPv6Destination0Serialize (0.00s) 515s === RUN TestPacketIPv6Destination0Decode 515s base_test.go:19: Checking packet layers, want [IPv6 IPv6Destination] 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 8 bytes 515s base_test.go:21: Got layer IPv6Destination, 8 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 48 bytes 515s - Layer 1 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..8..] Version=6 TrafficClass=0 FlowLabel=0 Length=8 NextHeader=IPv6Destination HopLimit=64 SrcIP=2001:db8::1 DstIP=2001:db8::2 HopByHop=nil} 515s - Layer 2 (08 bytes) = IPv6Destination {Contents=[..8..] Payload=[] NextHeader=NoNextHeader HeaderLength=0 ActualLength=8 Options=[{OptionType=1 OptionLength=4 ActualLength=6 OptionData=[0, 0, 0, 0] OptionAlignment=[0 0]}]} 515s 515s --- PASS: TestPacketIPv6Destination0Decode (0.00s) 515s === RUN TestIPv6JumbogramSerialize 515s --- PASS: TestIPv6JumbogramSerialize (0.00s) 515s === RUN TestIPv6JumbogramDecode 515s base_test.go:19: Checking packet layers, want [IPv6 IPv6HopByHop Payload] 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 65544 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 65536 bytes 515s base_test.go:21: Got layer Payload, 65536 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 65584 bytes 515s - Layer 1 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..65544..] Version=6 TrafficClass=0 FlowLabel=0 Length=0 NextHeader=IPv6HopByHop HopLimit=64 SrcIP=2001:db8::1 DstIP=2001:db8::2 HopByHop={ Contents=[..8..] Payload=[..65536..] NextHeader=NoNextHeader HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 0, 8] OptionAlignment=[0 0]}]}} 515s - Layer 2 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..65536..] NextHeader=NoNextHeader HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 0, 8] OptionAlignment=[0 0]}]} 515s - Layer 3 (65536 bytes) = Payload 65536 byte(s) 515s 515s --- PASS: TestIPv6JumbogramDecode (0.00s) 515s === RUN TestPacketIPSecAHTransport 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IPSecAH ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 88 bytes 515s base_test.go:21: Got layer IPSecAH, 24 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 122 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..108..] SrcMAC=1a:0e:3c:4e:3b:3a DstMAC=7e:c0:ff:c6:48:f1 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..88..] Version=4 IHL=5 TOS=0 Length=108 Id=25866 Flags=DF FragOffset=0 TTL=64 Protocol=IPSecAH Checksum=20993 SrcIP=192.168.1.1 DstIP=192.168.1.2 Options=[] Padding=[]} 515s - Layer 3 (24 bytes) = IPSecAH {Contents=[..24..] Payload=[..64..] NextHeader=ICMPv4 HeaderLength=4 ActualLength=24 Reserved=0 SPI=257 Seq=1 AuthenticationData=[..12..]} 515s - Layer 4 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=64485 Id=1560 Seq=1} 515s - Layer 5 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestPacketIPSecAHTransport (0.00s) 515s === RUN TestPacketIPSecAHTunnel 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IPSecAH IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 128 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 108 bytes 515s base_test.go:21: Got layer IPSecAH, 24 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 142 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..128..] SrcMAC=56:6c:ed:2d:73:cd DstMAC=72:20:4d:91:63:c9 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..108..] Version=4 IHL=5 TOS=0 Length=128 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=IPSecAH Checksum=46839 SrcIP=192.168.1.1 DstIP=192.168.1.2 Options=[] Padding=[]} 515s - Layer 3 (24 bytes) = IPSecAH {Contents=[..24..] Payload=[..84..] NextHeader=IPv4 HeaderLength=4 ActualLength=24 Reserved=0 SPI=257 Seq=1 AuthenticationData=[..12..]} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=43375 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=13847 SrcIP=172.16.1.1 DstIP=172.16.2.1 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=55135 Id=31322 Seq=1} 515s - Layer 6 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestPacketIPSecAHTunnel (0.00s) 515s === RUN TestPacketIPSecESP 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IPSecESP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 136 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 116 bytes 515s base_test.go:21: Got layer IPSecESP, 116 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 150 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..136..] SrcMAC=00:11:43:4a:d7:0a DstMAC=00:00:00:00:00:12 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..116..] Version=4 IHL=5 TOS=0 Length=136 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=IPSecESP Checksum=48704 SrcIP=190.0.0.1 DstIP=190.0.0.2 Options=[] Padding=[]} 515s - Layer 3 (116 bytes) = IPSecESP {Contents=[..116..] Payload=[] SPI=110 Seq=19 Encrypted=[..108..]} 515s 515s --- PASS: TestPacketIPSecESP (0.00s) 515s === RUN TestLCMDecode 515s --- PASS: TestLCMDecode (0.00s) 515s === RUN TestPacketLLDP 515s base_test.go:19: Checking packet layers, want [Ethernet LinkLayerDiscovery LinkLayerDiscoveryInfo] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 222 bytes 515s base_test.go:21: Got layer LinkLayerDiscovery, 222 bytes, payload of 0 bytes 515s base_test.go:21: Got layer LinkLayerDiscoveryInfo, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 236 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..222..] SrcMAC=00:1b:1b:02:e6:1f DstMAC=01:80:c2:00:00:0e EthernetType=LinkLayerDiscovery Length=0} 515s - Layer 2 (222 bytes) = LinkLayerDiscovery {Contents=[..222..] Payload=[] ChassisID={ Subtype=Local ID=[..7..]} PortID={ Subtype=Local ID=[..8..]} TTL=20 Values=[..8..]} 515s - Layer 3 (00 bytes) = LinkLayerDiscoveryInfo {Contents=[] Payload=[] PortDescription=Siemens, SIMATIC NET, Ethernet Switch Port 01 SysName=Switch1 SysDescription=Siemens, SIMATIC NET, SCALANCE X212-2, 6GK5 212-2BB00-2AA3, HW: 7, FW: V4.02 SysCapabilities={ SystemCap={ Other=false Repeater=false Bridge=false WLANAP=false Router=false Phone=false DocSis=false StationOnly=true CVLAN=false SVLAN=false TMPR=false} EnabledCap={ Other=false Repeater=false Bridge=false WLANAP=false Router=false Phone=false DocSis=false StationOnly=true CVLAN=false SVLAN=false TMPR=false}} MgmtAddress={ Subtype=IPv4 Address=[141, 81, 0, 190] InterfaceSubtype=IfIndex InterfaceNumber=1 OID=+Àn} OrgTLVs=[{OUI=3791 SubType=2 Info=[0, 0, 0, 0]}, {OUI=3791 SubType=5 Info=[..6..]}, {OUI=4623 SubType=1 Info=[..5..]}] Unknown=[]} 515s 515s --- PASS: TestPacketLLDP (0.00s) 515s === RUN TestPacketMulticastListenerQueryMessageV1 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv1MulticastListenerQuery] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 24 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 515s base_test.go:21: Got layer MLDv1MulticastListenerQuery, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 86 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=b0:a8:6e:0c:d4:e8 DstMAC=33:33:00:00:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..24..] Version=6 TrafficClass=0 FlowLabel=0 Length=36 NextHeader=IPv6HopByHop HopLimit=1 SrcIP=fe80::b2a8:6eff:fe0c:d4e8 DstIP=ff02::1 HopByHop={ Contents=[..8..] Payload=[..24..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..24..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]} 515s - Layer 4 (04 bytes) = ICMPv6 {Contents=[130, 0, 98, 58] Payload=[..20..] TypeCode=130(0) Checksum=25146 TypeBytes=[]} 515s - Layer 5 (00 bytes) = MLDv1MulticastListenerQuery Maximum Response Delay: 10000ms, Multicast Address: :: 515s 515s --- PASS: TestPacketMulticastListenerQueryMessageV1 (0.00s) 515s === RUN TestPacketMulticastListenerReportMessageV1 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv1MulticastListenerReport] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 24 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 515s base_test.go:21: Got layer MLDv1MulticastListenerReport, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 86 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=b0:a8:6e:0c:d4:e8 DstMAC=33:33:00:00:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..24..] Version=6 TrafficClass=0 FlowLabel=0 Length=36 NextHeader=IPv6HopByHop HopLimit=1 SrcIP=fe80::b2a8:6eff:fe0c:d4e8 DstIP=ff02::1 HopByHop={ Contents=[..8..] Payload=[..24..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..24..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]} 515s - Layer 4 (04 bytes) = ICMPv6 {Contents=[131, 0, 98, 58] Payload=[..20..] TypeCode=131(0) Checksum=25146 TypeBytes=[]} 515s - Layer 5 (00 bytes) = MLDv1MulticastListenerReport Maximum Response Delay: 10000ms, Multicast Address: ff02::db8:1122:3344 515s 515s --- PASS: TestPacketMulticastListenerReportMessageV1 (0.00s) 515s === RUN TestPacketMulticastListenerDoneMessageV1 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv1MulticastListenerDone] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 24 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 515s base_test.go:21: Got layer MLDv1MulticastListenerDone, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 86 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..72..] SrcMAC=b0:a8:6e:0c:d4:e8 DstMAC=33:33:00:00:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..24..] Version=6 TrafficClass=0 FlowLabel=0 Length=36 NextHeader=IPv6HopByHop HopLimit=1 SrcIP=fe80::b2a8:6eff:fe0c:d4e8 DstIP=ff02::1 HopByHop={ Contents=[..8..] Payload=[..24..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..24..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]} 515s - Layer 4 (04 bytes) = ICMPv6 {Contents=[132, 0, 98, 58] Payload=[..20..] TypeCode=132(0) Checksum=25146 TypeBytes=[]} 515s - Layer 5 (00 bytes) = MLDv1MulticastListenerDone Maximum Response Delay: 10000ms, Multicast Address: ff02::db8:1122:3344 515s 515s --- PASS: TestPacketMulticastListenerDoneMessageV1 (0.00s) 515s === RUN TestPacketMulticastListenerQueryMessageV2 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv2MulticastListenerQuery] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 28 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 28 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 24 bytes 515s base_test.go:21: Got layer MLDv2MulticastListenerQuery, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 90 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..76..] SrcMAC=b0:a8:6e:0c:d4:e8 DstMAC=33:33:00:00:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..28..] Version=6 TrafficClass=0 FlowLabel=0 Length=36 NextHeader=IPv6HopByHop HopLimit=1 SrcIP=fe80::b2a8:6eff:fe0c:d4e8 DstIP=ff02::1 HopByHop={ Contents=[..8..] Payload=[..28..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..28..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]} 515s - Layer 4 (04 bytes) = ICMPv6 {Contents=[130, 0, 98, 58] Payload=[..24..] TypeCode=130(0) Checksum=25146 TypeBytes=[]} 515s - Layer 5 (00 bytes) = MLDv2MulticastListenerQuery Maximum Response Code: 0x2710 (10000ms), Multicast Address: ::, Suppress Routerside Processing: false, QRV: 0x2, QQIC: 0x3c (60s), Number of Source Address: 0 (actual: 0), Source Addresses: [] 515s 515s --- PASS: TestPacketMulticastListenerQueryMessageV2 (0.00s) 515s === RUN TestPacketMulticastListenerReportMessageV2 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv2MulticastListenerReport] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 136 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 88 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 88 bytes 515s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 84 bytes 515s base_test.go:21: Got layer MLDv2MulticastListenerReport, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 150 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..136..] SrcMAC=00:15:17:cc:e5:46 DstMAC=33:33:00:00:00:16 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..88..] Version=6 TrafficClass=0 FlowLabel=0 Length=96 NextHeader=IPv6HopByHop HopLimit=1 SrcIP=fe80::215:17ff:fecc:e546 DstIP=ff02::16 HopByHop={ Contents=[..8..] Payload=[..88..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]}} 515s - Layer 3 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..88..] NextHeader=ICMPv6 HeaderLength=0 ActualLength=8 Options=[{OptionType=5 OptionLength=2 ActualLength=4 OptionData=[0, 0] OptionAlignment=[0 0]}, {OptionType=1 OptionLength=0 ActualLength=2 OptionData=[] OptionAlignment=[0 0]}]} 515s - Layer 4 (04 bytes) = ICMPv6 {Contents=[143, 0, 42, 14] Payload=[..84..] TypeCode=143(0) Checksum=10766 TypeBytes=[]} 515s - Layer 5 (00 bytes) = MLDv2MulticastListenerReport Number of Mcast Addr Records: 4 (actual 4), Multicast Address Records: [{RecordType:MODE_IS_EXCLUDE AuxDataLen:0 N:0 MulticastAddress:ff02::db8:1122:3344 SourceAddresses:[] AuxiliaryData:[]} {RecordType:MODE_IS_EXCLUDE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ffcc:e546 SourceAddresses:[] AuxiliaryData:[]} {RecordType:MODE_IS_EXCLUDE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ffa7:10ad SourceAddresses:[] AuxiliaryData:[]} {RecordType:MODE_IS_EXCLUDE AuxDataLen:0 N:0 MulticastAddress:ff02::1:ff00:2 SourceAddresses:[] AuxiliaryData:[]}] 515s 515s --- PASS: TestPacketMulticastListenerReportMessageV2 (0.00s) 515s === RUN TestPacketMPLS 515s base_test.go:19: Checking packet layers, want [Ethernet MPLS MPLS IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 515s base_test.go:21: Got layer MPLS, 4 bytes, payload of 104 bytes 515s base_test.go:21: Got layer MPLS, 4 bytes, payload of 100 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 80 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 72 bytes 515s base_test.go:21: Got layer Payload, 72 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 122 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..108..] SrcMAC=cc:15:14:64:00:00 DstMAC=cc:13:14:64:00:01 EthernetType=MPLSUnicast Length=0} 515s - Layer 2 (04 bytes) = MPLS {Contents=[0, 1, 16, 254] Payload=[..104..] Label=17 TrafficClass=0 StackBottom=false TTL=254} 515s - Layer 3 (04 bytes) = MPLS {Contents=[0, 1, 49, 254] Payload=[..100..] Label=19 TrafficClass=0 StackBottom=true TTL=254} 515s - Layer 4 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..80..] Version=4 IHL=5 TOS=0 Length=100 Id=57 Flags= FragOffset=0 TTL=254 Protocol=ICMPv4 Checksum=44123 SrcIP=12.0.0.1 DstIP=2.2.2.2 Options=[] Padding=[]} 515s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=14955 Id=11 Seq=2} 515s - Layer 6 (72 bytes) = Payload 72 byte(s) 515s 515s --- PASS: TestPacketMPLS (0.00s) 515s === RUN TestNTPOne 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP NTP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 515s base_test.go:21: Got layer NTP, 48 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 90 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..76..] SrcMAC=00:d0:59:6c:40:4e DstMAC=00:0c:41:82:b2:53 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..56..] Version=4 IHL=5 TOS=0 Length=76 Id=2626 Flags= FragOffset=0 TTL=128 Protocol=UDP Checksum=46586 SrcIP=192.168.50.50 DstIP=67.129.68.9 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=123(ntp) DstPort=123(ntp) Length=56 Checksum=63698} 515s - Layer 4 (48 bytes) = NTP {Contents=[..48..] Payload=[] LeapIndicator=3 Version=3 Mode=1 Stratum=0 Poll=10 Precision=-6 RootDelay=0 RootDispersion=66192 ReferenceID=0 ReferenceTimestamp=0 OriginTimestamp=0 ReceiveTimestamp=0 TransmitTimestamp=14195914391047827090 ExtensionBytes=[]} 515s 515s --- PASS: TestNTPOne (0.00s) 515s === RUN TestNTPTwo 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP NTP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 515s base_test.go:21: Got layer NTP, 48 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 90 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..76..] SrcMAC=00:0c:41:82:b2:53 DstMAC=00:d0:59:6c:40:4e EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..56..] Version=4 IHL=5 TOS=0 Length=76 Id=12870 Flags=DF FragOffset=0 TTL=47 Protocol=UDP Checksum=43032 SrcIP=69.44.57.60 DstIP=192.168.50.50 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=123(ntp) DstPort=123(ntp) Length=56 Checksum=2392} 515s - Layer 4 (48 bytes) = NTP {Contents=[..48..] Payload=[] LeapIndicator=0 Version=3 Mode=2 Stratum=3 Poll=10 Precision=-18 RootDelay=7159 RootDispersion=5356 ReferenceID=1370390711 ReferenceTimestamp=14195912602744153803 OriginTimestamp=14195914391047827090 ReceiveTimestamp=14195914386266741222 TransmitTimestamp=14195914386266943086 ExtensionBytes=[]} 515s 515s --- PASS: TestNTPTwo (0.00s) 515s === RUN TestNTPThree 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP NTP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 515s base_test.go:21: Got layer NTP, 48 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 90 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..76..] SrcMAC=00:0c:41:82:b2:53 DstMAC=00:d0:59:6c:40:4e EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..56..] Version=4 IHL=5 TOS=0 Length=76 Id=0 Flags=DF FragOffset=0 TTL=48 Protocol=UDP Checksum=29797 SrcIP=24.123.202.230 DstIP=192.168.50.50 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=123(ntp) DstPort=123(ntp) Length=56 Checksum=17413} 515s - Layer 4 (48 bytes) = NTP {Contents=[..48..] Payload=[] LeapIndicator=0 Version=3 Mode=2 Stratum=2 Poll=10 Precision=-20 RootDelay=1987 RootDispersion=12160 ReferenceID=3323878402 ReferenceTimestamp=14195901919906529999 OriginTimestamp=14195914391047827090 ReceiveTimestamp=14195914386315751093 TransmitTimestamp=14195914386315794043 ExtensionBytes=[]} 515s 515s --- PASS: TestNTPThree (0.00s) 515s === RUN TestNTPIsomorphism 515s --- PASS: TestNTPIsomorphism (0.00s) 515s === RUN TestPacketOSPF2Hello 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 44 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 78 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..64..] SrcMAC=00:e0:18:b1:0c:ad DstMAC=01:00:5e:00:00:05 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..44..] Version=4 IHL=5 TOS=192 Length=64 Id=2066 Flags= FragOffset=0 TTL=1 Protocol=OSPF Checksum=26077 SrcIP=192.168.170.8 DstIP=224.0.0.5 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Hello PacketLength=44 RouterID=3232279048 AreaID=1 Checksum=10043 Content={ InterfaceID=0 RtrPriority=1 Options=2 HelloInterval=10 RouterDeadInterval=40 DesignatedRouterID=3232279048 BackupDesignatedRouterID=0 NeighborID=[] NetworkMask=4294967040} AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2Hello (0.00s) 515s === RUN TestPacketOSPF3Hello 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 36 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 90 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..76..] SrcMAC=c2:00:1f:fa:00:01 DstMAC=33:33:00:00:00:05 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..36..] Version=6 TrafficClass=224 FlowLabel=0 Length=36 NextHeader=OSPF HopLimit=1 SrcIP=fe80::1 DstIP=ff02::5 HopByHop=nil} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=3 Type=Hello PacketLength=36 RouterID=16843009 AreaID=1 Checksum=64390 Content={ InterfaceID=5 RtrPriority=1 Options=19 HelloInterval=10 RouterDeadInterval=40 DesignatedRouterID=0 BackupDesignatedRouterID=0 NeighborID=[]} Instance=0 Reserved=0} 515s 515s --- PASS: TestPacketOSPF3Hello (0.00s) 515s === RUN TestPacketOSPF2DBDesc 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 52 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 32 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 66 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..52..] SrcMAC=00:e0:18:b1:0c:ad DstMAC=00:60:08:81:7a:70 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..32..] Version=4 IHL=5 TOS=192 Length=52 Id=11237 Flags= FragOffset=0 TTL=1 Protocol=OSPF Checksum=46960 SrcIP=192.168.170.8 DstIP=192.168.170.2 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Database Description PacketLength=32 RouterID=3232279048 AreaID=1 Checksum=41042 Content={ Options=2 InterfaceMTU=1500 Flags=7 DDSeqNumber=1098361214 LSAinfo=[]} AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2DBDesc (0.00s) 515s === RUN TestPacketOSPF3DBDesc 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 68 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 28 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 82 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..68..] SrcMAC=c2:01:1f:fa:00:01 DstMAC=c2:00:1f:fa:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..28..] Version=6 TrafficClass=224 FlowLabel=0 Length=28 NextHeader=OSPF HopLimit=1 SrcIP=fe80::2 DstIP=fe80::1 HopByHop=nil} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=3 Type=Database Description PacketLength=28 RouterID=33686018 AreaID=1 Checksum=55334 Content={ Options=19 InterfaceMTU=1500 Flags=7 DDSeqNumber=7494 LSAinfo=[]} Instance=0 Reserved=0} 515s 515s --- PASS: TestPacketOSPF3DBDesc (0.00s) 515s === RUN TestPacketOSPF2LSRequest 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 70 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..56..] SrcMAC=00:60:08:81:7a:70 DstMAC=00:e0:18:b1:0c:ad EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..36..] Version=4 IHL=5 TOS=192 Length=56 Id=35014 Flags= FragOffset=0 TTL=1 Protocol=OSPF Checksum=23179 SrcIP=192.168.170.2 DstIP=192.168.170.8 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Link State Request PacketLength=36 RouterID=3232279043 AreaID=1 Checksum=48583 Content=[{LSType=1 LSID=3232279048 AdvRouter=3232279048}] AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2LSRequest (0.00s) 515s === RUN TestPacketOSPF3LSRequest 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 140 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 100 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 154 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..140..] SrcMAC=c2:01:1f:fa:00:01 DstMAC=c2:00:1f:fa:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..100..] Version=6 TrafficClass=224 FlowLabel=0 Length=100 NextHeader=OSPF HopLimit=1 SrcIP=fe80::2 DstIP=fe80::1 HopByHop=nil} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=3 Type=Link State Request PacketLength=100 RouterID=33686018 AreaID=1 Checksum=11418 Content=[..7..] Instance=0 Reserved=0} 515s 515s --- PASS: TestPacketOSPF3LSRequest (0.00s) 515s === RUN TestPacketOSPF2LSUpdate 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 312 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 292 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 326 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..312..] SrcMAC=00:60:08:81:7a:70 DstMAC=01:00:5e:00:00:06 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..292..] Version=4 IHL=5 TOS=192 Length=312 Id=12325 Flags= FragOffset=0 TTL=1 Protocol=OSPF Checksum=15575 SrcIP=192.168.170.2 DstIP=224.0.0.6 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Link State Update PacketLength=292 RouterID=3232279043 AreaID=1 Checksum=13931 Content={ NumOfLSAs=7 LSAs=[..7..]} AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2LSUpdate (0.00s) 515s === RUN TestPacketOSPF2LSUpdateLSA2 515s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 128 bytes 515s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 124 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 104 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 142 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..128..] SrcMAC=d4:e8:80:c2:b1:c9 DstMAC=01:00:5e:00:00:05 EthernetType=Dot1Q Length=0} 515s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 127, 8, 0] Payload=[..124..] Priority=0 DropEligible=false VLANIdentifier=383 Type=IPv4} 515s - Layer 3 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..104..] Version=4 IHL=5 TOS=192 Length=140 Id=63460 Flags= FragOffset=0 TTL=1 Protocol=OSPF Checksum=6401 SrcIP=172.24.27.86 DstIP=224.0.0.5 Options=[] Padding=[]} 515s - Layer 4 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Link State Update PacketLength=88 RouterID=2887255110 AreaID=12 Checksum=0 Content={ NumOfLSAs=2 LSAs=[{LSAge=1 LSType=1 LinkStateID=2887255110 AdvRouter=2887255110 LSSeqNumber=2147484698 LSChecksum=24613 Length=36 LSOptions=40 Content={ Flags=0 Links=1 Routers=[{Type=2 LinkID=2887261014 LinkData=2887261014 Metric=1}]}}, {LSAge=1 LSType=2 LinkStateID=2887261014 AdvRouter=2887255110 LSSeqNumber=2147484703 LSChecksum=14606 Length=40 LSOptions=40 Content={ NetworkMask=4294967288 AttachedRouter=[2887255110, 2887255109, 2887261011, 2887261012]}}]} AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2LSUpdateLSA2 (0.00s) 515s === RUN TestPacketOSPF2LSUpdateLSA7 515s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 124 bytes 515s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 120 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 100 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 138 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..124..] SrcMAC=00:1a:1e:02:81:a8 DstMAC=01:00:5e:00:00:06 EthernetType=Dot1Q Length=0} 515s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 127, 8, 0] Payload=[..120..] Priority=0 DropEligible=false VLANIdentifier=383 Type=IPv4} 515s - Layer 3 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..100..] Version=4 IHL=5 TOS=192 Length=136 Id=0 Flags=DF FragOffset=0 TTL=1 Protocol=OSPF Checksum=53482 SrcIP=172.24.27.84 DstIP=224.0.0.6 Options=[] Padding=[]} 515s - Layer 4 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Link State Update PacketLength=84 RouterID=2887261012 AreaID=12 Checksum=0 Content={ NumOfLSAs=2 LSAs=[{LSAge=1 LSType=7 LinkStateID=180899680 AdvRouter=2887261012 LSSeqNumber=2147484582 LSChecksum=19720 Length=36 LSOptions=8 Content={ NetworkMask=4294967264 ExternalBit=128 Metric=256 ForwardingAddress=2887261012 ExternalRouteTag=0}}, {LSAge=1 LSType=7 LinkStateID=176198400 AdvRouter=2887261012 LSSeqNumber=2147484582 LSChecksum=17366 Length=36 LSOptions=8 Content={ NetworkMask=4294967168 ExternalBit=128 Metric=256 ForwardingAddress=2887261012 ExternalRouteTag=0}}]} AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2LSUpdateLSA7 (0.00s) 515s === RUN TestPacketOSPF3LSUpdate 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 328 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 288 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 342 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..328..] SrcMAC=c2:00:1f:fa:00:01 DstMAC=c2:01:1f:fa:00:01 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..288..] Version=6 TrafficClass=224 FlowLabel=0 Length=288 NextHeader=OSPF HopLimit=1 SrcIP=fe80::1 DstIP=fe80::2 HopByHop=nil} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=3 Type=Link State Update PacketLength=288 RouterID=16843009 AreaID=1 Checksum=58710 Content={ NumOfLSAs=7 LSAs=[..7..]} Instance=0 Reserved=0} 515s 515s --- PASS: TestPacketOSPF3LSUpdate (0.00s) 515s === RUN TestPacketOSPF2LSAck 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 44 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 78 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..64..] SrcMAC=00:e0:18:b1:0c:ad DstMAC=00:60:08:81:7a:70 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..44..] Version=4 IHL=5 TOS=192 Length=64 Id=11242 Flags= FragOffset=0 TTL=1 Protocol=OSPF Checksum=46943 SrcIP=192.168.170.8 DstIP=192.168.170.2 Options=[] Padding=[]} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=2 Type=Link State Acknowledgment PacketLength=44 RouterID=3232279048 AreaID=1 Checksum=58100 Content=[{LSAge=3600 LSType=1 LinkStateID=3232279042 AdvRouter=3232279042 LSSeqNumber=2147483649 LSChecksum=19086 Length=48 LSOptions=2}] AuType=0 Authentication=0} 515s 515s --- PASS: TestPacketOSPF2LSAck (0.00s) 515s === RUN TestPacketOSPF3LSAck 515s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 176 bytes 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 136 bytes 515s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 190 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..176..] SrcMAC=c2:00:1f:fa:00:01 DstMAC=33:33:00:00:00:05 EthernetType=IPv6 Length=0} 515s - Layer 2 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..136..] Version=6 TrafficClass=224 FlowLabel=0 Length=136 NextHeader=OSPF HopLimit=1 SrcIP=fe80::1 DstIP=ff02::5 HopByHop=nil} 515s - Layer 3 (00 bytes) = OSPF {Contents=[] Payload=[] Version=3 Type=Link State Acknowledgment PacketLength=136 RouterID=16843009 AreaID=1 Checksum=40236 Content=[..6..] Instance=0 Reserved=0} 515s 515s --- PASS: TestPacketOSPF3LSAck (0.00s) 515s === RUN TestPacketOSPFInvalidLSA 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 DecodeFailure] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 83 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 63 bytes 515s base_test.go:21: Got layer DecodeFailure, 63 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 97 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..83..] SrcMAC=bd:e4:19:72:1d:1f DstMAC=5c:fa:00:00:fa:6c EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..63..] Version=4 IHL=5 TOS=0 Length=173 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=OSPF Checksum=28399 SrcIP=107.150.97.17 DstIP=180.150.192.168 Options=[] Padding=[]} 515s - Layer 3 (63 bytes) = DecodeFailure Packet decoding error: Cannot parse Link State Update packet: Could not extract Link State type. 515s 515s --- PASS: TestPacketOSPFInvalidLSA (0.00s) 515s === RUN TestPacketPrism 515s base_test.go:19: Checking packet layers, want [Prism monitor mode header Dot11 Dot11MgmtProbeReq] 515s base_test.go:21: Got layer Prism monitor mode header, 144 bytes, payload of 126 bytes 515s base_test.go:21: Got layer Dot11, 24 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Dot11MgmtProbeReq, 98 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 270 bytes 515s - Layer 1 (144 bytes) = Prism monitor mode header {Contents=[..144..] Payload=[..126..] Code=68 Length=144 DeviceName=ra0 - Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[..98..] Type=MgmtProbeReq Proto=0 Flags= DurationID=0 Address1=ff:ff:ff:ff:ff:ff Address2=cc:fa:00:ad:79:e8 Address3=ff:ff:ff:ff:ff:ff Address4= SequenceNumber=1050 FragmentNumber=0 Checksum=0 QOS=nil HTControl=nil DataLayer=nil} 515s - Layer 3 (98 bytes) = Dot11MgmtProbeReq {Contents=[..98..] Payload=[]} 515s 515s --- PASS: TestPacketPrism (0.00s) 515s === RUN TestPacketRadiotap0 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 515s base_test.go:21: Got layer RadioTap, 18 bytes, payload of 14 bytes 515s base_test.go:21: Got layer Dot11, 10 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 32 bytes 515s - Layer 1 (18 bytes) = RadioTap {Contents=[..18..] Payload=[..14..] Version=0 Length=18 Present=18478 TSFT=0 Flags=FCS Rate=1 Mb/s ChannelFrequency=2412 MHz ChannelFlags=CCK,Ghz2 FHSS=0 DBMAntennaSignal=-58 DBMAntennaNoise=0 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=7 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS= AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (10 bytes) = Dot11 {Contents=[..10..] Payload=[] Type=CtrlAck Proto=0 Flags= DurationID=0 Address1=88:1f:a1:ae:9d:cb Address2= Address3= Address4= SequenceNumber=0 FragmentNumber=0 Checksum=1263218886 QOS=nil HTControl=nil DataLayer=nil} 515s 515s --- PASS: TestPacketRadiotap0 (0.00s) 515s === RUN TestPacketRadiotap1 515s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 515s base_test.go:21: Got layer RadioTap, 21 bytes, payload of 28 bytes 515s base_test.go:21: Got layer Dot11, 24 bytes, payload of 0 bytes 515s base_test.go:21: Got layer Dot11DataNull, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 49 bytes 515s - Layer 1 (21 bytes) = RadioTap {Contents=[..21..] Payload=[..28..] Version=0 Length=21 Present=542762 TSFT=0 Flags=FCS Rate=0 Mb/s ChannelFrequency=2412 MHz ChannelFlags=Ghz2,Dynamic FHSS=0 DBMAntennaSignal=-36 DBMAntennaNoise=0 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=5 DBAntennaSignal=0 DBAntennaNoise=0 RxFlags= TxFlags= RtsRetries=0 DataRetries=0 MCS=20,MCSIndex#7,longGI AMPDUStatus=ref#0 VHT=} 515s - Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[] Type=DataNull Proto=0 Flags=TO-DS,PowerManagement DurationID=44 Address1=00:3a:9d:aa:f0:19 Address2=1c:ab:a7:f2:13:9d Address3=00:3a:9d:aa:f0:19 Address4= SequenceNumber=2855 FragmentNumber=0 Checksum=384936430 QOS=nil HTControl=nil DataLayer={ Contents=[] Payload=[]}} 515s - Layer 3 (00 bytes) = Dot11DataNull {Contents=[] Payload=[]} 515s 515s --- PASS: TestPacketRadiotap1 (0.00s) 515s === RUN TestRADIUSCode 515s === RUN TestRADIUSCode/Unknown(0) 515s === RUN TestRADIUSCode/Access-Request 515s === RUN TestRADIUSCode/Access-Accept 515s === RUN TestRADIUSCode/Access-Reject 515s === RUN TestRADIUSCode/Accounting-Request 515s === RUN TestRADIUSCode/Accounting-Response 515s === RUN TestRADIUSCode/Access-Challenge 515s === RUN TestRADIUSCode/Status-Server 515s === RUN TestRADIUSCode/Status-Client 515s === RUN TestRADIUSCode/Reserved 515s --- PASS: TestRADIUSCode (0.00s) 515s --- PASS: TestRADIUSCode/Unknown(0) (0.00s) 515s --- PASS: TestRADIUSCode/Access-Request (0.00s) 515s --- PASS: TestRADIUSCode/Access-Accept (0.00s) 515s --- PASS: TestRADIUSCode/Access-Reject (0.00s) 515s --- PASS: TestRADIUSCode/Accounting-Request (0.00s) 515s --- PASS: TestRADIUSCode/Accounting-Response (0.00s) 515s --- PASS: TestRADIUSCode/Access-Challenge (0.00s) 515s --- PASS: TestRADIUSCode/Status-Server (0.00s) 515s --- PASS: TestRADIUSCode/Status-Client (0.00s) 515s --- PASS: TestRADIUSCode/Reserved (0.00s) 515s === RUN TestRADIUSAttributeType 515s === RUN TestRADIUSAttributeType/Unknown(0) 515s === RUN TestRADIUSAttributeType/User-Name 515s === RUN TestRADIUSAttributeType/User-Password 515s === RUN TestRADIUSAttributeType/CHAP-Password 515s === RUN TestRADIUSAttributeType/NAS-IP-Address 515s === RUN TestRADIUSAttributeType/NAS-Port 515s === RUN TestRADIUSAttributeType/Service-Type 515s === RUN TestRADIUSAttributeType/Framed-Protocol 515s === RUN TestRADIUSAttributeType/Framed-IP-Address 515s === RUN TestRADIUSAttributeType/Framed-IP-Netmask 515s === RUN TestRADIUSAttributeType/Framed-Routing 515s === RUN TestRADIUSAttributeType/Filter-Id 515s === RUN TestRADIUSAttributeType/Framed-MTU 515s === RUN TestRADIUSAttributeType/Framed-Compression 515s === RUN TestRADIUSAttributeType/Login-IP-Host 515s === RUN TestRADIUSAttributeType/Login-Service 515s === RUN TestRADIUSAttributeType/Login-TCP-Port 515s === RUN TestRADIUSAttributeType/Reply-Message 515s === RUN TestRADIUSAttributeType/Callback-Number 515s === RUN TestRADIUSAttributeType/Callback-Id 515s === RUN TestRADIUSAttributeType/Framed-Route 515s === RUN TestRADIUSAttributeType/Framed-IPX-Network 515s === RUN TestRADIUSAttributeType/State 515s === RUN TestRADIUSAttributeType/Class 515s === RUN TestRADIUSAttributeType/Vendor-Specific 515s === RUN TestRADIUSAttributeType/Session-Timeout 515s === RUN TestRADIUSAttributeType/Idle-Timeout 515s === RUN TestRADIUSAttributeType/Termination-Action 515s === RUN TestRADIUSAttributeType/Called-Station-Id 515s === RUN TestRADIUSAttributeType/Calling-Station-Id 515s === RUN TestRADIUSAttributeType/NAS-Identifier 515s === RUN TestRADIUSAttributeType/Proxy-State 515s === RUN TestRADIUSAttributeType/Login-LAT-Service 515s === RUN TestRADIUSAttributeType/Login-LAT-Node 515s === RUN TestRADIUSAttributeType/Login-LAT-Group 515s === RUN TestRADIUSAttributeType/Framed-AppleTalk-Link 515s === RUN TestRADIUSAttributeType/Framed-AppleTalk-Network 515s === RUN TestRADIUSAttributeType/Framed-AppleTalk-Zone 515s === RUN TestRADIUSAttributeType/Acct-Status-Type 515s === RUN TestRADIUSAttributeType/Acct-Delay-Time 515s === RUN TestRADIUSAttributeType/Acct-Input-Octets 515s === RUN TestRADIUSAttributeType/Acct-Output-Octets 515s === RUN TestRADIUSAttributeType/Acct-Session-Id 515s === RUN TestRADIUSAttributeType/Acct-Authentic 515s === RUN TestRADIUSAttributeType/Acct-Session-Time 515s === RUN TestRADIUSAttributeType/Acct-Input-Packets 515s === RUN TestRADIUSAttributeType/Acct-Output-Packets 515s === RUN TestRADIUSAttributeType/Acct-Terminate-Cause 515s === RUN TestRADIUSAttributeType/Acct-Multi-Session-Id 515s === RUN TestRADIUSAttributeType/Acct-Link-Count 515s === RUN TestRADIUSAttributeType/Acct-Input-Gigawords 515s === RUN TestRADIUSAttributeType/Acct-Output-Gigawords 515s === RUN TestRADIUSAttributeType/Event-Timestamp 515s === RUN TestRADIUSAttributeType/CHAP-Challenge 515s === RUN TestRADIUSAttributeType/NAS-Port-Type 515s === RUN TestRADIUSAttributeType/Port-Limit 515s === RUN TestRADIUSAttributeType/Login-LAT-Port 515s === RUN TestRADIUSAttributeType/Tunnel-Type 515s === RUN TestRADIUSAttributeType/Tunnel-Medium-Type 515s === RUN TestRADIUSAttributeType/Tunnel-Client-Endpoint 515s === RUN TestRADIUSAttributeType/Tunnel-Server-Endpoint 515s === RUN TestRADIUSAttributeType/Acct-Tunnel-Connection 515s === RUN TestRADIUSAttributeType/Tunnel-Password 515s === RUN TestRADIUSAttributeType/ARAP-Password 515s === RUN TestRADIUSAttributeType/ARAP-Features 515s === RUN TestRADIUSAttributeType/ARAP-Zone-Access 515s === RUN TestRADIUSAttributeType/ARAP-Security 515s === RUN TestRADIUSAttributeType/ARAP-Security-Data 515s === RUN TestRADIUSAttributeType/Password-Retry 515s === RUN TestRADIUSAttributeType/Prompt 515s === RUN TestRADIUSAttributeType/Connect-Info 515s === RUN TestRADIUSAttributeType/Configuration-Token 515s === RUN TestRADIUSAttributeType/EAP-Message 515s === RUN TestRADIUSAttributeType/Message-Authenticator 515s === RUN TestRADIUSAttributeType/Tunnel-Private-Group-ID 515s === RUN TestRADIUSAttributeType/Tunnel-Assignment-ID 515s === RUN TestRADIUSAttributeType/Tunnel-Preference 515s === RUN TestRADIUSAttributeType/ARAP-Challenge-Response 515s === RUN TestRADIUSAttributeType/Acct-Interim-Interval 515s === RUN TestRADIUSAttributeType/Acct-Tunnel-Packets-Lost 515s === RUN TestRADIUSAttributeType/NAS-Port-Id 515s === RUN TestRADIUSAttributeType/Framed-Pool 515s === RUN TestRADIUSAttributeType/Tunnel-Client-Auth-ID 515s === RUN TestRADIUSAttributeType/Tunnel-Server-Auth-ID 515s --- PASS: TestRADIUSAttributeType (0.01s) 515s --- PASS: TestRADIUSAttributeType/Unknown(0) (0.00s) 515s --- PASS: TestRADIUSAttributeType/User-Name (0.00s) 515s --- PASS: TestRADIUSAttributeType/User-Password (0.00s) 515s --- PASS: TestRADIUSAttributeType/CHAP-Password (0.00s) 515s --- PASS: TestRADIUSAttributeType/NAS-IP-Address (0.00s) 515s --- PASS: TestRADIUSAttributeType/NAS-Port (0.00s) 515s --- PASS: TestRADIUSAttributeType/Service-Type (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-Protocol (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-IP-Address (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-IP-Netmask (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-Routing (0.00s) 515s --- PASS: TestRADIUSAttributeType/Filter-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-MTU (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-Compression (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-IP-Host (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-Service (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-TCP-Port (0.00s) 515s --- PASS: TestRADIUSAttributeType/Reply-Message (0.00s) 515s --- PASS: TestRADIUSAttributeType/Callback-Number (0.00s) 515s --- PASS: TestRADIUSAttributeType/Callback-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-Route (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-IPX-Network (0.00s) 515s --- PASS: TestRADIUSAttributeType/State (0.00s) 515s --- PASS: TestRADIUSAttributeType/Class (0.00s) 515s --- PASS: TestRADIUSAttributeType/Vendor-Specific (0.00s) 515s --- PASS: TestRADIUSAttributeType/Session-Timeout (0.00s) 515s --- PASS: TestRADIUSAttributeType/Idle-Timeout (0.00s) 515s --- PASS: TestRADIUSAttributeType/Termination-Action (0.00s) 515s --- PASS: TestRADIUSAttributeType/Called-Station-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/Calling-Station-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/NAS-Identifier (0.00s) 515s --- PASS: TestRADIUSAttributeType/Proxy-State (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-LAT-Service (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-LAT-Node (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-LAT-Group (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-AppleTalk-Link (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-AppleTalk-Network (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-AppleTalk-Zone (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Status-Type (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Delay-Time (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Input-Octets (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Output-Octets (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Session-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Authentic (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Session-Time (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Input-Packets (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Output-Packets (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Terminate-Cause (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Multi-Session-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Link-Count (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Input-Gigawords (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Output-Gigawords (0.00s) 515s --- PASS: TestRADIUSAttributeType/Event-Timestamp (0.00s) 515s --- PASS: TestRADIUSAttributeType/CHAP-Challenge (0.00s) 515s --- PASS: TestRADIUSAttributeType/NAS-Port-Type (0.00s) 515s --- PASS: TestRADIUSAttributeType/Port-Limit (0.00s) 515s --- PASS: TestRADIUSAttributeType/Login-LAT-Port (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Type (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Medium-Type (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Client-Endpoint (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Server-Endpoint (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Tunnel-Connection (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Password (0.00s) 515s --- PASS: TestRADIUSAttributeType/ARAP-Password (0.00s) 515s --- PASS: TestRADIUSAttributeType/ARAP-Features (0.00s) 515s --- PASS: TestRADIUSAttributeType/ARAP-Zone-Access (0.00s) 515s --- PASS: TestRADIUSAttributeType/ARAP-Security (0.00s) 515s --- PASS: TestRADIUSAttributeType/ARAP-Security-Data (0.00s) 515s --- PASS: TestRADIUSAttributeType/Password-Retry (0.00s) 515s --- PASS: TestRADIUSAttributeType/Prompt (0.00s) 515s --- PASS: TestRADIUSAttributeType/Connect-Info (0.00s) 515s --- PASS: TestRADIUSAttributeType/Configuration-Token (0.00s) 515s --- PASS: TestRADIUSAttributeType/EAP-Message (0.00s) 515s --- PASS: TestRADIUSAttributeType/Message-Authenticator (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Private-Group-ID (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Assignment-ID (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Preference (0.00s) 515s --- PASS: TestRADIUSAttributeType/ARAP-Challenge-Response (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Interim-Interval (0.00s) 515s --- PASS: TestRADIUSAttributeType/Acct-Tunnel-Packets-Lost (0.00s) 515s --- PASS: TestRADIUSAttributeType/NAS-Port-Id (0.00s) 515s --- PASS: TestRADIUSAttributeType/Framed-Pool (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Client-Auth-ID (0.00s) 515s --- PASS: TestRADIUSAttributeType/Tunnel-Server-Auth-ID (0.00s) 515s === RUN TestRADIUSRecordSize 515s === RUN TestRADIUSRecordSize/Minimum-1 515s === RUN TestRADIUSRecordSize/Maximum+1 515s --- PASS: TestRADIUSRecordSize (0.00s) 515s --- PASS: TestRADIUSRecordSize/Minimum-1 (0.00s) 515s --- PASS: TestRADIUSRecordSize/Maximum+1 (0.00s) 515s === RUN TestRADIUSLengthField 515s === RUN TestRADIUSLengthField/Minimum-1 515s === RUN TestRADIUSLengthField/Minimum+1 515s === RUN TestRADIUSLengthField/Maximum-1 515s === RUN TestRADIUSLengthField/Maximum+1 515s --- PASS: TestRADIUSLengthField (0.00s) 515s --- PASS: TestRADIUSLengthField/Minimum-1 (0.00s) 515s --- PASS: TestRADIUSLengthField/Minimum+1 (0.00s) 515s --- PASS: TestRADIUSLengthField/Maximum-1 (0.00s) 515s --- PASS: TestRADIUSLengthField/Maximum+1 (0.00s) 515s === RUN TestRADIUSAttributesLengthField 515s === RUN TestRADIUSAttributesLengthField/Minimum-1 515s === RUN TestRADIUSAttributesLengthField/Minimum-1#01 515s === RUN TestRADIUSAttributesLengthField/Minimum+1 515s === RUN TestRADIUSAttributesLengthField/Minimum+1#01 515s --- PASS: TestRADIUSAttributesLengthField (0.00s) 515s --- PASS: TestRADIUSAttributesLengthField/Minimum-1 (0.00s) 515s --- PASS: TestRADIUSAttributesLengthField/Minimum-1#01 (0.00s) 515s --- PASS: TestRADIUSAttributesLengthField/Minimum+1 (0.00s) 515s --- PASS: TestRADIUSAttributesLengthField/Minimum+1#01 (0.00s) 515s === RUN TestRADIUSAccessRequest 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP RADIUS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 103 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 83 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 75 bytes 515s base_test.go:21: Got layer RADIUS, 75 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 117 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..103..] SrcMAC=02:42:06:4d:ad:bf DstMAC=02:42:ac:14:00:02 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..83..] Version=4 IHL=5 TOS=0 Length=103 Id=61162 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=62319 SrcIP=172.20.0.1 DstIP=172.20.0.2 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..75..] SrcPort=55337 DstPort=1812(radius) Length=83 Checksum=22672} 515s - Layer 4 (75 bytes) = RADIUS {Contents=[..75..] Payload=[] Code=Access-Request Identifier=141 Length=75 Authenticator=[59 189 34 82 180 200 216 68 27 70 121 191 74 43 134 1] Attributes=[..5..]} 515s 515s --- PASS: TestRADIUSAccessRequest (0.00s) 515s === RUN TestRADIUSAccessAccept 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP RADIUS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 48 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 28 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 20 bytes 515s base_test.go:21: Got layer RADIUS, 20 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 62 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..48..] SrcMAC=02:42:ac:14:00:02 DstMAC=02:42:06:4d:ad:bf EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..28..] Version=4 IHL=5 TOS=0 Length=48 Id=61181 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=13204 SrcIP=172.20.0.2 DstIP=172.20.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..20..] SrcPort=1812(radius) DstPort=55337 Length=28 Checksum=22617} 515s - Layer 4 (20 bytes) = RADIUS {Contents=[..20..] Payload=[] Code=Access-Accept Identifier=141 Length=20 Authenticator=[134 168 213 205 105 60 7 94 158 24 162 45 221 95 43 255] Attributes=[]} 515s 515s --- PASS: TestRADIUSAccessAccept (0.00s) 515s === RUN TestRMCPDecodeFromBytes 515s --- PASS: TestRMCPDecodeFromBytes (0.00s) 515s === RUN TestRMCPTestSerializeTo 515s --- PASS: TestRMCPTestSerializeTo (0.00s) 515s === RUN TestDecodeUDPSFlow 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP SFlow] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 1468 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 1448 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 1440 bytes 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 1482 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..1468..] SrcMAC=f0:50:56:85:3a:fd DstMAC=84:2b:2b:16:8b:62 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..1448..] Version=4 IHL=5 TOS=0 Length=1468 Id=39940 Flags=DF FragOffset=0 TTL=255 Protocol=UDP Checksum=50944 SrcIP=10.1.255.14 DstIP=10.1.0.27 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..1440..] SrcPort=51031 DstPort=6343(sflow) Length=1448 Checksum=8763} 515s - Layer 4 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=10.1.248.22 SubAgentID=17 SequenceNumber=40443 AgentUptime=1078576845 SampleCount=7 FlowSamples=[..6..] CounterSamples=[{EnterpriseID=Standard SFlow Format=Counter Sample SampleLength=168 SequenceNumber=8434 SourceIDClass=Single Interface SourceIDIndex=522 RecordCount=2 Records=[{EnterpriseID=Standard SFlow Format=Generic Interface Counters FlowDataLength=88 IfIndex=522 IfType=6 IfSpeed=10000000000 IfDirection=1 IfStatus=3 IfInOctets=327115139476491 IfInUcastPkts=3406683542 IfInMulticastPkts=436422 IfInBroadcastPkts=123 IfInDiscards=0 IfInErrors=0 IfInUnknownProtos=0 IfOutOctets=57184089570462 IfOutUcastPkts=1449403761 IfOutMulticastPkts=7363268 IfOutBroadcastPkts=592113 IfOutDiscards=0 IfOutErrors=0 IfPromiscuousMode=0}, {EnterpriseID=Standard SFlow Format=Ethernet Interface Counters FlowDataLength=52 AlignmentErrors=0 FCSErrors=0 SingleCollisionFrames=0 MultipleCollisionFrames=0 SQETestErrors=0 DeferredTransmissions=0 LateCollisions=0 ExcessiveCollisions=0 InternalMacTransmitErrors=0 CarrierSenseErrors=0 FrameTooLongs=0 InternalMacReceiveErrors=0 SymbolErrors=0}]}]} 515s 515s --- PASS: TestDecodeUDPSFlow (0.00s) 515s === RUN TestDecodeSFlowDatagram 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP SFlow] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 1468 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 1448 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 1440 bytes 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 1482 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..1468..] SrcMAC=f0:50:56:85:3a:fd DstMAC=84:2b:2b:16:8b:62 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..1448..] Version=4 IHL=5 TOS=0 Length=1468 Id=39940 Flags=DF FragOffset=0 TTL=255 Protocol=UDP Checksum=50944 SrcIP=10.1.255.14 DstIP=10.1.0.27 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..1440..] SrcPort=51031 DstPort=6343(sflow) Length=1448 Checksum=8763} 515s - Layer 4 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=10.1.248.22 SubAgentID=17 SequenceNumber=40443 AgentUptime=1078576845 SampleCount=7 FlowSamples=[..6..] CounterSamples=[{EnterpriseID=Standard SFlow Format=Counter Sample SampleLength=168 SequenceNumber=8434 SourceIDClass=Single Interface SourceIDIndex=522 RecordCount=2 Records=[{EnterpriseID=Standard SFlow Format=Generic Interface Counters FlowDataLength=88 IfIndex=522 IfType=6 IfSpeed=10000000000 IfDirection=1 IfStatus=3 IfInOctets=327115139476491 IfInUcastPkts=3406683542 IfInMulticastPkts=436422 IfInBroadcastPkts=123 IfInDiscards=0 IfInErrors=0 IfInUnknownProtos=0 IfOutOctets=57184089570462 IfOutUcastPkts=1449403761 IfOutMulticastPkts=7363268 IfOutBroadcastPkts=592113 IfOutDiscards=0 IfOutErrors=0 IfPromiscuousMode=0}, {EnterpriseID=Standard SFlow Format=Ethernet Interface Counters FlowDataLength=52 AlignmentErrors=0 FCSErrors=0 SingleCollisionFrames=0 MultipleCollisionFrames=0 SQETestErrors=0 DeferredTransmissions=0 LateCollisions=0 ExcessiveCollisions=0 InternalMacTransmitErrors=0 CarrierSenseErrors=0 FrameTooLongs=0 InternalMacReceiveErrors=0 SymbolErrors=0}]}]} 515s 515s --- PASS: TestDecodeSFlowDatagram (0.00s) 515s === RUN TestPacketPacket0 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP SFlow] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 1160 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 1140 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 1132 bytes 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 1174 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..1160..] SrcMAC=00:00:00:00:00:00 DstMAC=00:00:00:00:00:00 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..1140..] Version=4 IHL=5 TOS=0 Length=1160 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=14435 SrcIP=127.0.0.1 DstIP=127.0.0.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..1132..] SrcPort=56504 DstPort=6343(sflow) Length=1140 Checksum=648} 515s - Layer 4 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=192.168.91.17 SubAgentID=0 SequenceNumber=46394 AgentUptime=52000 SampleCount=3 FlowSamples=[{EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=340 SequenceNumber=139118 SourceIDClass=Single Interface SourceIDIndex=3 SamplingRate=1 SamplePool=139118 Dropped=0 InputInterfaceFormat=0 InputInterface=3 OutputInterfaceFormat=0 OutputInterface=1073741823 RecordCount=4 Records=[{EnterpriseID=Standard SFlow Format=Extended URL Flow Record FlowDataLength=48 Direction=Source address is the server URL=http://www.sflow.org Host=host1.sflow.org}, {EnterpriseID=Standard SFlow Format=Extended User Flow Record FlowDataLength=44 SourceCharSet=106 SourceUserID=source user DestinationCharSet=106 DestinationUserID=destination user}, {EnterpriseID=Standard SFlow Format=Extended Gateway Flow Record FlowDataLength=100 NextHop=13.12.11.10 AS=65001 SourceAS=123 PeerAS=999 ASPathCount=3 ASPath=[AS Sequence:[123 456 789], AS Set:[11111 22222 33333], AS Sequence:[777 888 999]] Communities=[12, 13] LocalPref=432}, {EnterpriseID=Standard SFlow Format=Raw Packet Flow Record FlowDataLength=84 HeaderProtocol=ETHERNET-ISO88023 FrameLength=70 PayloadRemoved=4 HeaderLength=66 Header=PACKET: 68 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..54..] SrcMAC=00:50:56:c0:00:09 DstMAC=00:0c:29:67:a0:e5 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..32..] Version=4 IHL=5 TOS=16 Length=52 Id=37571 Flags=DF FragOffset=0 TTL=64 Protocol=TCP Checksum=28813 SrcIP=192.168.91.1 DstIP=192.168.91.17 Options=[] Padding=[]} 515s - Layer 3 (32 bytes) = TCP {Contents=[..32..] Payload=[] SrcPort=54237 DstPort=22(ssh) Seq=3811476599 Ack=325961043 DataOffset=8 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=8183 Checksum=59261 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:784756794/1016954 0x2ec6703a000f847a)] Padding=[]} 515s }]}, {EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=400 SequenceNumber=139119 SourceIDClass=Single Interface SourceIDIndex=3 SamplingRate=1 SamplePool=139119 Dropped=0 InputInterfaceFormat=0 InputInterface=1073741823 OutputInterfaceFormat=0 OutputInterface=3 RecordCount=4 Records=[{EnterpriseID=Standard SFlow Format=Extended URL Flow Record FlowDataLength=48 Direction=Source address is the server URL=http://www.sflow.org Host=host1.sflow.org}, {EnterpriseID=Standard SFlow Format=Extended User Flow Record FlowDataLength=44 SourceCharSet=106 SourceUserID=source user DestinationCharSet=106 DestinationUserID=destination user}, {EnterpriseID=Standard SFlow Format=Extended Gateway Flow Record FlowDataLength=100 NextHop=13.12.11.10 AS=65001 SourceAS=123 PeerAS=999 ASPathCount=3 ASPath=[AS Sequence:[123 456 789], AS Set:[11111 22222 33333], AS Sequence:[777 888 999]] Communities=[12, 13] LocalPref=432}, {EnterpriseID=Standard SFlow Format=Raw Packet Flow Record FlowDataLength=144 HeaderProtocol=ETHERNET-ISO88023 FrameLength=390 PayloadRemoved=4 HeaderLength=128 Header=PACKET: 128 bytes, truncated 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..114..] SrcMAC=00:0c:29:67:a0:e5 DstMAC=00:50:56:c0:00:09 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..94..] Version=4 IHL=5 TOS=16 Length=372 Id=48122 Flags=DF FragOffset=0 TTL=64 Protocol=TCP Checksum=17942 SrcIP=192.168.91.17 DstIP=192.168.91.1 Options=[] Padding=[]} 515s - Layer 3 (32 bytes) = TCP {Contents=[..32..] Payload=[..62..] SrcPort=22(ssh) DstPort=54237 Seq=325961043 Ack=3811476599 DataOffset=8 FIN=false SYN=false RST=false PSH=true ACK=true URG=false ECE=false CWR=false NS=false Window=272 Checksum=14538 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:1016957/784756794 0x000f847d2ec6703a)] Padding=[]} 515s - Layer 4 (62 bytes) = Payload 62 byte(s) 515s }]}, {EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=340 SequenceNumber=139120 SourceIDClass=Single Interface SourceIDIndex=3 SamplingRate=1 SamplePool=139120 Dropped=0 InputInterfaceFormat=0 InputInterface=3 OutputInterfaceFormat=0 OutputInterface=1073741823 RecordCount=4 Records=[{EnterpriseID=Standard SFlow Format=Extended URL Flow Record FlowDataLength=48 Direction=Source address is the server URL=http://www.sflow.org Host=host1.sflow.org}, {EnterpriseID=Standard SFlow Format=Extended User Flow Record FlowDataLength=44 SourceCharSet=106 SourceUserID=source user DestinationCharSet=106 DestinationUserID=destination user}, {EnterpriseID=Standard SFlow Format=Extended Gateway Flow Record FlowDataLength=100 NextHop=13.12.11.10 AS=65001 SourceAS=123 PeerAS=999 ASPathCount=3 ASPath=[AS Sequence:[123 456 789], AS Set:[11111 22222 33333], AS Sequence:[777 888 999]] Communities=[12, 13] LocalPref=432}, {EnterpriseID=Standard SFlow Format=Raw Packet Flow Record FlowDataLength=84 HeaderProtocol=ETHERNET-ISO88023 FrameLength=70 PayloadRemoved=4 HeaderLength=66 Header=PACKET: 68 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..54..] SrcMAC=00:50:56:c0:00:09 DstMAC=00:0c:29:67:a0:e5 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..32..] Version=4 IHL=5 TOS=16 Length=52 Id=25981 Flags=DF FragOffset=0 TTL=64 Protocol=TCP Checksum=40403 SrcIP=192.168.91.1 DstIP=192.168.91.17 Options=[] Padding=[]} 515s - Layer 3 (32 bytes) = TCP {Contents=[..32..] Payload=[] SrcPort=54237 DstPort=22(ssh) Seq=3811476599 Ack=325961363 DataOffset=8 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=8172 Checksum=58947 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:784756796/1016957 0x2ec6703c000f847d)] Padding=[]} 515s }]}] CounterSamples=[]} 515s 515s --- PASS: TestPacketPacket0 (0.01s) 515s === RUN TestDecodeProcessorCounter 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 88 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=10.20.4.0 SubAgentID=100 SequenceNumber=96480 AgentUptime=1929595000 SampleCount=1 FlowSamples=[] CounterSamples=[{EnterpriseID=Standard SFlow Format=Expanded Counter Sample SampleLength=52 SequenceNumber=96480 SourceIDClass=Single Interface SourceIDIndex=1 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=Processor Counters FlowDataLength=28 FiveSecCpu=1450 OneMinCpu=1370 FiveMinCpu=1330 TotalMemory=3884806144 FreeMemory=1441230848}]}]} 515s 515s --- PASS: TestDecodeProcessorCounter (0.00s) 515s === RUN TestDecodeExtendedSwitchFlow 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 92 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=192.168.1.7 SubAgentID=0 SequenceNumber=638 AgentUptime=853599356 SampleCount=1 FlowSamples=[{EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=56 SequenceNumber=291 SourceIDClass=Single Interface SourceIDIndex=29 SamplingRate=256 SamplePool=823 Dropped=22051 InputInterfaceFormat=0 InputInterface=29 OutputInterfaceFormat=0 OutputInterface=4 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=Extended Switch Flow Record FlowDataLength=16 IncomingVLAN=3 IncomingVLANPriority=2 OutgoingVLAN=5 OutgoingVLANPriority=4294967295}]}] CounterSamples=[]} 515s 515s --- PASS: TestDecodeExtendedSwitchFlow (0.00s) 515s === RUN TestDecodeExtendedRouterFlow 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 92 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=192.168.1.18 SubAgentID=0 SequenceNumber=638 AgentUptime=853599356 SampleCount=1 FlowSamples=[{EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=52 SequenceNumber=291 SourceIDClass=Single Interface SourceIDIndex=29 SamplingRate=256 SamplePool=820 Dropped=22018 InputInterfaceFormat=0 InputInterface=29 OutputInterfaceFormat=0 OutputInterface=4 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=Extended Router Flow Record FlowDataLength=16 NextHop=192.168.1.33 NextHopSourceMask=4294967295 NextHopDestinationMask=4294967168}]}] CounterSamples=[]} 515s 515s --- PASS: TestDecodeExtendedRouterFlow (0.00s) 515s === RUN TestDecodeExtendedRouterFlowIPv6 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 104 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=192.168.1.18 SubAgentID=0 SequenceNumber=638 AgentUptime=853599356 SampleCount=1 FlowSamples=[{EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=52 SequenceNumber=291 SourceIDClass=Single Interface SourceIDIndex=29 SamplingRate=256 SamplePool=820 Dropped=22018 InputInterfaceFormat=0 InputInterface=29 OutputInterfaceFormat=0 OutputInterface=4 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=Extended Router Flow Record FlowDataLength=28 NextHop=2001:db8:: NextHopSourceMask=4294967295 NextHopDestinationMask=4294967168}]}] CounterSamples=[]} 515s 515s --- PASS: TestDecodeExtendedRouterFlowIPv6 (0.00s) 515s === RUN TestDecodeExtendedIpv4TunnelIngressFlow 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 108 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=127.0.0.1 SubAgentID=0 SequenceNumber=114 AgentUptime=114000 SampleCount=1 FlowSamples=[{EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=72 SequenceNumber=116 SourceIDClass=Single Interface SourceIDIndex=33555432 SamplingRate=1 SamplePool=116 Dropped=0 InputInterfaceFormat=0 InputInterface=0 OutputInterfaceFormat=0 OutputInterface=2147483649 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=Extended IPv4 Tunnel Ingress Record FlowDataLength=32 SFlowIpv4Record={ Length=0 Protocol=47 IPSrc=192.168.0.84 IPDst=192.168.0.83 PortSrc=0 PortDst=0 TCPFlags=0 TOS=0}}]}] CounterSamples=[]} 515s 515s --- PASS: TestDecodeExtendedIpv4TunnelIngressFlow (0.00s) 515s === RUN TestDecodeExtendedIpv4TunnelEgressFlow 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 108 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=127.0.0.1 SubAgentID=1 SequenceNumber=18 AgentUptime=17000 SampleCount=1 FlowSamples=[{EnterpriseID=Standard SFlow Format=Flow Sample SampleLength=72 SequenceNumber=18 SourceIDClass=Single Interface SourceIDIndex=33555433 SamplingRate=1 SamplePool=18 Dropped=0 InputInterfaceFormat=0 InputInterface=108 OutputInterfaceFormat=0 OutputInterface=2147483649 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=Extended IPv4 Tunnel Egress Record FlowDataLength=32 SFlowIpv4Record={ Length=0 Protocol=0 IPSrc=0.0.0.0 IPDst=192.168.0.84 PortSrc=0 PortDst=0 TCPFlags=0 TOS=0}}]}] CounterSamples=[]} 515s 515s --- PASS: TestDecodeExtendedIpv4TunnelEgressFlow (0.00s) 515s === RUN TestDecodeEthernetFrameFlow 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 532 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=185.120.22.246 SubAgentID=100000 SequenceNumber=11 AgentUptime=12951 SampleCount=7 FlowSamples=[..7..] CounterSamples=[]} 515s 515s --- PASS: TestDecodeEthernetFrameFlow (0.00s) 515s === RUN TestDecodePortnameCounter 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 252 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=127.0.0.1 SubAgentID=0 SequenceNumber=111469 AgentUptime=235197000 SampleCount=1 FlowSamples=[] CounterSamples=[{EnterpriseID=Standard SFlow Format=Counter Sample SampleLength=216 SequenceNumber=23520 SourceIDClass=Single Interface SourceIDIndex=14 RecordCount=4 Records=[{EnterpriseID=Standard SFlow Format=Ethernet Interface Counters FlowDataLength=52 AlignmentErrors=0 FCSErrors=0 SingleCollisionFrames=4294967295 MultipleCollisionFrames=4294967295 SQETestErrors=4294967295 DeferredTransmissions=4294967295 LateCollisions=4294967295 ExcessiveCollisions=4294967295 InternalMacTransmitErrors=4294967295 CarrierSenseErrors=4294967295 FrameTooLongs=4294967295 InternalMacReceiveErrors=4294967295 SymbolErrors=4294967295}, {EnterpriseID=Standard SFlow Format=Openflow Port Counters FlowDataLength=12 DatapathID=108659399421513 PortNo=3}, {EnterpriseID=Standard SFlow Format=PORT NAME Counters FlowDataLength=20 Len=16 Str=tapd98154f2-00}, {EnterpriseID=Standard SFlow Format=Generic Interface Counters FlowDataLength=88 IfIndex=14 IfType=6 IfSpeed=10000000000 IfDirection=1 IfStatus=3 IfInOctets=18249 IfInUcastPkts=181 IfInMulticastPkts=0 IfInBroadcastPkts=4294967295 IfInDiscards=0 IfInErrors=0 IfInUnknownProtos=4294967295 IfOutOctets=35339 IfOutUcastPkts=466 IfOutMulticastPkts=4294967295 IfOutBroadcastPkts=4294967295 IfOutDiscards=0 IfOutErrors=0 IfPromiscuousMode=0}]}]} 515s 515s --- PASS: TestDecodePortnameCounter (0.00s) 515s === RUN TestDecodeVLANCounter 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 88 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=10.20.4.0 SubAgentID=100 SequenceNumber=96480 AgentUptime=1929595000 SampleCount=1 FlowSamples=[] CounterSamples=[{EnterpriseID=Standard SFlow Format=Expanded Counter Sample SampleLength=52 SequenceNumber=96480 SourceIDClass=Single Interface SourceIDIndex=1 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=VLAN Counters FlowDataLength=28 VlanID=10 Octets=25963724 UcastPkts=38531 MulticastPkts=167958 BroadcastPkts=128627 Discards=0}]}]} 515s 515s --- PASS: TestDecodeVLANCounter (0.00s) 515s === RUN TestDecodeLACPCounter 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 112 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=127.0.0.1 SubAgentID=0 SequenceNumber=14565 AgentUptime=95295000 SampleCount=1 FlowSamples=[] CounterSamples=[{EnterpriseID=Standard SFlow Format=Counter Sample SampleLength=116 SequenceNumber=3376 SourceIDClass=Single Interface SourceIDIndex=1 RecordCount=1 Records=[{EnterpriseID=Standard SFlow Format=LACP Counters FlowDataLength=56 ActorSystemID=7e:60:69:73:8f:42 PartnerSystemID=00:00:00:00:00:00 AttachedAggID=1 LacpPortState={ PortStateAll=91553792} LACPDUsRx=0 MarkerPDUsRx=4294967295 MarkerResponsePDUsRx=4294967295 UnknownRx=4294967295 IllegalRx=0 LACPDUsTx=1173 MarkerPDUsTx=4294967295 MarkerResponsePDUsTx=4294967295}]}]} 515s 515s --- PASS: TestDecodeLACPCounter (0.00s) 515s === RUN TestDecodeOpenflowCounter 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 244 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=127.0.0.1 SubAgentID=0 SequenceNumber=111450 AgentUptime=235148000 SampleCount=1 FlowSamples=[] CounterSamples=[{EnterpriseID=Standard SFlow Format=Counter Sample SampleLength=208 SequenceNumber=23515 SourceIDClass=Single Interface SourceIDIndex=11 RecordCount=4 Records=[{EnterpriseID=Standard SFlow Format=Ethernet Interface Counters FlowDataLength=52 AlignmentErrors=0 FCSErrors=0 SingleCollisionFrames=4294967295 MultipleCollisionFrames=4294967295 SQETestErrors=4294967295 DeferredTransmissions=4294967295 LateCollisions=4294967295 ExcessiveCollisions=4294967295 InternalMacTransmitErrors=4294967295 CarrierSenseErrors=4294967295 FrameTooLongs=4294967295 InternalMacReceiveErrors=4294967295 SymbolErrors=4294967295}, {EnterpriseID=Standard SFlow Format=Openflow Port Counters FlowDataLength=12 DatapathID=108659399421513 PortNo=65534}, {EnterpriseID=Standard SFlow Format=PORT NAME Counters FlowDataLength=12 Len=8 Str=br-int}, {EnterpriseID=Standard SFlow Format=Generic Interface Counters FlowDataLength=88 IfIndex=11 IfType=6 IfSpeed=100000000 IfDirection=0 IfStatus=0 IfInOctets=0 IfInUcastPkts=0 IfInMulticastPkts=0 IfInBroadcastPkts=4294967295 IfInDiscards=0 IfInErrors=0 IfInUnknownProtos=4294967295 IfOutOctets=0 IfOutUcastPkts=0 IfOutMulticastPkts=4294967295 IfOutBroadcastPkts=4294967295 IfOutDiscards=0 IfOutErrors=0 IfPromiscuousMode=0}]}]} 515s 515s --- PASS: TestDecodeOpenflowCounter (0.00s) 515s === RUN TestDecodeAppResourcesOvsdbCounter 515s base_test.go:19: Checking packet layers, want [SFlow] 515s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 128 bytes 515s - Layer 1 (00 bytes) = SFlow {Contents=[] Payload=[] DatagramVersion=5 AgentAddress=127.0.0.1 SubAgentID=0 SequenceNumber=111455 AgentUptime=235164000 SampleCount=1 FlowSamples=[] CounterSamples=[{EnterpriseID=Standard SFlow Format=Counter Sample SampleLength=92 SequenceNumber=23517 SourceIDClass=Single Interface SourceIDIndex=33555432 RecordCount=2 Records=[{EnterpriseID=Standard SFlow Format=App Resources Counters FlowDataLength=40 UserTime=726317 SystemTime=669497 MemUsed=5812224 MemMax=0 FdOpen=0 FdMax=0 ConnOpen=0 ConnMax=0}, {EnterpriseID=Standard SFlow Format=OVSDP Counters FlowDataLength=24 NHit=1015 NMissed=328 NLost=0 NMaskHit=2619 NFlows=0 NMasks=0}]}]} 515s 515s --- PASS: TestDecodeAppResourcesOvsdbCounter (0.00s) 515s === RUN TestSIPMain 515s --- PASS: TestSIPMain (0.00s) 515s === RUN TestTCPOptionKindString 515s --- PASS: TestTCPOptionKindString (0.00s) 515s === RUN TestTCPSerializePadding 515s --- PASS: TestTCPSerializePadding (0.00s) 515s === RUN TestPacketTCPOptionDecode 515s --- PASS: TestPacketTCPOptionDecode (0.00s) 515s === RUN TestIPv4UDPChecksum 515s base_test.go:19: Checking packet layers, want [IPv4 UDP] 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 8 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 28 bytes 515s - Layer 1 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..8..] Version=4 IHL=5 TOS=0 Length=28 Id=0 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=36507 SrcIP=192.0.2.1 DstIP=198.51.100.1 Options=[] Padding=[]} 515s - Layer 2 (08 bytes) = UDP {Contents=[..8..] Payload=[] SrcPort=12345(italk) DstPort=9999(distinct) Length=8 Checksum=48223} 515s 515s --- PASS: TestIPv4UDPChecksum (0.00s) 515s === RUN TestIPv6UDPChecksumWithIPv6DstOpts 515s base_test.go:19: Checking packet layers, want [IPv6 IPv6Destination UDP] 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 16 bytes 515s base_test.go:21: Got layer IPv6Destination, 8 bytes, payload of 8 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 56 bytes 515s - Layer 1 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..16..] Version=6 TrafficClass=0 FlowLabel=0 Length=16 NextHeader=IPv6Destination HopLimit=64 SrcIP=2001:db8::1 DstIP=2001:db8::2 HopByHop=nil} 515s - Layer 2 (08 bytes) = IPv6Destination {Contents=[..8..] Payload=[..8..] NextHeader=UDP HeaderLength=0 ActualLength=8 Options=[{OptionType=1 OptionLength=4 ActualLength=6 OptionData=[0, 0, 0, 0] OptionAlignment=[0 0]}]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[] SrcPort=12345(italk) DstPort=9999(distinct) Length=8 Checksum=19745} 515s 515s --- PASS: TestIPv6UDPChecksumWithIPv6DstOpts (0.00s) 515s === RUN TestIPv6JumbogramUDPChecksum 515s base_test.go:19: Checking packet layers, want [IPv6 IPv6HopByHop UDP Payload] 515s base_test.go:21: Got layer IPv6, 40 bytes, payload of 65552 bytes 515s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 65544 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 65536 bytes 515s base_test.go:21: Got layer Payload, 65536 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 65592 bytes 515s - Layer 1 (40 bytes) = IPv6 {Contents=[..40..] Payload=[..65552..] Version=6 TrafficClass=0 FlowLabel=0 Length=0 NextHeader=IPv6HopByHop HopLimit=64 SrcIP=2001:db8::1 DstIP=2001:db8::2 HopByHop={ Contents=[..8..] Payload=[..65544..] NextHeader=UDP HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 0, 16] OptionAlignment=[0 0]}]}} 515s - Layer 2 (08 bytes) = IPv6HopByHop {Contents=[..8..] Payload=[..65544..] NextHeader=UDP HeaderLength=0 ActualLength=8 Options=[{OptionType=194 OptionLength=4 ActualLength=6 OptionData=[0, 1, 0, 16] OptionAlignment=[0 0]}]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..65536..] SrcPort=12345(italk) DstPort=9999(distinct) Length=0 Checksum=52648} 515s - Layer 4 (65536 bytes) = Payload 65536 byte(s) 515s 515s --- PASS: TestIPv6JumbogramUDPChecksum (0.00s) 515s === RUN TestParseTLSClientHello 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 TCP TLS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 254 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 234 bytes 515s base_test.go:21: Got layer TCP, 20 bytes, payload of 214 bytes 515s base_test.go:21: Got layer TLS, 214 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 268 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..254..] SrcMAC=00:50:56:c0:00:08 DstMAC=00:0c:29:1f:ab:17 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..234..] Version=4 IHL=5 TOS=0 Length=254 Id=28994 Flags=DF FragOffset=0 TTL=128 Protocol=TCP Checksum=20193 SrcIP=192.168.220.1 DstIP=192.168.220.131 Options=[] Padding=[]} 515s - Layer 3 (20 bytes) = TCP {Contents=[..20..] Payload=[..214..] SrcPort=12046 DstPort=443(https) Seq=627883325 Ack=3436110327 DataOffset=5 FIN=false SYN=false RST=false PSH=true ACK=true URG=false ECE=false CWR=false NS=false Window=65535 Checksum=31919 Urgent=0 Options=[] Padding=[]} 515s - Layer 4 (214 bytes) = TLS {Contents=[..214..] Payload=[] ChangeCipherSpec=[] Handshake=[{ContentType=Handshake Version=TLS 1.0 Length=209}] AppData=[] Alert=[]} 515s 515s --- PASS: TestParseTLSClientHello (0.00s) 515s === RUN TestTLSClientHelloDecodeFromBytes 515s --- PASS: TestTLSClientHelloDecodeFromBytes (0.00s) 515s === RUN TestParseTLSChangeCipherSpec 515s base_test.go:19: Checking packet layers, want [TLS] 515s base_test.go:21: Got layer TLS, 53 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 134 bytes 515s - Layer 1 (53 bytes) = TLS {Contents=[..53..] Payload=[] ChangeCipherSpec=[{ContentType=Change Cipher Spec Version=TLS 1.0 Length=1 Message=Change Cipher Spec Message}] Handshake=[{ContentType=Handshake Version=TLS 1.0 Length=70}, {ContentType=Handshake Version=TLS 1.0 Length=48}] AppData=[] Alert=[]} 515s 515s --- PASS: TestParseTLSChangeCipherSpec (0.00s) 515s === RUN TestParseTLSAppData 515s base_test.go:19: Checking packet layers, want [TLS] 515s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 74 bytes 515s - Layer 1 (37 bytes) = TLS {Contents=[..37..] Payload=[] ChangeCipherSpec=[] Handshake=[] AppData=[{ContentType=Application Data Version=TLS 1.0 Length=32 Payload=[..32..]}, {ContentType=Application Data Version=TLS 1.0 Length=32 Payload=[..32..]}] Alert=[]} 515s 515s --- PASS: TestParseTLSAppData (0.00s) 515s === RUN TestSerializeTLSAppData 515s base_test.go:19: Checking packet layers, want [TLS] 515s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 74 bytes 515s - Layer 1 (37 bytes) = TLS {Contents=[..37..] Payload=[] ChangeCipherSpec=[] Handshake=[] AppData=[{ContentType=Application Data Version=TLS 1.0 Length=32 Payload=[..32..]}, {ContentType=Application Data Version=TLS 1.0 Length=32 Payload=[..32..]}] Alert=[]} 515s 515s --- PASS: TestSerializeTLSAppData (0.00s) 515s === RUN TestParseTLSMalformed 515s --- PASS: TestParseTLSMalformed (0.00s) 515s === RUN TestParseTLSTooShort 515s --- PASS: TestParseTLSTooShort (0.00s) 515s === RUN TestParseTLSLengthMismatch 515s --- PASS: TestParseTLSLengthMismatch (0.00s) 515s === RUN TestParseTLSAlertEncrypted 515s base_test.go:19: Checking packet layers, want [TLS] 515s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 37 bytes 515s - Layer 1 (37 bytes) = TLS {Contents=[..37..] Payload=[] ChangeCipherSpec=[] Handshake=[] AppData=[] Alert=[{ContentType=Alert Version=TLS 1.2 Length=32 Level=Unknown(255) Description=Unknown EncryptedMsg=[..32..]}]} 515s 515s --- PASS: TestParseTLSAlertEncrypted (0.00s) 515s === RUN TestSerializeTLSAlertEncrypted 515s base_test.go:19: Checking packet layers, want [TLS] 515s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 37 bytes 515s - Layer 1 (37 bytes) = TLS {Contents=[..37..] Payload=[] ChangeCipherSpec=[] Handshake=[] AppData=[] Alert=[{ContentType=Alert Version=TLS 1.2 Length=32 Level=Unknown(255) Description=Unknown EncryptedMsg=[..32..]}]} 515s 515s --- PASS: TestSerializeTLSAlertEncrypted (0.00s) 515s === RUN TestUDPPacketDNS 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 230 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 210 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 202 bytes 515s base_test.go:21: Got layer DNS, 202 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 244 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..230..] SrcMAC=00:1f:ca:b3:75:c0 DstMAC=24:be:05:27:0b:17 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..210..] Version=4 IHL=5 TOS=0 Length=230 Id=26831 Flags= FragOffset=0 TTL=63 Protocol=UDP Checksum=42745 SrcIP=172.16.255.1 DstIP=172.29.20.15 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..202..] SrcPort=53(domain) DstPort=35181 Length=210 Checksum=30026} 515s - Layer 4 (202 bytes) = DNS {Contents=[..202..] Payload=[] ID=47320 QR=true OpCode=Query AA=false TC=false RD=true RA=true Z=0 ResponseCode=No Error QDCount=1 ANCount=7 NSCount=0 ARCount=0 Questions=[{Name=[..8..] Type=MX Class=IN}] Answers=[..7..] Authorities=[] Additionals=[]} 515s 515s --- PASS: TestUDPPacketDNS (0.00s) 515s === RUN TestDNSQueryA 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 60 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 40 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 32 bytes 515s base_test.go:21: Got layer DNS, 32 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 74 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..60..] SrcMAC=52:54:00:bd:1c:70 DstMAC=fe:54:00:3e:00:96 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..40..] Version=4 IHL=5 TOS=0 Length=60 Id=8928 Flags= FragOffset=0 TTL=64 Protocol=UDP Checksum=57912 SrcIP=192.168.122.70 DstIP=192.168.122.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..32..] SrcPort=49973 DstPort=53(domain) Length=40 Checksum=30162} 515s - Layer 4 (32 bytes) = DNS {Contents=[..32..] Payload=[] ID=21057 QR=false OpCode=Query AA=false TC=false RD=true RA=false Z=0 ResponseCode=No Error QDCount=1 ANCount=0 NSCount=0 ARCount=0 Questions=[{Name=[..14..] Type=A Class=IN}] Answers=[] Authorities=[] Additionals=[]} 515s 515s --- PASS: TestDNSQueryA (0.00s) 515s === RUN TestDNSRRA 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 292 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 272 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 264 bytes 515s base_test.go:21: Got layer DNS, 264 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 306 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..292..] SrcMAC=fe:54:00:3e:00:96 DstMAC=52:54:00:bd:1c:70 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..272..] Version=4 IHL=5 TOS=0 Length=292 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=50224 SrcIP=192.168.122.1 DstIP=192.168.122.70 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..264..] SrcPort=53(domain) DstPort=49973 Length=272 Checksum=30394} 515s - Layer 4 (264 bytes) = DNS {Contents=[..264..] Payload=[] ID=21057 QR=true OpCode=Query AA=false TC=false RD=true RA=true Z=0 ResponseCode=No Error QDCount=1 ANCount=6 NSCount=4 ARCount=4 Questions=[{Name=[..14..] Type=A Class=IN}] Answers=[..6..] Authorities=[{Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}] Additionals=[{Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 32, 10] IP=216.239.32.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 34, 10] IP=216.239.34.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 36, 10] IP=216.239.36.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 38, 10] IP=216.239.38.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestDNSRRA (0.00s) 515s === RUN TestDNSAAAA 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 224 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 204 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 196 bytes 515s base_test.go:21: Got layer DNS, 196 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 238 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..224..] SrcMAC=fe:54:00:3e:00:96 DstMAC=52:54:00:bd:1c:70 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..204..] Version=4 IHL=5 TOS=0 Length=224 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=50292 SrcIP=192.168.122.1 DstIP=192.168.122.70 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..196..] SrcPort=53(domain) DstPort=56083 Length=204 Checksum=30326} 515s - Layer 4 (196 bytes) = DNS {Contents=[..196..] Payload=[] ID=62211 QR=true OpCode=Query AA=false TC=false RD=true RA=true Z=0 ResponseCode=No Error QDCount=1 ANCount=1 NSCount=4 ARCount=4 Questions=[{Name=[..14..] Type=AAAA Class=IN}] Answers=[{Name=[..14..] Type=AAAA Class=IN TTL=300 DataLength=16 Data=[..16..] IP=2a00:1450:400c:c01::69 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}] Authorities=[{Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..10..] Type=NS Class=IN TTL=172800 DataLength=6 Data=[..6..] IP= NS=[..14..] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}] Additionals=[{Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 32, 10] IP=216.239.32.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 34, 10] IP=216.239.34.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 36, 10] IP=216.239.36.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}, {Name=[..14..] Type=A Class=IN TTL=172800 DataLength=4 Data=[216, 239, 38, 10] IP=216.239.38.10 NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[] RName=[] Serial=0 Refresh=0 Retry=0 Expire=0 Minimum=0} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}]} 515s 515s --- PASS: TestDNSAAAA (0.00s) 515s === RUN TestDNSMXSOA 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 110 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 90 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 82 bytes 515s base_test.go:21: Got layer DNS, 82 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 124 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..110..] SrcMAC=fe:54:00:3e:00:96 DstMAC=52:54:00:bd:1c:70 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..90..] Version=4 IHL=5 TOS=0 Length=110 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=50406 SrcIP=192.168.122.1 DstIP=192.168.122.70 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..82..] SrcPort=53(domain) DstPort=40032 Length=90 Checksum=30212} 515s - Layer 4 (82 bytes) = DNS {Contents=[..82..] Payload=[] ID=64634 QR=true OpCode=Query AA=false TC=false RD=true RA=true Z=0 ResponseCode=No Error QDCount=1 ANCount=0 NSCount=1 ARCount=0 Questions=[{Name=[..14..] Type=MX Class=IN}] Answers=[] Authorities=[{Name=[..10..] Type=SOA Class=IN TTL=60 DataLength=38 Data=[..38..] IP= NS=[] CNAME=[] PTR=[] TXTs=[] SOA={ MName=[..14..] RName=[..20..] Serial=1548132 Refresh=7200 Retry=1800 Expire=1209600 Minimum=300} SRV={ Priority=0 Weight=0 Port=0 Name=[]} MX={ Preference=0 Name=[]} OPT=[] URI={ Priority=0 Weight=0 Target=[]} TXT=[]}] Additionals=[]} 515s 515s --- PASS: TestDNSMXSOA (0.00s) 515s === RUN TestDNSDoesNotMalloc 515s --- PASS: TestDNSDoesNotMalloc (0.00s) 515s === RUN TestPacketUSB0 515s base_test.go:19: Checking packet layers, want [USB USBInterrupt] 515s base_test.go:21: Got layer USB, 40 bytes, payload of 1 bytes 515s base_test.go:21: Got layer USBInterrupt, 1 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 65 bytes 515s - Layer 1 (40 bytes) = USB {Contents=[..40..] Payload=[4] ID=18446612133308938240 EventType=COMPLETE TransferType=Interrupt Direction=In EndpointNumber=1 DeviceAddress=1 BusID=2 TimestampSec=1348195264 TimestampUsec=689546 Setup=false Data=true Status=0 UrbLength=1 UrbDataLength=1 UrbInterval=0 UrbStartFrame=0 UrbCopyOfTransferFlags=0 IsoNumDesc=0} 515s - Layer 2 (01 bytes) = USBInterrupt {Contents=[4] Payload=[]} 515s 515s --- PASS: TestPacketUSB0 (0.00s) 515s === RUN TestVRRPPacketPacket0 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 VRRP] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 20 bytes 515s base_test.go:21: Got layer VRRP, 20 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 60 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..46..] SrcMAC=00:00:5e:00:01:01 DstMAC=01:00:5e:00:00:12 EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..20..] Version=4 IHL=5 TOS=192 Length=40 Id=0 Flags= FragOffset=0 TTL=255 Protocol=VRRP Checksum=6605 SrcIP=192.168.0.30 DstIP=224.0.0.18 Options=[] Padding=[]} 515s - Layer 3 (20 bytes) = VRRP {Contents=[..20..] Payload=[] Version=2 Type=VRRPv2 Advertisement VirtualRtrID=1 Priority=100 CountIPAddr=1 AuthType=No Authentication AdverInt=1 Checksum=47698 IPAddress=[192.168.0.1]} 515s 515s --- PASS: TestVRRPPacketPacket0 (0.00s) 515s === RUN TestPacketVXLAN 515s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP VXLAN Ethernet IPv4 ICMPv4 Payload] 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 134 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 114 bytes 515s base_test.go:21: Got layer UDP, 8 bytes, payload of 106 bytes 515s base_test.go:21: Got layer VXLAN, 8 bytes, payload of 98 bytes 515s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 515s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 515s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 515s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 515s base_test.go:24: PACKET: 148 bytes 515s - Layer 1 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..134..] SrcMAC=36:dc:85:1e:b3:40 DstMAC=00:16:3e:08:71:cf EthernetType=IPv4 Length=0} 515s - Layer 2 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..114..] Version=4 IHL=5 TOS=0 Length=134 Id=53952 Flags=DF FragOffset=0 TTL=64 Protocol=UDP Checksum=20818 SrcIP=192.168.203.1 DstIP=192.168.202.1 Options=[] Padding=[]} 515s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..106..] SrcPort=45149 DstPort=4789(vxlan) Length=114 Checksum=0} 515s - Layer 4 (08 bytes) = VXLAN {Contents=[..8..] Payload=[..98..] ValidIDFlag=true VNI=255 GBPExtension=false GBPDontLearn=false GBPApplied=false GBPGroupPolicyID=0} 515s - Layer 5 (14 bytes) = Ethernet {Contents=[..14..] Payload=[..84..] SrcMAC=00:16:3e:37:f6:04 DstMAC=00:30:88:01:00:02 EthernetType=IPv4 Length=0} 515s - Layer 6 (20 bytes) = IPv4 {Contents=[..20..] Payload=[..64..] Version=4 IHL=5 TOS=0 Length=84 Id=0 Flags=DF FragOffset=0 TTL=64 Protocol=ICMPv4 Checksum=9039 SrcIP=192.168.203.3 DstIP=192.168.203.5 Options=[] Padding=[]} 515s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=63218 Id=1292 Seq=1} 515s - Layer 8 (56 bytes) = Payload 56 byte(s) 515s 515s --- PASS: TestPacketVXLAN (0.00s) 515s === RUN TestIsomorphicPacketVXLAN 515s --- PASS: TestIsomorphicPacketVXLAN (0.00s) 515s PASS 515s ok github.com/google/gopacket/layers 0.117s 518s testing: warning: no tests to run 518s PASS 518s ok github.com/google/gopacket/macs 0.009s [no tests to run] 521s === RUN TestPcapNonexistentFile 521s pcap_test.go:26: Error returned for nonexistent file: /path/to/nonexistent/file: No such file or directory 521s --- PASS: TestPcapNonexistentFile (0.00s) 521s === RUN TestPcapFileRead 521s pcap_test.go:86: 521s 521s 521s 521s Processing file test_loopback.pcap 521s 521s 521s 521s pcap_test.go:110: -- FULL PACKET DATA (560 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 00 00 00 02 04 06 40 00 00 00 00 |....`......@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 e5 af 1f 90 |................| 521s 00000030 08 97 16 66 0a 65 66 ef 80 18 28 e9 02 0c 00 00 |...f.ef...(.....| 521s 00000040 01 01 08 0a 05 c0 8c fc 05 c0 38 8c 47 45 54 20 |..........8.GET | 521s 00000050 2f 70 6b 67 2f 67 69 74 68 75 62 2e 63 6f 6d 2f |/pkg/github.com/| 521s 00000060 67 63 6f 6e 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 |gconnell/gopacke| 521s 00000070 74 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 |t/ HTTP/1.1..Hos| 521s 00000080 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 38 30 38 |t: localhost:808| 521s 00000090 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b |0..Connection: k| 521s 000000a0 65 65 70 2d 61 6c 69 76 65 0d 0a 43 61 63 68 65 |eep-alive..Cache| 521s 000000b0 2d 43 6f 6e 74 72 6f 6c 3a 20 6d 61 78 2d 61 67 |-Control: max-ag| 521s 000000c0 65 3d 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a |e=0..User-Agent:| 521s 000000d0 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 4d 61 | Mozilla/5.0 (Ma| 521s 000000e0 63 69 6e 74 6f 73 68 3b 20 49 6e 74 65 6c 20 4d |cintosh; Intel M| 521s 000000f0 61 63 20 4f 53 20 58 20 31 30 5f 38 5f 32 29 20 |ac OS X 10_8_2) | 521s 00000100 41 70 70 6c 65 57 65 62 4b 69 74 2f 35 33 37 2e |AppleWebKit/537.| 521s 00000110 31 31 20 28 4b 48 54 4d 4c 2c 20 6c 69 6b 65 20 |11 (KHTML, like | 521s 00000120 47 65 63 6b 6f 29 20 43 68 72 6f 6d 65 2f 32 33 |Gecko) Chrome/23| 521s 00000130 2e 30 2e 31 32 37 31 2e 31 30 31 20 53 61 66 61 |.0.1271.101 Safa| 521s 00000140 72 69 2f 35 33 37 2e 31 31 0d 0a 41 63 63 65 70 |ri/537.11..Accep| 521s 00000150 74 3a 20 74 65 78 74 2f 68 74 6d 6c 2c 61 70 70 |t: text/html,app| 521s 00000160 6c 69 63 61 74 69 6f 6e 2f 78 68 74 6d 6c 2b 78 |lication/xhtml+x| 521s 00000170 6d 6c 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 |ml,application/x| 521s 00000180 6d 6c 3b 71 3d 30 2e 39 2c 2a 2f 2a 3b 71 3d 30 |ml;q=0.9,*/*;q=0| 521s 00000190 2e 38 0d 0a 52 65 66 65 72 65 72 3a 20 68 74 74 |.8..Referer: htt| 521s 000001a0 70 3a 2f 2f 6c 6f 63 61 6c 68 6f 73 74 3a 38 30 |p://localhost:80| 521s 000001b0 38 30 2f 70 6b 67 2f 0d 0a 41 63 63 65 70 74 2d |80/pkg/..Accept-| 521s 000001c0 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 2c 64 |Encoding: gzip,d| 521s 000001d0 65 66 6c 61 74 65 2c 73 64 63 68 0d 0a 41 63 63 |eflate,sdch..Acc| 521s 000001e0 65 70 74 2d 4c 61 6e 67 75 61 67 65 3a 20 65 6e |ept-Language: en| 521s 000001f0 2d 55 53 2c 65 6e 3b 71 3d 30 2e 38 0d 0a 41 63 |-US,en;q=0.8..Ac| 521s 00000200 63 65 70 74 2d 43 68 61 72 73 65 74 3a 20 49 53 |cept-Charset: IS| 521s 00000210 4f 2d 38 38 35 39 2d 31 2c 75 74 66 2d 38 3b 71 |O-8859-1,utf-8;q| 521s 00000220 3d 30 2e 37 2c 2a 3b 71 3d 30 2e 33 0d 0a 0d 0a |=0.7,*;q=0.3....| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..556..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..516..] Version=6 TrafficClass=0 FlowLabel=0 Length=516 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 00 00 00 02 04 06 40 00 00 00 00 00 00 00 00 |`......@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[..484..] SrcPort=58799 DstPort=8080(http-alt) Seq=144119398 Ack=174417647 DataOffset=8 FIN=false SYN=false RST=false PSH=true ACK=true URG=false ECE=false CWR=false NS=false Window=10473 Checksum=524 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505084/96483468 0x05c08cfc05c0388c)] Padding=[]} 521s 00000000 e5 af 1f 90 08 97 16 66 0a 65 66 ef 80 18 28 e9 |.......f.ef...(.| 521s 00000010 02 0c 00 00 01 01 08 0a 05 c0 8c fc 05 c0 38 8c |..............8.| 521s --- Layer 4 --- 521s Payload 484 byte(s) 521s 00000000 47 45 54 20 2f 70 6b 67 2f 67 69 74 68 75 62 2e |GET /pkg/github.| 521s 00000010 63 6f 6d 2f 67 63 6f 6e 6e 65 6c 6c 2f 67 6f 70 |com/gconnell/gop| 521s 00000020 61 63 6b 65 74 2f 20 48 54 54 50 2f 31 2e 31 0d |acket/ HTTP/1.1.| 521s 00000030 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 |.Host: localhost| 521s 00000040 3a 38 30 38 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f |:8080..Connectio| 521s 00000050 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 43 |n: keep-alive..C| 521s 00000060 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6d 61 |ache-Control: ma| 521s 00000070 78 2d 61 67 65 3d 30 0d 0a 55 73 65 72 2d 41 67 |x-age=0..User-Ag| 521s 00000080 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 |ent: Mozilla/5.0| 521s 00000090 20 28 4d 61 63 69 6e 74 6f 73 68 3b 20 49 6e 74 | (Macintosh; Int| 521s 000000a0 65 6c 20 4d 61 63 20 4f 53 20 58 20 31 30 5f 38 |el Mac OS X 10_8| 521s 000000b0 5f 32 29 20 41 70 70 6c 65 57 65 62 4b 69 74 2f |_2) AppleWebKit/| 521s 000000c0 35 33 37 2e 31 31 20 28 4b 48 54 4d 4c 2c 20 6c |537.11 (KHTML, l| 521s 000000d0 69 6b 65 20 47 65 63 6b 6f 29 20 43 68 72 6f 6d |ike Gecko) Chrom| 521s 000000e0 65 2f 32 33 2e 30 2e 31 32 37 31 2e 31 30 31 20 |e/23.0.1271.101 | 521s 000000f0 53 61 66 61 72 69 2f 35 33 37 2e 31 31 0d 0a 41 |Safari/537.11..A| 521s 00000100 63 63 65 70 74 3a 20 74 65 78 74 2f 68 74 6d 6c |ccept: text/html| 521s 00000110 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 68 74 |,application/xht| 521s 00000120 6d 6c 2b 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69 |ml+xml,applicati| 521s 00000130 6f 6e 2f 78 6d 6c 3b 71 3d 30 2e 39 2c 2a 2f 2a |on/xml;q=0.9,*/*| 521s 00000140 3b 71 3d 30 2e 38 0d 0a 52 65 66 65 72 65 72 3a |;q=0.8..Referer:| 521s 00000150 20 68 74 74 70 3a 2f 2f 6c 6f 63 61 6c 68 6f 73 | http://localhos| 521s 00000160 74 3a 38 30 38 30 2f 70 6b 67 2f 0d 0a 41 63 63 |t:8080/pkg/..Acc| 521s 00000170 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a |ept-Encoding: gz| 521s 00000180 69 70 2c 64 65 66 6c 61 74 65 2c 73 64 63 68 0d |ip,deflate,sdch.| 521s 00000190 0a 41 63 63 65 70 74 2d 4c 61 6e 67 75 61 67 65 |.Accept-Language| 521s 000001a0 3a 20 65 6e 2d 55 53 2c 65 6e 3b 71 3d 30 2e 38 |: en-US,en;q=0.8| 521s 000001b0 0d 0a 41 63 63 65 70 74 2d 43 68 61 72 73 65 74 |..Accept-Charset| 521s 000001c0 3a 20 49 53 4f 2d 38 38 35 39 2d 31 2c 75 74 66 |: ISO-8859-1,utf| 521s 000001d0 2d 38 3b 71 3d 30 2e 37 2c 2a 3b 71 3d 30 2e 33 |-8;q=0.7,*;q=0.3| 521s 000001e0 0d 0a 0d 0a |....| 521s 521s pcap_test.go:110: -- FULL PACKET DATA (76 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 01 88 91 00 20 06 40 00 00 00 00 |....`.... .@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 521s 00000030 0a 65 66 ef 08 97 18 4a 80 10 23 02 00 28 00 00 |.ef....J..#..(..| 521s 00000040 01 01 08 0a 05 c0 8c fc 05 c0 8c fc |............| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..72..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..32..] Version=6 TrafficClass=0 FlowLabel=100497 Length=32 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 01 88 91 00 20 06 40 00 00 00 00 00 00 00 00 |`.... .@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[] SrcPort=8080(http-alt) DstPort=58799 Seq=174417647 Ack=144119882 DataOffset=8 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=8962 Checksum=40 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505084/96505084 0x05c08cfc05c08cfc)] Padding=[]} 521s 00000000 1f 90 e5 af 0a 65 66 ef 08 97 18 4a 80 10 23 02 |.....ef....J..#.| 521s 00000010 00 28 00 00 01 01 08 0a 05 c0 8c fc 05 c0 8c fc |.(..............| 521s 521s pcap_test.go:110: -- FULL PACKET DATA (4172 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 01 88 91 10 20 06 40 00 00 00 00 |....`.... .@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 521s 00000030 0a 65 66 ef 08 97 18 4a 80 18 23 02 10 28 00 00 |.ef....J..#..(..| 521s 00000040 01 01 08 0a 05 c0 8d b6 05 c0 8c fc 48 54 54 50 |............HTTP| 521s 00000050 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 44 61 74 |/1.1 200 OK..Dat| 521s 00000060 65 3a 20 53 75 6e 2c 20 30 36 20 4a 61 6e 20 32 |e: Sun, 06 Jan 2| 521s 00000070 30 31 33 20 31 37 3a 32 32 3a 33 32 20 47 4d 54 |013 17:22:32 GMT| 521s 00000080 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 |..Transfer-Encod| 521s 00000090 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 43 6f |ing: chunked..Co| 521s 000000a0 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 |ntent-Type: text| 521s 000000b0 2f 68 74 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 |/html; charset=u| 521s 000000c0 74 66 2d 38 0d 0a 0d 0a 32 30 30 0d 0a 3c 21 44 |tf-8....200.......| 521s 00000130 20 20 3c 74 69 74 6c 65 3e 67 6f 70 61 63 6b 65 | gopacke| 521s 00000140 74 20 2d 20 54 68 65 20 47 6f 20 50 72 6f 67 72 |t - The Go Progr| 521s 00000150 61 6d 6d 69 6e 67 20 4c 61 6e 67 75 61 67 65 3c |amming Language<| 521s 00000160 2f 74 69 74 6c 65 3e 0a 0a 3c 6c 69 6e 6b 20 74 |/title>..<link t| 521s 00000170 79 70 65 3d 22 74 65 78 74 2f 63 73 73 22 20 72 |ype="text/css" r| 521s 00000180 65 6c 3d 22 73 74 79 6c 65 73 68 65 65 74 22 20 |el="stylesheet" | 521s 00000190 68 72 65 66 3d 22 2f 64 6f 63 2f 73 74 79 6c 65 |href="/doc/style| 521s 000001a0 2e 63 73 73 22 3e 0a 3c 73 63 72 69 70 74 20 74 |.css">.<script t| 521s 000001b0 79 70 65 3d 22 74 65 78 74 2f 6a 61 76 61 73 63 |ype="text/javasc| 521s 000001c0 72 69 70 74 22 20 73 72 63 3d 22 2f 64 6f 63 2f |ript" src="/doc/| 521s 000001d0 67 6f 64 6f 63 73 2e 6a 73 22 3e 3c 2f 73 63 72 |godocs.js"></scr| 521s 000001e0 69 70 74 3e 0a 0a 3c 2f 68 65 61 64 3e 0a 3c 62 |ipt>..</head>.<b| 521s 000001f0 6f 64 79 3e 0a 0a 3c 64 69 76 20 69 64 3d 22 74 |ody>..<div id="t| 521s 00000200 6f 70 62 61 72 22 3e 3c 64 69 76 20 63 6c 61 73 |opbar"><div clas| 521s 00000210 73 3d 22 63 6f 6e 74 61 69 6e 65 72 20 77 69 64 |s="container wid| 521s 00000220 65 22 3e 0a 0a 3c 66 6f 72 6d 20 6d 65 74 68 6f |e">..<form metho| 521s 00000230 64 3d 22 47 45 54 22 20 61 63 74 69 6f 6e 3d 22 |d="GET" action="| 521s 00000240 2f 73 65 61 72 63 68 22 3e 0a 3c 64 69 76 20 69 |/search">.<div i| 521s 00000250 64 3d 22 6d 65 6e 75 22 3e 0a 3c 61 20 68 72 65 |d="menu">.<a hre| 521s 00000260 66 3d 22 2f 64 6f 63 2f 22 3e 44 6f 63 75 6d 65 |f="/doc/">Docume| 521s 00000270 6e 74 73 3c 2f 61 3e 0a 3c 61 20 68 72 65 66 3d |nts</a>.<a href=| 521s 00000280 22 2f 72 65 66 2f 22 3e 52 65 66 65 72 65 6e 63 |"/ref/">Referenc| 521s 00000290 65 73 3c 2f 61 3e 0a 3c 61 20 68 72 65 66 3d 22 |es</a>.<a href="| 521s 000002a0 2f 70 6b 67 2f 22 3e 50 61 63 6b 61 67 65 73 3c |/pkg/">Packages<| 521s 000002b0 2f 61 3e 0a 3c 61 20 68 72 65 66 3d 22 2f 70 72 |/a>.<a href="/pr| 521s 000002c0 6f 6a 65 63 74 2f 22 3e 54 68 65 20 50 0d 0a 64 |oject/">The P..d| 521s 000002d0 65 0d 0a 72 6f 6a 65 63 74 3c 2f 61 3e 0a 3c 61 |e..roject</a>.<a| 521s 000002e0 20 68 72 65 66 3d 22 2f 68 65 6c 70 2f 22 3e 48 | href="/help/">H| 521s 000002f0 65 6c 70 3c 2f 61 3e 0a 3c 69 6e 70 75 74 20 74 |elp</a>.<input t| 521s 00000300 79 70 65 3d 22 74 65 78 74 22 20 69 64 3d 22 73 |ype="text" id="s| 521s 00000310 65 61 72 63 68 22 20 6e 61 6d 65 3d 22 71 22 20 |earch" name="q" | 521s 00000320 63 6c 61 73 73 3d 22 69 6e 61 63 74 69 76 65 22 |class="inactive"| 521s 00000330 20 76 61 6c 75 65 3d 22 53 65 61 72 63 68 22 3e | value="Search">| 521s 00000340 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d |.</div>.<div id=| 521s 00000350 22 68 65 61 64 69 6e 67 22 3e 3c 61 20 68 72 65 |"heading"><a hre| 521s 00000360 66 3d 22 2f 22 3e 54 68 65 20 47 6f 20 50 72 6f |f="/">The Go Pro| 521s 00000370 67 72 61 6d 6d 69 6e 67 20 4c 61 6e 67 75 61 67 |gramming Languag| 521s 00000380 65 3c 2f 61 3e 3c 2f 64 69 76 3e 0a 3c 2f 66 6f |e</a></div>.</fo| 521s 00000390 72 6d 3e 0a 0a 3c 2f 64 69 76 3e 3c 2f 64 69 76 |rm>..</div></div| 521s 000003a0 3e 0a 0a 3c 64 69 76 20 69 64 3d 22 70 61 67 65 |>..<div id="page| 521s 000003b0 22 0d 0a 64 0d 0a 20 63 6c 61 73 73 3d 22 77 69 |"..d.. class="wi| 521s 000003c0 64 65 22 0d 0a 33 0d 0a 3e 0a 0a 0d 0a 35 38 0d |de"..3..>....58.| 521s 000003d0 0a 0a 20 20 3c 64 69 76 20 69 64 3d 22 70 6c 75 |.. <div id="plu| 521s 000003e0 73 6f 6e 65 22 3e 3c 67 3a 70 6c 75 73 6f 6e 65 |sone"><g:plusone| 521s 000003f0 20 73 69 7a 65 3d 22 73 6d 61 6c 6c 22 20 61 6e | size="small" an| 521s 00000400 6e 6f 74 61 74 69 6f 6e 3d 22 6e 6f 6e 65 22 3e |notation="none">| 521s 00000410 3c 2f 67 3a 70 6c 75 73 6f 6e 65 3e 3c 2f 64 69 |</g:plusone></di| 521s 00000420 76 3e 0a 20 20 3c 68 31 3e 0d 0a 31 30 0d 0a 50 |v>. <h1>..10..P| 521s 00000430 61 63 6b 61 67 65 20 67 6f 70 61 63 6b 65 74 0d |ackage gopacket.| 521s 00000440 0a 36 0d 0a 3c 2f 68 31 3e 0a 0d 0a 31 0d 0a 0a |.6..</h1>...1...| 521s 00000450 0d 0a 32 0d 0a 0a 0a 0d 0a 31 37 0d 0a 0a 3c 64 |..2......17...<d| 521s 00000460 69 76 20 69 64 3d 22 6e 61 76 22 3e 3c 2f 64 69 |iv id="nav"></di| 521s 00000470 76 3e 0a 0a 0d 0a 31 0d 0a 0a 0d 0a 63 65 39 34 |v>....1.....ce94| 521s 00000480 0d 0a 3c 21 2d 2d 0a 09 43 6f 70 79 72 69 67 68 |..<!--..Copyrigh| 521s 00000490 74 20 32 30 30 39 20 54 68 65 20 47 6f 20 41 75 |t 2009 The Go Au| 521s 000004a0 74 68 6f 72 73 2e 20 41 6c 6c 20 72 69 67 68 74 |thors. All right| 521s 000004b0 73 20 72 65 73 65 72 76 65 64 2e 0a 09 55 73 65 |s reserved...Use| 521s 000004c0 20 6f 66 20 74 68 69 73 20 73 6f 75 72 63 65 20 | of this source | 521s 000004d0 63 6f 64 65 20 69 73 20 67 6f 76 65 72 6e 65 64 |code is governed| 521s 000004e0 20 62 79 20 61 20 42 53 44 2d 73 74 79 6c 65 0a | by a BSD-style.| 521s 000004f0 09 6c 69 63 65 6e 73 65 20 74 68 61 74 20 63 61 |.license that ca| 521s 00000500 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 |n be found in th| 521s 00000510 65 20 4c 49 43 45 4e 53 45 20 66 69 6c 65 2e 0a |e LICENSE file..| 521s 00000520 2d 2d 3e 0a 3c 21 2d 2d 0a 09 4e 6f 74 65 3a 20 |-->.<!--..Note: | 521s 00000530 53 74 61 74 69 63 20 28 69 2e 65 2e 2c 20 6e 6f |Static (i.e., no| 521s 00000540 74 20 74 65 6d 70 6c 61 74 65 2d 67 65 6e 65 72 |t template-gener| 521s 00000550 61 74 65 64 29 20 68 72 65 66 20 61 6e 64 20 69 |ated) href and i| 521s 00000560 64 0a 09 61 74 74 72 69 62 75 74 65 73 20 73 74 |d..attributes st| 521s 00000570 61 72 74 20 77 69 74 68 20 22 70 6b 67 2d 22 20 |art with "pkg-" | 521s 00000580 74 6f 20 6d 61 6b 65 20 69 74 20 69 6d 70 6f 73 |to make it impos| 521s 00000590 73 69 62 6c 65 20 66 6f 72 0a 09 74 68 65 6d 20 |sible for..them | 521s 000005a0 74 6f 20 63 6f 6e 66 6c 69 63 74 20 77 69 74 68 |to conflict with| 521s 000005b0 20 67 65 6e 65 72 61 74 65 64 20 61 74 74 72 69 | generated attri| 521s 000005c0 62 75 74 65 73 20 28 73 6f 6d 65 20 6f 66 20 77 |butes (some of w| 521s 000005d0 68 69 63 68 0a 09 63 6f 72 72 65 73 70 6f 6e 64 |hich..correspond| 521s 000005e0 20 74 6f 20 47 6f 20 69 64 65 6e 74 69 66 69 65 | to Go identifie| 521s 000005f0 72 73 29 2e 0a 2d 2d 3e 0a 0a 09 0a 09 09 3c 64 |rs)..-->......<d| 521s 00000600 69 76 20 69 64 3d 22 73 68 6f 72 74 2d 6e 61 76 |iv id="short-nav| 521s 00000610 22 3e 0a 09 09 09 3c 64 6c 3e 0a 09 09 09 3c 64 |">....<dl>....<d| 521s 00000620 64 3e 3c 63 6f 64 65 3e 69 6d 70 6f 72 74 20 22 |d><code>import "| 521s 00000630 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e 6e |github.com/gconn| 521s 00000640 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 22 3c 2f 63 |ell/gopacket"</c| 521s 00000650 6f 64 65 3e 3c 2f 64 64 3e 0a 09 09 09 3c 2f 64 |ode></dd>....</d| 521s 00000660 6c 3e 0a 09 09 09 3c 64 6c 3e 0a 09 09 09 3c 64 |l>....<dl>....<d| 521s 00000670 64 3e 3c 61 20 68 72 65 66 3d 22 23 70 6b 67 2d |d><a href="#pkg-| 521s 00000680 6f 76 65 72 76 69 65 77 22 20 63 6c 61 73 73 3d |overview" class=| 521s 00000690 22 6f 76 65 72 76 69 65 77 4c 69 6e 6b 22 3e 4f |"overviewLink">O| 521s 000006a0 76 65 72 76 69 65 77 3c 2f 61 3e 3c 2f 64 64 3e |verview</a></dd>| 521s 000006b0 0a 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d |....<dd><a href=| 521s 000006c0 22 23 70 6b 67 2d 69 6e 64 65 78 22 3e 49 6e 64 |"#pkg-index">Ind| 521s 000006d0 65 78 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 0a |ex</a></dd>.....| 521s 000006e0 09 09 09 0a 09 09 09 0a 09 09 09 09 3c 64 64 3e |............<dd>| 521s 000006f0 3c 61 20 68 72 65 66 3d 22 23 70 6b 67 2d 73 75 |<a href="#pkg-su| 521s 00000700 62 64 69 72 65 63 74 6f 72 69 65 73 22 3e 53 75 |bdirectories">Su| 521s 00000710 62 64 69 72 65 63 74 6f 72 69 65 73 3c 2f 61 3e |bdirectories</a>| 521s 00000720 3c 2f 64 64 3e 0a 09 09 09 0a 09 09 09 3c 2f 64 |</dd>........</d| 521s 00000730 6c 3e 0a 09 09 3c 2f 64 69 76 3e 0a 09 09 3c 21 |l>...</div>...<!| 521s 00000740 2d 2d 20 54 68 65 20 70 61 63 6b 61 67 65 27 73 |-- The package's| 521s 00000750 20 4e 61 6d 65 20 69 73 20 70 72 69 6e 74 65 64 | Name is printed| 521s 00000760 20 61 73 20 74 69 74 6c 65 20 62 79 20 74 68 65 | as title by the| 521s 00000770 20 74 6f 70 2d 6c 65 76 65 6c 20 74 65 6d 70 6c | top-level templ| 521s 00000780 61 74 65 20 2d 2d 3e 0a 09 09 3c 64 69 76 20 69 |ate -->...<div i| 521s 00000790 64 3d 22 70 6b 67 2d 6f 76 65 72 76 69 65 77 22 |d="pkg-overview"| 521s 000007a0 20 63 6c 61 73 73 3d 22 74 6f 67 67 6c 65 56 69 | class="toggleVi| 521s 000007b0 73 69 62 6c 65 22 3e 0a 09 09 09 3c 64 69 76 20 |sible">....<div | 521s 000007c0 63 6c 61 73 73 3d 22 63 6f 6c 6c 61 70 73 65 64 |class="collapsed| 521s 000007d0 22 3e 0a 09 09 09 09 3c 68 32 20 63 6c 61 73 73 |">.....<h2 class| 521s 000007e0 3d 22 74 6f 67 67 6c 65 42 75 74 74 6f 6e 22 20 |="toggleButton" | 521s 000007f0 74 69 74 6c 65 3d 22 43 6c 69 63 6b 20 74 6f 20 |title="Click to | 521s 00000800 73 68 6f 77 20 4f 76 65 72 76 69 65 77 20 73 65 |show Overview se| 521s 00000810 63 74 69 6f 6e 22 3e 4f 76 65 72 76 69 65 77 20 |ction">Overview | 521s 00000820 e2 96 b9 3c 2f 68 32 3e 0a 09 09 09 3c 2f 64 69 |...</h2>....</di| 521s 00000830 76 3e 0a 09 09 09 3c 64 69 76 20 63 6c 61 73 73 |v>....<div class| 521s 00000840 3d 22 65 78 70 61 6e 64 65 64 22 3e 0a 09 09 09 |="expanded">....| 521s 00000850 09 3c 68 32 20 63 6c 61 73 73 3d 22 74 6f 67 67 |.<h2 class="togg| 521s 00000860 6c 65 42 75 74 74 6f 6e 22 20 74 69 74 6c 65 3d |leButton" title=| 521s 00000870 22 43 6c 69 63 6b 20 74 6f 20 68 69 64 65 20 4f |"Click to hide O| 521s 00000880 76 65 72 76 69 65 77 20 73 65 63 74 69 6f 6e 22 |verview section"| 521s 00000890 3e 4f 76 65 72 76 69 65 77 20 e2 96 be 3c 2f 68 |>Overview ...</h| 521s 000008a0 32 3e 0a 09 09 09 09 3c 70 3e 0a 50 61 63 6b 61 |2>.....<p>.Packa| 521s 000008b0 67 65 20 67 6f 70 61 63 6b 65 74 20 70 72 6f 76 |ge gopacket prov| 521s 000008c0 69 64 65 73 20 70 61 63 6b 65 74 20 64 65 63 6f |ides packet deco| 521s 000008d0 64 69 6e 67 20 66 6f 72 20 74 68 65 20 47 6f 20 |ding for the Go | 521s 000008e0 6c 61 6e 67 75 61 67 65 2e 0a 3c 2f 70 3e 0a 3c |language..</p>.<| 521s 000008f0 70 3e 0a 67 6f 70 61 63 6b 65 74 20 63 6f 6e 74 |p>.gopacket cont| 521s 00000900 61 69 6e 73 20 33 20 73 75 62 2d 70 61 63 6b 61 |ains 3 sub-packa| 521s 00000910 67 65 73 20 77 69 74 68 20 61 64 64 69 74 69 6f |ges with additio| 521s 00000920 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 |nal functionalit| 521s 00000930 79 20 79 6f 75 20 6d 61 79 20 66 69 6e 64 0a 75 |y you may find.u| 521s 00000940 73 65 66 75 6c 3a 0a 3c 2f 70 3e 0a 3c 70 72 65 |seful:.</p>.<pre| 521s 00000950 3e 2a 20 6c 61 79 65 72 73 3a 20 59 6f 75 26 23 |>* layers: You&#| 521s 00000960 33 39 3b 6c 6c 20 70 72 6f 62 61 62 6c 79 20 75 |39;ll probably u| 521s 00000970 73 65 20 74 68 69 73 20 65 76 65 72 79 20 74 69 |se this every ti| 521s 00000980 6d 65 2e 20 20 54 68 69 73 20 63 6f 6e 74 61 69 |me. This contai| 521s 00000990 6e 73 20 6f 66 20 74 68 65 20 6c 6f 67 69 63 0a |ns of the logic.| 521s 000009a0 20 20 20 20 62 75 69 6c 74 20 69 6e 74 6f 20 67 | built into g| 521s 000009b0 6f 70 61 63 6b 65 74 20 66 6f 72 20 64 65 63 6f |opacket for deco| 521s 000009c0 64 69 6e 67 20 70 61 63 6b 65 74 20 70 72 6f 74 |ding packet prot| 521s 000009d0 6f 63 6f 6c 73 2e 20 20 4e 6f 74 65 20 74 68 61 |ocols. Note tha| 521s 000009e0 74 20 61 6c 6c 20 65 78 61 6d 70 6c 65 0a 20 20 |t all example. | 521s 000009f0 20 20 63 6f 64 65 20 62 65 6c 6f 77 20 61 73 73 | code below ass| 521s 00000a00 75 6d 65 73 20 74 68 61 74 20 79 6f 75 20 68 61 |umes that you ha| 521s 00000a10 76 65 20 69 6d 70 6f 72 74 65 64 20 62 6f 74 68 |ve imported both| 521s 00000a20 20 67 6f 70 61 63 6b 65 74 20 61 6e 64 0a 20 20 | gopacket and. | 521s 00000a30 20 20 67 6f 70 61 63 6b 65 74 2f 6c 61 79 65 72 | gopacket/layer| 521s 00000a40 73 2e 0a 2a 20 70 63 61 70 3a 20 43 20 62 69 6e |s..* pcap: C bin| 521s 00000a50 64 69 6e 67 73 20 74 6f 20 75 73 65 20 6c 69 62 |dings to use lib| 521s 00000a60 70 63 61 70 20 74 6f 20 70 75 6c 6c 20 70 61 63 |pcap to pull pac| 521s 00000a70 6b 65 74 73 20 6f 66 66 20 74 68 65 20 77 69 72 |kets off the wir| 521s 00000a80 65 2e 0a 2a 20 70 66 72 69 6e 67 3a 20 43 20 62 |e..* pfring: C b| 521s 00000a90 69 6e 64 69 6e 67 73 20 74 6f 20 75 73 65 20 50 |indings to use P| 521s 00000aa0 46 5f 52 49 4e 47 20 74 6f 20 70 75 6c 6c 20 70 |F_RING to pull p| 521s 00000ab0 61 63 6b 65 74 73 20 6f 66 66 20 74 68 65 20 77 |ackets off the w| 521s 00000ac0 69 72 65 2e 0a 3c 2f 70 72 65 3e 0a 3c 68 33 20 |ire..</pre>.<h3 | 521s 00000ad0 69 64 3d 22 42 61 73 69 63 5f 55 73 61 67 65 22 |id="Basic_Usage"| 521s 00000ae0 3e 42 61 73 69 63 20 55 73 61 67 65 3c 2f 68 33 |>Basic Usage</h3| 521s 00000af0 3e 0a 3c 70 3e 0a 67 6f 70 61 63 6b 65 74 20 74 |>.<p>.gopacket t| 521s 00000b00 61 6b 65 73 20 69 6e 20 70 61 63 6b 65 74 20 64 |akes in packet d| 521s 00000b10 61 74 61 20 61 73 20 61 20 5b 5d 62 79 74 65 20 |ata as a []byte | 521s 00000b20 61 6e 64 20 64 65 63 6f 64 65 73 20 69 74 20 69 |and decodes it i| 521s 00000b30 6e 74 6f 20 61 20 70 61 63 6b 65 74 20 77 69 74 |nto a packet wit| 521s 00000b40 68 0a 61 20 6e 6f 6e 2d 7a 65 72 6f 20 6e 75 6d |h.a non-zero num| 521s 00000b50 62 65 72 20 6f 66 20 26 23 33 34 3b 6c 61 79 65 |ber of "laye| 521s 00000b60 72 73 26 23 33 34 3b 2e 20 20 45 61 63 68 20 6c |rs". Each l| 521s 00000b70 61 79 65 72 20 63 6f 72 72 65 73 70 6f 6e 64 73 |ayer corresponds| 521s 00000b80 20 74 6f 20 61 20 70 72 6f 74 6f 63 6f 6c 0a 77 | to a protocol.w| 521s 00000b90 69 74 68 69 6e 20 74 68 65 20 62 79 74 65 73 2e |ithin the bytes.| 521s 00000ba0 20 20 4f 6e 63 65 20 61 20 70 61 63 6b 65 74 20 | Once a packet | 521s 00000bb0 68 61 73 20 62 65 65 6e 20 64 65 63 6f 64 65 64 |has been decoded| 521s 00000bc0 2c 20 74 68 65 20 6c 61 79 65 72 73 20 6f 66 20 |, the layers of | 521s 00000bd0 74 68 65 20 70 61 63 6b 65 74 0a 63 61 6e 20 62 |the packet.can b| 521s 00000be0 65 20 72 65 71 75 65 73 74 65 64 20 66 72 6f 6d |e requested from| 521s 00000bf0 20 74 68 65 20 70 61 63 6b 65 74 2e 0a 3c 2f 70 | the packet..</p| 521s 00000c00 3e 0a 3c 70 72 65 3e 2f 2f 20 44 65 63 6f 64 65 |>.<pre>// Decode| 521s 00000c10 20 61 20 70 61 63 6b 65 74 0a 70 61 63 6b 65 74 | a packet.packet| 521s 00000c20 20 3a 3d 20 67 6f 70 61 63 6b 65 74 2e 4e 65 77 | := gopacket.New| 521s 00000c30 50 61 63 6b 65 74 28 6d 79 50 61 63 6b 65 74 44 |Packet(myPacketD| 521s 00000c40 61 74 61 2c 20 6c 61 79 65 72 73 2e 4c 61 79 65 |ata, layers.Laye| 521s 00000c50 72 54 79 70 65 45 74 68 65 72 6e 65 74 2c 20 67 |rTypeEthernet, g| 521s 00000c60 6f 70 61 63 6b 65 74 2e 44 65 66 61 75 6c 74 29 |opacket.Default)| 521s 00000c70 0a 2f 2f 20 47 65 74 20 74 68 65 20 54 43 50 20 |.// Get the TCP | 521s 00000c80 6c 61 79 65 72 20 66 72 6f 6d 20 74 68 69 73 20 |layer from this | 521s 00000c90 70 61 63 6b 65 74 0a 69 66 20 74 63 70 4c 61 79 |packet.if tcpLay| 521s 00000ca0 65 72 20 3a 3d 20 70 61 63 6b 65 74 2e 4c 61 79 |er := packet.Lay| 521s 00000cb0 65 72 28 6c 61 79 65 72 73 2e 4c 61 79 65 72 54 |er(layers.LayerT| 521s 00000cc0 79 70 65 54 43 50 29 3b 20 74 63 70 4c 61 79 65 |ypeTCP); tcpLaye| 521s 00000cd0 72 20 21 3d 20 6e 69 6c 20 7b 0a 20 20 66 6d 74 |r != nil {. fmt| 521s 00000ce0 2e 50 72 69 6e 74 6c 6e 28 26 23 33 34 3b 54 68 |.Println("Th| 521s 00000cf0 69 73 20 69 73 20 61 20 54 43 50 20 70 61 63 6b |is is a TCP pack| 521s 00000d00 65 74 21 26 23 33 34 3b 29 0a 20 20 2f 2f 20 47 |et!"). // G| 521s 00000d10 65 74 20 61 63 74 75 61 6c 20 54 43 50 20 64 61 |et actual TCP da| 521s 00000d20 74 61 20 66 72 6f 6d 20 74 68 69 73 20 6c 61 79 |ta from this lay| 521s 00000d30 65 72 0a 20 20 74 63 70 2c 20 5f 20 3a 3d 20 74 |er. tcp, _ := t| 521s 00000d40 63 70 4c 61 79 65 72 2e 28 2a 6c 61 79 65 72 73 |cpLayer.(*layers| 521s 00000d50 2e 54 43 50 29 0a 20 20 66 6d 74 2e 50 72 69 6e |.TCP). fmt.Prin| 521s 00000d60 74 66 28 26 23 33 34 3b 46 72 6f 6d 20 73 72 63 |tf("From src| 521s 00000d70 20 70 6f 72 74 20 25 64 20 74 6f 20 64 73 74 20 | port %d to dst | 521s 00000d80 70 6f 72 74 20 25 64 5c 6e 26 23 33 34 3b 2c 20 |port %d\n", | 521s 00000d90 74 63 70 2e 53 72 63 50 6f 72 74 2c 20 74 63 70 |tcp.SrcPort, tcp| 521s 00000da0 2e 44 73 74 50 6f 72 74 29 0a 7d 0a 2f 2f 20 49 |.DstPort).}.// I| 521s 00000db0 74 65 72 61 74 65 20 6f 76 65 72 20 61 6c 6c 20 |terate over all | 521s 00000dc0 6c 61 79 65 72 73 2c 20 70 72 69 6e 74 69 6e 67 |layers, printing| 521s 00000dd0 20 6f 75 74 20 65 61 63 68 20 6c 61 79 65 72 20 | out each layer | 521s 00000de0 74 79 70 65 0a 66 6f 72 20 6c 61 79 65 72 20 3a |type.for layer :| 521s 00000df0 3d 20 72 61 6e 67 65 20 70 61 63 6b 65 74 2e 4c |= range packet.L| 521s 00000e00 61 79 65 72 73 28 29 20 7b 0a 20 20 66 6d 74 2e |ayers() {. fmt.| 521s 00000e10 50 72 69 6e 74 6c 6e 28 26 23 33 34 3b 50 41 43 |Println("PAC| 521s 00000e20 4b 45 54 20 4c 41 59 45 52 3a 26 23 33 34 3b 2c |KET LAYER:",| 521s 00000e30 20 6c 61 79 65 72 2e 4c 61 79 65 72 54 79 70 65 | layer.LayerType| 521s 00000e40 28 29 29 0a 7d 0a 3c 2f 70 72 65 3e 0a 3c 70 3e |()).}.</pre>.<p>| 521s 00000e50 0a 50 61 63 6b 65 74 73 20 63 61 6e 20 62 65 20 |.Packets can be | 521s 00000e60 64 65 63 6f 64 65 64 20 66 72 6f 6d 20 61 20 6e |decoded from a n| 521s 00000e70 75 6d 62 65 72 20 6f 66 20 73 74 61 72 74 69 6e |umber of startin| 521s 00000e80 67 20 70 6f 69 6e 74 73 2e 20 20 4d 61 6e 79 20 |g points. Many | 521s 00000e90 6f 66 20 6f 75 72 20 62 61 73 65 0a 74 79 70 65 |of our base.type| 521s 00000ea0 73 20 69 6d 70 6c 65 6d 65 6e 74 20 44 65 63 6f |s implement Deco| 521s 00000eb0 64 65 72 2c 20 77 68 69 63 68 20 61 6c 6c 6f 77 |der, which allow| 521s 00000ec0 20 75 73 20 74 6f 20 64 65 63 6f 64 65 20 70 61 | us to decode pa| 521s 00000ed0 63 6b 65 74 73 20 66 6f 72 20 77 68 69 63 68 0a |ckets for which.| 521s 00000ee0 77 65 20 64 6f 6e 26 23 33 39 3b 74 20 68 61 76 |we don't hav| 521s 00000ef0 65 20 66 75 6c 6c 20 64 61 74 61 2e 0a 3c 2f 70 |e full data..</p| 521s 00000f00 3e 0a 3c 70 72 65 3e 2f 2f 20 44 65 63 6f 64 65 |>.<pre>// Decode| 521s 00000f10 20 61 6e 20 65 74 68 65 72 6e 65 74 20 70 61 63 | an ethernet pac| 521s 00000f20 6b 65 74 0a 65 74 68 50 20 3a 3d 20 67 6f 70 61 |ket.ethP := gopa| 521s 00000f30 63 6b 65 74 2e 4e 65 77 50 61 63 6b 65 74 28 70 |cket.NewPacket(p| 521s 00000f40 31 2c 20 6c 61 79 65 72 73 2e 4c 61 79 65 72 54 |1, layers.LayerT| 521s 00000f50 79 70 65 45 74 68 65 72 6e 65 74 2c 20 67 6f 70 |ypeEthernet, gop| 521s 00000f60 61 63 6b 65 74 2e 44 65 66 61 75 6c 74 29 0a 2f |acket.Default)./| 521s 00000f70 2f 20 44 65 63 6f 64 65 20 61 6e 20 49 50 76 36 |/ Decode an IPv6| 521s 00000f80 20 68 65 61 64 65 72 20 61 6e 64 20 65 76 65 72 | header and ever| 521s 00000f90 79 74 68 69 6e 67 20 69 74 20 63 6f 6e 74 61 69 |ything it contai| 521s 00000fa0 6e 73 0a 69 70 50 20 3a 3d 20 67 6f 70 61 63 6b |ns.ipP := gopack| 521s 00000fb0 65 74 2e 4e 65 77 50 61 63 6b 65 74 28 70 32 2c |et.NewPacket(p2,| 521s 00000fc0 20 6c 61 79 65 72 73 2e 4c 61 79 65 72 54 79 70 | layers.LayerTyp| 521s 00000fd0 65 49 50 76 36 2c 20 67 6f 70 61 63 6b 65 74 2e |eIPv6, gopacket.| 521s 00000fe0 44 65 66 61 75 6c 74 29 0a 2f 2f 20 44 65 63 6f |Default).// Deco| 521s 00000ff0 64 65 20 61 20 54 43 50 20 68 65 61 64 65 72 20 |de a TCP header | 521s 00001000 61 6e 64 20 69 74 73 20 70 61 79 6c 6f 61 64 0a |and its payload.| 521s 00001010 74 63 70 50 20 3a 3d 20 67 6f 70 61 63 6b 65 74 |tcpP := gopacket| 521s 00001020 2e 4e 65 77 50 61 63 6b 65 74 28 70 33 2c 20 6c |.NewPacket(p3, l| 521s 00001030 61 79 65 72 73 2e 4c 61 79 65 72 54 79 70 65 54 |ayers.LayerTypeT| 521s 00001040 43 50 2c 20 67 6f 70 61 63 6b 65 74 |CP, gopacket| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..4168..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..4128..] Version=6 TrafficClass=0 FlowLabel=100497 Length=4128 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 01 88 91 10 20 06 40 00 00 00 00 00 00 00 00 |`.... .@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[..4096..] SrcPort=8080(http-alt) DstPort=58799 Seq=174417647 Ack=144119882 DataOffset=8 FIN=false SYN=false RST=false PSH=true ACK=true URG=false ECE=false CWR=false NS=false Window=8962 Checksum=4136 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505270/96505084 0x05c08db605c08cfc)] Padding=[]} 521s 00000000 1f 90 e5 af 0a 65 66 ef 08 97 18 4a 80 18 23 02 |.....ef....J..#.| 521s 00000010 10 28 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |.(..............| 521s --- Layer 4 --- 521s Payload 4096 byte(s) 521s 00000000 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.| 521s 00000010 0a 44 61 74 65 3a 20 53 75 6e 2c 20 30 36 20 4a |.Date: Sun, 06 J| 521s 00000020 61 6e 20 32 30 31 33 20 31 37 3a 32 32 3a 33 32 |an 2013 17:22:32| 521s 00000030 20 47 4d 54 0d 0a 54 72 61 6e 73 66 65 72 2d 45 | GMT..Transfer-E| 521s 00000040 6e 63 6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 |ncoding: chunked| 521s 00000050 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 |..Content-Type: | 521s 00000060 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 73 |text/html; chars| 521s 00000070 65 74 3d 75 74 66 2d 38 0d 0a 0d 0a 32 30 30 0d |et=utf-8....200.| 521s 00000080 0a 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e |.<!DOCTYPE html>| 521s 00000090 0a 3c 68 74 6d 6c 3e 0a 3c 68 65 61 64 3e 0a 3c |.<html>.<head>.<| 521s 000000a0 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d |meta http-equiv=| 521s 000000b0 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 20 63 |"Content-Type" c| 521s 000000c0 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d |ontent="text/htm| 521s 000000d0 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 |l; charset=utf-8| 521s 000000e0 22 3e 0a 0a 20 20 3c 74 69 74 6c 65 3e 67 6f 70 |">.. <title>gop| 521s 000000f0 61 63 6b 65 74 20 2d 20 54 68 65 20 47 6f 20 50 |acket - The Go P| 521s 00000100 72 6f 67 72 61 6d 6d 69 6e 67 20 4c 61 6e 67 75 |rogramming Langu| 521s 00000110 61 67 65 3c 2f 74 69 74 6c 65 3e 0a 0a 3c 6c 69 |age...<| 521s 00000190 2f 73 63 72 69 70 74 3e 0a 0a 3c 2f 68 65 61 64 |/script>.....
.The Go| 521s 00000320 20 50 72 6f 67 72 61 6d 6d 69 6e 67 20 4c 61 6e | Programming Lan| 521s 00000330 67 75 61 67 65 3c 2f 61 3e 3c 2f 64 69 76 3e 0a |guage
.| 521s 00000340 3c 2f 66 6f 72 6d 3e 0a 0a 3c 2f 64 69 76 3e 3c |..<| 521s 00000350 2f 64 69 76 3e 0a 0a 3c 64 69 76 20 69 64 3d 22 |/div>..
...| 521s 00000380 0a 35 38 0d 0a 0a 20 20 3c 64 69 76 20 69 64 3d |.58...
| 521s 000003d0 3c 2f 64 69 76 3e 0a 20 20 3c 68 31 3e 0d 0a 31 |
.

..1| 521s 000003e0 30 0d 0a 50 61 63 6b 61 67 65 20 67 6f 70 61 63 |0..Package gopac| 521s 000003f0 6b 65 74 0d 0a 36 0d 0a 3c 2f 68 31 3e 0a 0d 0a |ket..6..

...| 521s 00000400 31 0d 0a 0a 0d 0a 32 0d 0a 0a 0a 0d 0a 31 37 0d |1.....2......17.| 521s 00000410 0a 0a 3c 64 69 76 20 69 64 3d 22 6e 61 76 22 3e |......1.....| 521s 00000430 63 65 39 34 0d 0a 3c 21 2d 2d 0a 09 43 6f 70 79 |ce94.......| 521s 000005b0 09 09 3c 64 69 76 20 69 64 3d 22 73 68 6f 72 74 |..
....
..| 521s 000005d0 09 09 3c 64 64 3e 3c 63 6f 64 65 3e 69 6d 70 6f |..
impo| 521s 000005e0 72 74 20 22 67 69 74 68 75 62 2e 63 6f 6d 2f 67 |rt "github.com/g| 521s 000005f0 63 6f 6e 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 |connell/gopacket| 521s 00000600 22 3c 2f 63 6f 64 65 3e 3c 2f 64 64 3e 0a 09 09 |"
...| 521s 00000610 09 3c 2f 64 6c 3e 0a 09 09 09 3c 64 6c 3e 0a 09 |.
....
..| 521s 00000620 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 |..
Overview<| 521s 00000660 2f 64 64 3e 0a 09 09 09 3c 64 64 3e 3c 61 20 68 |/dd>....
Index
.| 521s 00000690 09 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 000006a0 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 70 6b |
Subdirectories| 521s 000006d0 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 0a 09 09 |
.......| 521s 000006e0 09 3c 2f 64 6c 3e 0a 09 09 3c 2f 64 69 76 3e 0a |.
...
.| 521s 000006f0 09 09 3c 21 2d 2d 20 54 68 65 20 70 61 63 6b 61 |.........<| 521s 00000770 64 69 76 20 63 6c 61 73 73 3d 22 63 6f 6c 6c 61 |div class="colla| 521s 00000780 70 73 65 64 22 3e 0a 09 09 09 09 3c 68 32 20 63 |psed">.....

Overv| 521s 000007d0 69 65 77 20 e2 96 b9 3c 2f 68 32 3e 0a 09 09 09 |iew ...

....| 521s 000007e0 3c 2f 64 69 76 3e 0a 09 09 09 3c 64 69 76 20 63 |
....
| 521s 00000800 0a 09 09 09 09 3c 68 32 20 63 6c 61 73 73 3d 22 |.....

Overview ..| 521s 00000850 be 3c 2f 68 32 3e 0a 09 09 09 09 3c 70 3e 0a 50 |.

.....

.P| 521s 00000860 61 63 6b 61 67 65 20 67 6f 70 61 63 6b 65 74 20 |ackage gopacket | 521s 00000870 70 72 6f 76 69 64 65 73 20 70 61 63 6b 65 74 20 |provides packet | 521s 00000880 64 65 63 6f 64 69 6e 67 20 66 6f 72 20 74 68 65 |decoding for the| 521s 00000890 20 47 6f 20 6c 61 6e 67 75 61 67 65 2e 0a 3c 2f | Go language...

.gopacket | 521s 000008b0 63 6f 6e 74 61 69 6e 73 20 33 20 73 75 62 2d 70 |contains 3 sub-p| 521s 000008c0 61 63 6b 61 67 65 73 20 77 69 74 68 20 61 64 64 |ackages with add| 521s 000008d0 69 74 69 6f 6e 61 6c 20 66 75 6e 63 74 69 6f 6e |itional function| 521s 000008e0 61 6c 69 74 79 20 79 6f 75 20 6d 61 79 20 66 69 |ality you may fi| 521s 000008f0 6e 64 0a 75 73 65 66 75 6c 3a 0a 3c 2f 70 3e 0a |nd.useful:.

.| 521s 00000900 3c 70 72 65 3e 2a 20 6c 61 79 65 72 73 3a 20 59 |
* layers: Y|
521s         00000910  6f 75 26 23 33 39 3b 6c  6c 20 70 72 6f 62 61 62  |ou'll probab|
521s         00000920  6c 79 20 75 73 65 20 74  68 69 73 20 65 76 65 72  |ly use this ever|
521s         00000930  79 20 74 69 6d 65 2e 20  20 54 68 69 73 20 63 6f  |y time.  This co|
521s         00000940  6e 74 61 69 6e 73 20 6f  66 20 74 68 65 20 6c 6f  |ntains of the lo|
521s         00000950  67 69 63 0a 20 20 20 20  62 75 69 6c 74 20 69 6e  |gic.    built in|
521s         00000960  74 6f 20 67 6f 70 61 63  6b 65 74 20 66 6f 72 20  |to gopacket for |
521s         00000970  64 65 63 6f 64 69 6e 67  20 70 61 63 6b 65 74 20  |decoding packet |
521s         00000980  70 72 6f 74 6f 63 6f 6c  73 2e 20 20 4e 6f 74 65  |protocols.  Note|
521s         00000990  20 74 68 61 74 20 61 6c  6c 20 65 78 61 6d 70 6c  | that all exampl|
521s         000009a0  65 0a 20 20 20 20 63 6f  64 65 20 62 65 6c 6f 77  |e.    code below|
521s         000009b0  20 61 73 73 75 6d 65 73  20 74 68 61 74 20 79 6f  | assumes that yo|
521s         000009c0  75 20 68 61 76 65 20 69  6d 70 6f 72 74 65 64 20  |u have imported |
521s         000009d0  62 6f 74 68 20 67 6f 70  61 63 6b 65 74 20 61 6e  |both gopacket an|
521s         000009e0  64 0a 20 20 20 20 67 6f  70 61 63 6b 65 74 2f 6c  |d.    gopacket/l|
521s         000009f0  61 79 65 72 73 2e 0a 2a  20 70 63 61 70 3a 20 43  |ayers..* pcap: C|
521s         00000a00  20 62 69 6e 64 69 6e 67  73 20 74 6f 20 75 73 65  | bindings to use|
521s         00000a10  20 6c 69 62 70 63 61 70  20 74 6f 20 70 75 6c 6c  | libpcap to pull|
521s         00000a20  20 70 61 63 6b 65 74 73  20 6f 66 66 20 74 68 65  | packets off the|
521s         00000a30  20 77 69 72 65 2e 0a 2a  20 70 66 72 69 6e 67 3a  | wire..* pfring:|
521s         00000a40  20 43 20 62 69 6e 64 69  6e 67 73 20 74 6f 20 75  | C bindings to u|
521s         00000a50  73 65 20 50 46 5f 52 49  4e 47 20 74 6f 20 70 75  |se PF_RING to pu|
521s         00000a60  6c 6c 20 70 61 63 6b 65  74 73 20 6f 66 66 20 74  |ll packets off t|
521s         00000a70  68 65 20 77 69 72 65 2e  0a 3c 2f 70 72 65 3e 0a  |he wire..
.| 521s 00000a80 3c 68 33 20 69 64 3d 22 42 61 73 69 63 5f 55 73 |

Basic Usage| 521s 00000aa0 3c 2f 68 33 3e 0a 3c 70 3e 0a 67 6f 70 61 63 6b |

.

.gopack| 521s 00000ab0 65 74 20 74 61 6b 65 73 20 69 6e 20 70 61 63 6b |et takes in pack| 521s 00000ac0 65 74 20 64 61 74 61 20 61 73 20 61 20 5b 5d 62 |et data as a []b| 521s 00000ad0 79 74 65 20 61 6e 64 20 64 65 63 6f 64 65 73 20 |yte and decodes | 521s 00000ae0 69 74 20 69 6e 74 6f 20 61 20 70 61 63 6b 65 74 |it into a packet| 521s 00000af0 20 77 69 74 68 0a 61 20 6e 6f 6e 2d 7a 65 72 6f | with.a non-zero| 521s 00000b00 20 6e 75 6d 62 65 72 20 6f 66 20 26 23 33 34 3b | number of "| 521s 00000b10 6c 61 79 65 72 73 26 23 33 34 3b 2e 20 20 45 61 |layers". Ea| 521s 00000b20 63 68 20 6c 61 79 65 72 20 63 6f 72 72 65 73 70 |ch layer corresp| 521s 00000b30 6f 6e 64 73 20 74 6f 20 61 20 70 72 6f 74 6f 63 |onds to a protoc| 521s 00000b40 6f 6c 0a 77 69 74 68 69 6e 20 74 68 65 20 62 79 |ol.within the by| 521s 00000b50 74 65 73 2e 20 20 4f 6e 63 65 20 61 20 70 61 63 |tes. Once a pac| 521s 00000b60 6b 65 74 20 68 61 73 20 62 65 65 6e 20 64 65 63 |ket has been dec| 521s 00000b70 6f 64 65 64 2c 20 74 68 65 20 6c 61 79 65 72 73 |oded, the layers| 521s 00000b80 20 6f 66 20 74 68 65 20 70 61 63 6b 65 74 0a 63 | of the packet.c| 521s 00000b90 61 6e 20 62 65 20 72 65 71 75 65 73 74 65 64 20 |an be requested | 521s 00000ba0 66 72 6f 6d 20 74 68 65 20 70 61 63 6b 65 74 2e |from the packet.| 521s 00000bb0 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 2f 2f 20 44 65 |.

.
// De|
521s         00000bc0  63 6f 64 65 20 61 20 70  61 63 6b 65 74 0a 70 61  |code a packet.pa|
521s         00000bd0  63 6b 65 74 20 3a 3d 20  67 6f 70 61 63 6b 65 74  |cket := gopacket|
521s         00000be0  2e 4e 65 77 50 61 63 6b  65 74 28 6d 79 50 61 63  |.NewPacket(myPac|
521s         00000bf0  6b 65 74 44 61 74 61 2c  20 6c 61 79 65 72 73 2e  |ketData, layers.|
521s         00000c00  4c 61 79 65 72 54 79 70  65 45 74 68 65 72 6e 65  |LayerTypeEtherne|
521s         00000c10  74 2c 20 67 6f 70 61 63  6b 65 74 2e 44 65 66 61  |t, gopacket.Defa|
521s         00000c20  75 6c 74 29 0a 2f 2f 20  47 65 74 20 74 68 65 20  |ult).// Get the |
521s         00000c30  54 43 50 20 6c 61 79 65  72 20 66 72 6f 6d 20 74  |TCP layer from t|
521s         00000c40  68 69 73 20 70 61 63 6b  65 74 0a 69 66 20 74 63  |his packet.if tc|
521s         00000c50  70 4c 61 79 65 72 20 3a  3d 20 70 61 63 6b 65 74  |pLayer := packet|
521s         00000c60  2e 4c 61 79 65 72 28 6c  61 79 65 72 73 2e 4c 61  |.Layer(layers.La|
521s         00000c70  79 65 72 54 79 70 65 54  43 50 29 3b 20 74 63 70  |yerTypeTCP); tcp|
521s         00000c80  4c 61 79 65 72 20 21 3d  20 6e 69 6c 20 7b 0a 20  |Layer != nil {. |
521s         00000c90  20 66 6d 74 2e 50 72 69  6e 74 6c 6e 28 26 23 33  | fmt.Println(|
521s         00000ca0  34 3b 54 68 69 73 20 69  73 20 61 20 54 43 50 20  |4;This is a TCP |
521s         00000cb0  70 61 63 6b 65 74 21 26  23 33 34 3b 29 0a 20 20  |packet!").  |
521s         00000cc0  2f 2f 20 47 65 74 20 61  63 74 75 61 6c 20 54 43  |// Get actual TC|
521s         00000cd0  50 20 64 61 74 61 20 66  72 6f 6d 20 74 68 69 73  |P data from this|
521s         00000ce0  20 6c 61 79 65 72 0a 20  20 74 63 70 2c 20 5f 20  | layer.  tcp, _ |
521s         00000cf0  3a 3d 20 74 63 70 4c 61  79 65 72 2e 28 2a 6c 61  |:= tcpLayer.(*la|
521s         00000d00  79 65 72 73 2e 54 43 50  29 0a 20 20 66 6d 74 2e  |yers.TCP).  fmt.|
521s         00000d10  50 72 69 6e 74 66 28 26  23 33 34 3b 46 72 6f 6d  |Printf("From|
521s         00000d20  20 73 72 63 20 70 6f 72  74 20 25 64 20 74 6f 20  | src port %d to |
521s         00000d30  64 73 74 20 70 6f 72 74  20 25 64 5c 6e 26 23 33  |dst port %d\n|
521s         00000d40  34 3b 2c 20 74 63 70 2e  53 72 63 50 6f 72 74 2c  |4;, tcp.SrcPort,|
521s         00000d50  20 74 63 70 2e 44 73 74  50 6f 72 74 29 0a 7d 0a  | tcp.DstPort).}.|
521s         00000d60  2f 2f 20 49 74 65 72 61  74 65 20 6f 76 65 72 20  |// Iterate over |
521s         00000d70  61 6c 6c 20 6c 61 79 65  72 73 2c 20 70 72 69 6e  |all layers, prin|
521s         00000d80  74 69 6e 67 20 6f 75 74  20 65 61 63 68 20 6c 61  |ting out each la|
521s         00000d90  79 65 72 20 74 79 70 65  0a 66 6f 72 20 6c 61 79  |yer type.for lay|
521s         00000da0  65 72 20 3a 3d 20 72 61  6e 67 65 20 70 61 63 6b  |er := range pack|
521s         00000db0  65 74 2e 4c 61 79 65 72  73 28 29 20 7b 0a 20 20  |et.Layers() {.  |
521s         00000dc0  66 6d 74 2e 50 72 69 6e  74 6c 6e 28 26 23 33 34  |fmt.Println("|
521s         00000dd0  3b 50 41 43 4b 45 54 20  4c 41 59 45 52 3a 26 23  |;PACKET LAYER:&#|
521s         00000de0  33 34 3b 2c 20 6c 61 79  65 72 2e 4c 61 79 65 72  |34;, layer.Layer|
521s         00000df0  54 79 70 65 28 29 29 0a  7d 0a 3c 2f 70 72 65 3e  |Type()).}.
| 521s 00000e00 0a 3c 70 3e 0a 50 61 63 6b 65 74 73 20 63 61 6e |.

.Packets can| 521s 00000e10 20 62 65 20 64 65 63 6f 64 65 64 20 66 72 6f 6d | be decoded from| 521s 00000e20 20 61 20 6e 75 6d 62 65 72 20 6f 66 20 73 74 61 | a number of sta| 521s 00000e30 72 74 69 6e 67 20 70 6f 69 6e 74 73 2e 20 20 4d |rting points. M| 521s 00000e40 61 6e 79 20 6f 66 20 6f 75 72 20 62 61 73 65 0a |any of our base.| 521s 00000e50 74 79 70 65 73 20 69 6d 70 6c 65 6d 65 6e 74 20 |types implement | 521s 00000e60 44 65 63 6f 64 65 72 2c 20 77 68 69 63 68 20 61 |Decoder, which a| 521s 00000e70 6c 6c 6f 77 20 75 73 20 74 6f 20 64 65 63 6f 64 |llow us to decod| 521s 00000e80 65 20 70 61 63 6b 65 74 73 20 66 6f 72 20 77 68 |e packets for wh| 521s 00000e90 69 63 68 0a 77 65 20 64 6f 6e 26 23 33 39 3b 74 |ich.we don't| 521s 00000ea0 20 68 61 76 65 20 66 75 6c 6c 20 64 61 74 61 2e | have full data.| 521s 00000eb0 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 2f 2f 20 44 65 |.

.
// De|
521s         00000ec0  63 6f 64 65 20 61 6e 20  65 74 68 65 72 6e 65 74  |code an ethernet|
521s         00000ed0  20 70 61 63 6b 65 74 0a  65 74 68 50 20 3a 3d 20  | packet.ethP := |
521s         00000ee0  67 6f 70 61 63 6b 65 74  2e 4e 65 77 50 61 63 6b  |gopacket.NewPack|
521s         00000ef0  65 74 28 70 31 2c 20 6c  61 79 65 72 73 2e 4c 61  |et(p1, layers.La|
521s         00000f00  79 65 72 54 79 70 65 45  74 68 65 72 6e 65 74 2c  |yerTypeEthernet,|
521s         00000f10  20 67 6f 70 61 63 6b 65  74 2e 44 65 66 61 75 6c  | gopacket.Defaul|
521s         00000f20  74 29 0a 2f 2f 20 44 65  63 6f 64 65 20 61 6e 20  |t).// Decode an |
521s         00000f30  49 50 76 36 20 68 65 61  64 65 72 20 61 6e 64 20  |IPv6 header and |
521s         00000f40  65 76 65 72 79 74 68 69  6e 67 20 69 74 20 63 6f  |everything it co|
521s         00000f50  6e 74 61 69 6e 73 0a 69  70 50 20 3a 3d 20 67 6f  |ntains.ipP := go|
521s         00000f60  70 61 63 6b 65 74 2e 4e  65 77 50 61 63 6b 65 74  |packet.NewPacket|
521s         00000f70  28 70 32 2c 20 6c 61 79  65 72 73 2e 4c 61 79 65  |(p2, layers.Laye|
521s         00000f80  72 54 79 70 65 49 50 76  36 2c 20 67 6f 70 61 63  |rTypeIPv6, gopac|
521s         00000f90  6b 65 74 2e 44 65 66 61  75 6c 74 29 0a 2f 2f 20  |ket.Default).// |
521s         00000fa0  44 65 63 6f 64 65 20 61  20 54 43 50 20 68 65 61  |Decode a TCP hea|
521s         00000fb0  64 65 72 20 61 6e 64 20  69 74 73 20 70 61 79 6c  |der and its payl|
521s         00000fc0  6f 61 64 0a 74 63 70 50  20 3a 3d 20 67 6f 70 61  |oad.tcpP := gopa|
521s         00000fd0  63 6b 65 74 2e 4e 65 77  50 61 63 6b 65 74 28 70  |cket.NewPacket(p|
521s         00000fe0  33 2c 20 6c 61 79 65 72  73 2e 4c 61 79 65 72 54  |3, layers.LayerT|
521s         00000ff0  79 70 65 54 43 50 2c 20  67 6f 70 61 63 6b 65 74  |ypeTCP, gopacket|
521s         
521s     pcap_test.go:110: -- FULL PACKET DATA (16388 bytes) ------------------------------------
521s         00000000  1e 00 00 00 60 01 88 91  3f d8 06 40 00 00 00 00  |....`...?..@....|
521s         00000010  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
521s         00000020  00 00 00 00 00 00 00 00  00 00 00 01 1f 90 e5 af  |................|
521s         00000030  0a 65 76 ef 08 97 18 4a  80 10 23 02 3f e0 00 00  |.ev....J..#.?...|
521s         00000040  01 01 08 0a 05 c0 8d b6  05 c0 8c fc 2e 44 65 66  |.............Def|
521s         00000050  61 75 6c 74 29 0a 3c 2f  70 72 65 3e 0a 3c 68 33  |ault).
.Reading Pack| 521s 00000090 65 74 73 20 46 72 6f 6d 20 41 20 53 6f 75 72 63 |ets From A Sourc| 521s 000000a0 65 3c 2f 68 33 3e 0a 3c 70 3e 0a 4d 6f 73 74 20 |e.

.Most | 521s 000000b0 6f 66 20 74 68 65 20 74 69 6d 65 2c 20 79 6f 75 |of the time, you| 521s 000000c0 20 77 6f 6e 26 23 33 39 3b 74 20 6a 75 73 74 20 | won't just | 521s 000000d0 68 61 76 65 20 61 20 5b 5d 62 79 74 65 20 6f 66 |have a []byte of| 521s 000000e0 20 70 61 63 6b 65 74 20 64 61 74 61 20 6c 79 69 | packet data lyi| 521s 000000f0 6e 67 20 61 72 6f 75 6e 64 2e 0a 49 6e 73 74 65 |ng around..Inste| 521s 00000100 61 64 2c 20 79 6f 75 26 23 33 39 3b 6c 6c 20 77 |ad, you'll w| 521s 00000110 61 6e 74 20 74 6f 20 72 65 61 64 20 70 61 63 6b |ant to read pack| 521s 00000120 65 74 73 20 69 6e 20 66 72 6f 6d 20 73 6f 6d 65 |ets in from some| 521s 00000130 77 68 65 72 65 20 28 66 69 6c 65 2c 20 69 6e 74 |where (file, int| 521s 00000140 65 72 66 61 63 65 2c 20 65 74 63 29 0a 61 6e 64 |erface, etc).and| 521s 00000150 20 70 72 6f 63 65 73 73 20 74 68 65 6d 2e 20 20 | process them. | 521s 00000160 54 6f 20 64 6f 20 74 68 61 74 2c 20 79 6f 75 26 |To do that, you&| 521s 00000170 23 33 39 3b 6c 6c 20 77 61 6e 74 20 74 6f 20 62 |#39;ll want to b| 521s 00000180 75 69 6c 64 20 61 20 50 61 63 6b 65 74 53 6f 75 |uild a PacketSou| 521s 00000190 72 63 65 2e 0a 3c 2f 70 3e 0a 3c 70 3e 0a 46 69 |rce..

.

.Fi| 521s 000001a0 72 73 74 2c 20 79 6f 75 26 23 33 39 3b 6c 6c 20 |rst, you'll | 521s 000001b0 6e 65 65 64 20 74 6f 20 63 6f 6e 73 74 72 75 63 |need to construc| 521s 000001c0 74 20 61 6e 20 6f 62 6a 65 63 74 20 74 68 61 74 |t an object that| 521s 000001d0 20 69 6d 70 6c 65 6d 65 6e 74 73 20 74 68 65 20 | implements the | 521s 000001e0 50 61 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 |PacketDataSource| 521s 000001f0 0a 69 6e 74 65 72 66 61 63 65 2e 20 20 54 68 65 |.interface. The| 521s 00000200 72 65 20 61 72 65 20 69 6d 70 6c 65 6d 65 6e 74 |re are implement| 521s 00000210 61 74 69 6f 6e 73 20 6f 66 20 74 68 69 73 20 69 |ations of this i| 521s 00000220 6e 74 65 72 66 61 63 65 20 62 75 6e 64 6c 65 64 |nterface bundled| 521s 00000230 20 77 69 74 68 20 67 6f 70 61 63 6b 65 74 0a 69 | with gopacket.i| 521s 00000240 6e 20 74 68 65 20 67 6f 70 61 63 6b 65 74 2f 70 |n the gopacket/p| 521s 00000250 63 61 70 20 61 6e 64 20 67 6f 70 61 63 6b 65 74 |cap and gopacket| 521s 00000260 2f 70 66 72 69 6e 67 20 73 75 62 70 61 63 6b 61 |/pfring subpacka| 521s 00000270 67 65 73 2e 2e 2e 20 73 65 65 20 74 68 65 69 72 |ges... see their| 521s 00000280 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 0a 66 | documentation.f| 521s 00000290 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 |or more informat| 521s 000002a0 69 6f 6e 20 6f 6e 20 74 68 65 69 72 20 75 73 61 |ion on their usa| 521s 000002b0 67 65 2e 20 20 4f 6e 63 65 20 79 6f 75 20 68 61 |ge. Once you ha| 521s 000002c0 76 65 20 61 20 50 61 63 6b 65 74 44 61 74 61 53 |ve a PacketDataS| 521s 000002d0 6f 75 72 63 65 2c 20 79 6f 75 20 63 61 6e 0a 70 |ource, you can.p| 521s 000002e0 61 73 73 20 69 74 20 69 6e 74 6f 20 4e 65 77 50 |ass it into NewP| 521s 000002f0 61 63 6b 65 74 53 6f 75 72 63 65 2c 20 61 6c 6f |acketSource, alo| 521s 00000300 6e 67 20 77 69 74 68 20 61 20 44 65 63 6f 64 65 |ng with a Decode| 521s 00000310 72 20 6f 66 20 79 6f 75 72 20 63 68 6f 69 63 65 |r of your choice| 521s 00000320 2c 20 74 6f 20 63 72 65 61 74 65 0a 61 20 50 61 |, to create.a Pa| 521s 00000330 63 6b 65 74 53 6f 75 72 63 65 2e 0a 3c 2f 70 3e |cketSource..

| 521s 00000340 0a 3c 70 3e 0a 4f 6e 63 65 20 79 6f 75 20 68 61 |.

.Once you ha| 521s 00000350 76 65 20 61 20 50 61 63 6b 65 74 53 6f 75 72 63 |ve a PacketSourc| 521s 00000360 65 2c 20 79 6f 75 20 63 61 6e 20 72 65 61 64 20 |e, you can read | 521s 00000370 70 61 63 6b 65 74 73 20 66 72 6f 6d 20 69 74 20 |packets from it | 521s 00000380 69 6e 20 6d 75 6c 74 69 70 6c 65 20 77 61 79 73 |in multiple ways| 521s 00000390 2e 0a 53 65 65 20 74 68 65 20 64 6f 63 73 20 66 |..See the docs f| 521s 000003a0 6f 72 20 50 61 63 6b 65 74 53 6f 75 72 63 65 20 |or PacketSource | 521s 000003b0 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 |for more details| 521s 000003c0 2e 20 20 54 68 65 20 65 61 73 69 65 73 74 20 6d |. The easiest m| 521s 000003d0 65 74 68 6f 64 20 69 73 20 74 68 65 0a 50 61 63 |ethod is the.Pac| 521s 000003e0 6b 65 74 73 20 66 75 6e 63 74 69 6f 6e 2c 20 77 |kets function, w| 521s 000003f0 68 69 63 68 20 72 65 74 75 72 6e 73 20 61 20 63 |hich returns a c| 521s 00000400 68 61 6e 6e 65 6c 2c 20 74 68 65 6e 20 61 73 79 |hannel, then asy| 521s 00000410 6e 63 68 72 6f 6e 6f 75 73 6c 79 20 77 72 69 74 |nchronously writ| 521s 00000420 65 73 20 6e 65 77 0a 70 61 63 6b 65 74 73 20 69 |es new.packets i| 521s 00000430 6e 74 6f 20 74 68 61 74 20 63 68 61 6e 6e 65 6c |nto that channel| 521s 00000440 2c 20 63 6c 6f 73 69 6e 67 20 74 68 65 20 63 68 |, closing the ch| 521s 00000450 61 6e 6e 65 6c 20 69 66 20 74 68 65 20 70 61 63 |annel if the pac| 521s 00000460 6b 65 74 53 6f 75 72 63 65 20 68 69 74 73 20 61 |ketSource hits a| 521s 00000470 6e 0a 65 6e 64 2d 6f 66 2d 66 69 6c 65 2e 0a 3c |n.end-of-file..<| 521s 00000480 2f 70 3e 0a 3c 70 72 65 3e 70 61 63 6b 65 74 53 |/p>.

packetS|
521s         00000490  6f 75 72 63 65 20 3a 3d  20 2e 2e 2e 20 20 2f 2f  |ource := ...  //|
521s         000004a0  20 63 6f 6e 73 74 72 75  63 74 20 75 73 69 6e 67  | construct using|
521s         000004b0  20 70 63 61 70 20 6f 72  20 70 66 72 69 6e 67 0a  | pcap or pfring.|
521s         000004c0  66 6f 72 20 70 61 63 6b  65 74 20 3a 3d 20 72 61  |for packet := ra|
521s         000004d0  6e 67 65 20 70 61 63 6b  65 74 53 6f 75 72 63 65  |nge packetSource|
521s         000004e0  2e 50 61 63 6b 65 74 73  28 29 20 7b 0a 20 20 68  |.Packets() {.  h|
521s         000004f0  61 6e 64 6c 65 50 61 63  6b 65 74 28 70 61 63 6b  |andlePacket(pack|
521s         00000500  65 74 29 20 20 2f 2f 20  64 6f 20 73 6f 6d 65 74  |et)  // do somet|
521s         00000510  68 69 6e 67 20 77 69 74  68 20 65 61 63 68 20 70  |hing with each p|
521s         00000520  61 63 6b 65 74 0a 7d 0a  3c 2f 70 72 65 3e 0a 3c  |acket.}.
.<| 521s 00000530 70 3e 0a 59 6f 75 20 63 61 6e 20 63 68 61 6e 67 |p>.You can chang| 521s 00000540 65 20 74 68 65 20 64 65 63 6f 64 69 6e 67 20 6f |e the decoding o| 521s 00000550 70 74 69 6f 6e 73 20 6f 66 20 74 68 65 20 70 61 |ptions of the pa| 521s 00000560 63 6b 65 74 53 6f 75 72 63 65 20 62 79 20 73 65 |cketSource by se| 521s 00000570 74 74 69 6e 67 20 66 69 65 6c 64 73 20 69 6e 0a |tting fields in.| 521s 00000580 70 61 63 6b 65 74 53 6f 75 72 63 65 2e 44 65 63 |packetSource.Dec| 521s 00000590 6f 64 65 4f 70 74 69 6f 6e 73 2e 2e 2e 20 73 65 |odeOptions... se| 521s 000005a0 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 |e the following | 521s 000005b0 73 65 63 74 69 6f 6e 73 20 66 6f 72 20 6d 6f 72 |sections for mor| 521s 000005c0 65 20 64 65 74 61 69 6c 73 2e 0a 3c 2f 70 3e 0a |e details..

.| 521s 000005d0 3c 68 33 20 69 64 3d 22 4c 61 7a 79 5f 44 65 63 |

Lazy Deco| 521s 000005f0 64 69 6e 67 3c 2f 68 33 3e 0a 3c 70 3e 0a 67 6f |ding

.

.go| 521s 00000600 70 61 63 6b 65 74 20 6f 70 74 69 6f 6e 61 6c 6c |packet optionall| 521s 00000610 79 20 64 65 63 6f 64 65 73 20 70 61 63 6b 65 74 |y decodes packet| 521s 00000620 20 64 61 74 61 20 6c 61 7a 69 6c 79 2c 20 6d 65 | data lazily, me| 521s 00000630 61 6e 69 6e 67 20 69 74 0a 6f 6e 6c 79 20 64 65 |aning it.only de| 521s 00000640 63 6f 64 65 73 20 61 20 70 61 63 6b 65 74 20 6c |codes a packet l| 521s 00000650 61 79 65 72 20 77 68 65 6e 20 69 74 20 6e 65 65 |ayer when it nee| 521s 00000660 64 73 20 74 6f 20 74 6f 20 68 61 6e 64 6c 65 20 |ds to to handle | 521s 00000670 61 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 2e |a function call.| 521s 00000680 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 2f 2f 20 43 72 |.

.
// Cr|
521s         00000690  65 61 74 65 20 61 20 70  61 63 6b 65 74 2c 20 62  |eate a packet, b|
521s         000006a0  75 74 20 64 6f 6e 26 23  33 39 3b 74 20 61 63 74  |ut don't act|
521s         000006b0  75 61 6c 6c 79 20 64 65  63 6f 64 65 20 61 6e 79  |ually decode any|
521s         000006c0  74 68 69 6e 67 20 79 65  74 0a 70 61 63 6b 65 74  |thing yet.packet|
521s         000006d0  20 3a 3d 20 67 6f 70 61  63 6b 65 74 2e 4e 65 77  | := gopacket.New|
521s         000006e0  50 61 63 6b 65 74 28 6d  79 50 61 63 6b 65 74 44  |Packet(myPacketD|
521s         000006f0  61 74 61 2c 20 6c 61 79  65 72 73 2e 4c 61 79 65  |ata, layers.Laye|
521s         00000700  72 54 79 70 65 45 74 68  65 72 6e 65 74 2c 20 67  |rTypeEthernet, g|
521s         00000710  6f 70 61 63 6b 65 74 2e  4c 61 7a 79 29 0a 2f 2f  |opacket.Lazy).//|
521s         00000720  20 4e 6f 77 2c 20 64 65  63 6f 64 65 20 74 68 65  | Now, decode the|
521s         00000730  20 70 61 63 6b 65 74 20  75 70 20 74 6f 20 74 68  | packet up to th|
521s         00000740  65 20 66 69 72 73 74 20  49 50 76 34 20 6c 61 79  |e first IPv4 lay|
521s         00000750  65 72 20 66 6f 75 6e 64  20 62 75 74 20 6e 6f 20  |er found but no |
521s         00000760  66 75 72 74 68 65 72 2e  0a 2f 2f 20 49 66 20 6e  |further..// If n|
521s         00000770  6f 20 49 50 76 34 20 6c  61 79 65 72 20 77 61 73  |o IPv4 layer was|
521s         00000780  20 66 6f 75 6e 64 2c 20  74 68 65 20 77 68 6f 6c  | found, the whol|
521s         00000790  65 20 70 61 63 6b 65 74  20 77 69 6c 6c 20 62 65  |e packet will be|
521s         000007a0  20 64 65 63 6f 64 65 64  20 6c 6f 6f 6b 69 6e 67  | decoded looking|
521s         000007b0  20 66 6f 72 0a 2f 2f 20  69 74 2e 0a 69 70 34 20  | for.// it..ip4 |
521s         000007c0  3a 3d 20 70 61 63 6b 65  74 2e 4c 61 79 65 72 28  |:= packet.Layer(|
521s         000007d0  6c 61 79 65 72 73 2e 4c  61 79 65 72 54 79 70 65  |layers.LayerType|
521s         000007e0  49 50 76 34 29 0a 2f 2f  20 44 65 63 6f 64 65 20  |IPv4).// Decode |
521s         000007f0  61 6c 6c 20 6c 61 79 65  72 73 20 61 6e 64 20 72  |all layers and r|
521s         00000800  65 74 75 72 6e 20 74 68  65 6d 2e 20 20 54 68 65  |eturn them.  The|
521s         00000810  20 6c 61 79 65 72 73 20  75 70 20 74 6f 20 74 68  | layers up to th|
521s         00000820  65 20 66 69 72 73 74 20  49 50 76 34 20 6c 61 79  |e first IPv4 lay|
521s         00000830  65 72 0a 2f 2f 20 61 72  65 20 61 6c 72 65 61 64  |er.// are alread|
521s         00000840  79 20 64 65 63 6f 64 65  64 2c 20 61 6e 64 20 77  |y decoded, and w|
521s         00000850  69 6c 6c 20 6e 6f 74 20  72 65 71 75 69 72 65 20  |ill not require |
521s         00000860  64 65 63 6f 64 69 6e 67  20 61 20 73 65 63 6f 6e  |decoding a secon|
521s         00000870  64 20 74 69 6d 65 2e 0a  6c 61 79 65 72 73 20 3a  |d time..layers :|
521s         00000880  3d 20 70 61 63 6b 65 74  2e 4c 61 79 65 72 73 28  |= packet.Layers(|
521s         00000890  29 0a 3c 2f 70 72 65 3e  0a 3c 70 3e 0a 4c 61 7a  |).
.

.Laz| 521s 000008a0 69 6c 79 2d 64 65 63 6f 64 65 64 20 70 61 63 6b |ily-decoded pack| 521s 000008b0 65 74 73 20 61 72 65 20 6e 6f 74 20 63 6f 6e 63 |ets are not conc| 521s 000008c0 75 72 72 65 6e 63 79 2d 73 61 66 65 2e 20 20 53 |urrency-safe. S| 521s 000008d0 69 6e 63 65 20 6c 61 79 65 72 73 20 68 61 76 65 |ince layers have| 521s 000008e0 20 6e 6f 74 20 61 6c 6c 20 62 65 65 6e 0a 64 65 | not all been.de| 521s 000008f0 63 6f 64 65 64 2c 20 65 61 63 68 20 63 61 6c 6c |coded, each call| 521s 00000900 20 74 6f 20 4c 61 79 65 72 28 29 20 6f 72 20 4c | to Layer() or L| 521s 00000910 61 79 65 72 73 28 29 20 68 61 73 20 74 68 65 20 |ayers() has the | 521s 00000920 70 6f 74 65 6e 74 69 61 6c 20 74 6f 20 6d 75 74 |potential to mut| 521s 00000930 61 74 65 20 74 68 65 20 70 61 63 6b 65 74 0a 69 |ate the packet.i| 521s 00000940 6e 20 6f 72 64 65 72 20 74 6f 20 64 65 63 6f 64 |n order to decod| 521s 00000950 65 20 74 68 65 20 6e 65 78 74 20 6c 61 79 65 72 |e the next layer| 521s 00000960 2e 20 20 49 66 20 61 20 70 61 63 6b 65 74 20 69 |. If a packet i| 521s 00000970 73 20 75 73 65 64 0a 69 6e 20 6d 75 6c 74 69 70 |s used.in multip| 521s 00000980 6c 65 20 67 6f 72 6f 75 74 69 6e 65 73 20 63 6f |le goroutines co| 521s 00000990 6e 63 75 72 72 65 6e 74 6c 79 2c 20 64 6f 6e 26 |ncurrently, don&| 521s 000009a0 23 33 39 3b 74 20 75 73 65 20 67 6f 70 61 63 6b |#39;t use gopack| 521s 000009b0 65 74 2e 4c 61 7a 79 2e 20 20 54 68 65 6e 20 67 |et.Lazy. Then g| 521s 000009c0 6f 70 61 63 6b 65 74 0a 77 69 6c 6c 20 64 65 63 |opacket.will dec| 521s 000009d0 6f 64 65 20 74 68 65 20 70 61 63 6b 65 74 20 66 |ode the packet f| 521s 000009e0 75 6c 6c 79 2c 20 61 6e 64 20 61 6c 6c 20 66 75 |ully, and all fu| 521s 000009f0 74 75 72 65 20 66 75 6e 63 74 69 6f 6e 20 63 61 |ture function ca| 521s 00000a00 6c 6c 73 20 77 6f 6e 26 23 33 39 3b 74 20 6d 75 |lls won't mu| 521s 00000a10 74 61 74 65 20 74 68 65 0a 6f 62 6a 65 63 74 2e |tate the.object.| 521s 00000a20 0a 3c 2f 70 3e 0a 3c 68 33 20 69 64 3d 22 4e 6f |.

.

N| 521s 00000a40 6f 43 6f 70 79 20 44 65 63 6f 64 69 6e 67 3c 2f |oCopy Decoding.

.By defau| 521s 00000a60 6c 74 2c 20 67 6f 70 61 63 6b 65 74 20 77 69 6c |lt, gopacket wil| 521s 00000a70 6c 20 63 6f 70 79 20 74 68 65 20 73 6c 69 63 65 |l copy the slice| 521s 00000a80 20 70 61 73 73 65 64 20 74 6f 20 4e 65 77 50 61 | passed to NewPa| 521s 00000a90 63 6b 65 74 20 61 6e 64 20 73 74 6f 72 65 20 74 |cket and store t| 521s 00000aa0 68 65 0a 63 6f 70 79 20 77 69 74 68 69 6e 20 74 |he.copy within t| 521s 00000ab0 68 65 20 70 61 63 6b 65 74 2c 20 73 6f 20 66 75 |he packet, so fu| 521s 00000ac0 74 75 72 65 20 6d 75 74 61 74 69 6f 6e 73 20 74 |ture mutations t| 521s 00000ad0 6f 20 74 68 65 20 62 79 74 65 73 20 75 6e 64 65 |o the bytes unde| 521s 00000ae0 72 6c 79 69 6e 67 20 74 68 65 20 73 6c 69 63 65 |rlying the slice| 521s 00000af0 0a 64 6f 6e 26 23 33 39 3b 74 20 61 66 66 65 63 |.don't affec| 521s 00000b00 74 20 74 68 65 20 70 61 63 6b 65 74 20 61 6e 64 |t the packet and| 521s 00000b10 20 69 74 73 20 6c 61 79 65 72 73 2e 20 20 49 66 | its layers. If| 521s 00000b20 20 79 6f 75 20 63 61 6e 20 67 75 61 72 61 6e 74 | you can guarant| 521s 00000b30 65 65 20 74 68 61 74 20 74 68 65 0a 75 6e 64 65 |ee that the.unde| 521s 00000b40 72 6c 79 69 6e 67 20 73 6c 69 63 65 20 62 79 74 |rlying slice byt| 521s 00000b50 65 73 20 77 6f 6e 26 23 33 39 3b 74 20 62 65 20 |es won't be | 521s 00000b60 63 68 61 6e 67 65 64 2c 20 79 6f 75 20 63 61 6e |changed, you can| 521s 00000b70 20 75 73 65 20 4e 6f 43 6f 70 79 20 74 6f 20 74 | use NoCopy to t| 521s 00000b80 65 6c 6c 0a 67 6f 70 61 63 6b 65 74 2e 4e 65 77 |ell.gopacket.New| 521s 00000b90 50 61 63 6b 65 74 2c 20 61 6e 64 20 69 74 26 23 |Packet, and it&#| 521s 00000ba0 33 39 3b 6c 6c 20 75 73 65 20 74 68 65 20 70 61 |39;ll use the pa| 521s 00000bb0 73 73 65 64 2d 69 6e 20 73 6c 69 63 65 20 69 74 |ssed-in slice it| 521s 00000bc0 73 65 6c 66 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 3e |self..

.
|
521s         00000bd0  2f 2f 20 54 68 69 73 20  63 68 61 6e 6e 65 6c 20  |// This channel |
521s         00000be0  72 65 74 75 72 6e 73 20  6e 65 77 20 62 79 74 65  |returns new byte|
521s         00000bf0  20 73 6c 69 63 65 73 2c  20 65 61 63 68 20 6f 66  | slices, each of|
521s         00000c00  20 77 68 69 63 68 20 70  6f 69 6e 74 73 20 74 6f  | which points to|
521s         00000c10  20 61 20 6e 65 77 0a 2f  2f 20 6d 65 6d 6f 72 79  | a new.// memory|
521s         00000c20  20 6c 6f 63 61 74 69 6f  6e 20 74 68 61 74 26 23  | location that&#|
521s         00000c30  33 39 3b 73 20 67 75 61  72 61 6e 74 65 65 64 20  |39;s guaranteed |
521s         00000c40  69 6d 6d 75 74 61 62 6c  65 20 66 6f 72 20 74 68  |immutable for th|
521s         00000c50  65 20 64 75 72 61 74 69  6f 6e 20 6f 66 20 74 68  |e duration of th|
521s         00000c60  65 0a 2f 2f 20 70 61 63  6b 65 74 2e 0a 66 6f 72  |e.// packet..for|
521s         00000c70  20 64 61 74 61 20 3a 3d  20 72 61 6e 67 65 20 6d  | data := range m|
521s         00000c80  79 42 79 74 65 53 6c 69  63 65 43 68 61 6e 6e 65  |yByteSliceChanne|
521s         00000c90  6c 20 7b 0a 20 20 70 20  3a 3d 20 67 6f 70 61 63  |l {.  p := gopac|
521s         00000ca0  6b 65 74 2e 4e 65 77 50  61 63 6b 65 74 28 64 61  |ket.NewPacket(da|
521s         00000cb0  74 61 2c 20 6c 61 79 65  72 73 2e 4c 61 79 65 72  |ta, layers.Layer|
521s         00000cc0  54 79 70 65 45 74 68 65  72 6e 65 74 2c 20 67 6f  |TypeEthernet, go|
521s         00000cd0  70 61 63 6b 65 74 2e 4e  6f 43 6f 70 79 29 0a 20  |packet.NoCopy). |
521s         00000ce0  20 64 6f 53 6f 6d 65 74  68 69 6e 67 57 69 74 68  | doSomethingWith|
521s         00000cf0  50 61 63 6b 65 74 28 70  29 0a 7d 0a 3c 2f 70 72  |Packet(p).}..

.The faste| 521s 00000d10 73 74 20 6d 65 74 68 6f 64 20 6f 66 20 64 65 63 |st method of dec| 521s 00000d20 6f 64 69 6e 67 20 69 73 20 74 6f 20 75 73 65 20 |oding is to use | 521s 00000d30 62 6f 74 68 20 4c 61 7a 79 20 61 6e 64 20 4e 6f |both Lazy and No| 521s 00000d40 43 6f 70 79 2c 20 62 75 74 20 6e 6f 74 65 20 66 |Copy, but note f| 521s 00000d50 72 6f 6d 0a 74 68 65 20 6d 61 6e 79 20 63 61 76 |rom.the many cav| 521s 00000d60 65 61 74 73 20 61 62 6f 76 65 20 74 68 61 74 20 |eats above that | 521s 00000d70 66 6f 72 20 73 6f 6d 65 20 69 6d 70 6c 65 6d 65 |for some impleme| 521s 00000d80 6e 74 61 74 69 6f 6e 73 20 74 68 65 79 20 6d 61 |ntations they ma| 521s 00000d90 79 20 62 65 20 64 61 6e 67 65 72 6f 75 73 0a 65 |y be dangerous.e| 521s 00000da0 69 74 68 65 72 20 6f 72 20 62 6f 74 68 20 6d 61 |ither or both ma| 521s 00000db0 79 20 62 65 20 64 61 6e 67 65 72 6f 75 73 2e 0a |y be dangerous..| 521s 00000dc0 3c 2f 70 3e 0a 3c 68 33 20 69 64 3d 22 50 6f 69 |

.

Pointers | 521s 00000df0 54 6f 20 4b 6e 6f 77 6e 20 4c 61 79 65 72 73 3c |To Known Layers<| 521s 00000e00 2f 68 33 3e 0a 3c 70 3e 0a 44 75 72 69 6e 67 20 |/h3>.

.During | 521s 00000e10 64 65 63 6f 64 69 6e 67 2c 20 63 65 72 74 61 69 |decoding, certai| 521s 00000e20 6e 20 6c 61 79 65 72 73 20 61 72 65 20 73 74 6f |n layers are sto| 521s 00000e30 72 65 64 20 69 6e 20 74 68 65 20 70 61 63 6b 65 |red in the packe| 521s 00000e40 74 20 61 73 20 77 65 6c 6c 2d 6b 6e 6f 77 6e 0a |t as well-known.| 521s 00000e50 6c 61 79 65 72 20 74 79 70 65 73 2e 20 20 46 6f |layer types. Fo| 521s 00000e60 72 20 65 78 61 6d 70 6c 65 2c 20 49 50 76 34 20 |r example, IPv4 | 521s 00000e70 61 6e 64 20 49 50 76 36 20 61 72 65 20 62 6f 74 |and IPv6 are bot| 521s 00000e80 68 20 63 6f 6e 73 69 64 65 72 65 64 20 4e 65 74 |h considered Net| 521s 00000e90 77 6f 72 6b 4c 61 79 65 72 0a 6c 61 79 65 72 73 |workLayer.layers| 521s 00000ea0 2c 20 77 68 69 6c 65 20 54 43 50 20 61 6e 64 20 |, while TCP and | 521s 00000eb0 55 44 50 20 61 72 65 20 62 6f 74 68 20 54 72 61 |UDP are both Tra| 521s 00000ec0 6e 73 70 6f 72 74 4c 61 79 65 72 20 6c 61 79 65 |nsportLayer laye| 521s 00000ed0 72 73 2e 20 20 57 65 20 73 75 70 70 6f 72 74 20 |rs. We support | 521s 00000ee0 34 0a 6c 61 79 65 72 73 2c 20 63 6f 72 72 65 73 |4.layers, corres| 521s 00000ef0 70 6f 6e 64 69 6e 67 20 74 6f 20 74 68 65 20 34 |ponding to the 4| 521s 00000f00 20 6c 61 79 65 72 73 20 6f 66 20 74 68 65 20 54 | layers of the T| 521s 00000f10 43 50 2f 49 50 20 6c 61 79 65 72 69 6e 67 20 73 |CP/IP layering s| 521s 00000f20 63 68 65 6d 65 20 28 72 6f 75 67 68 6c 79 0a 61 |cheme (roughly.a| 521s 00000f30 6e 61 67 61 6c 6f 75 73 20 74 6f 20 6c 61 79 65 |nagalous to laye| 521s 00000f40 72 73 20 32 2c 20 33 2c 20 34 2c 20 61 6e 64 20 |rs 2, 3, 4, and | 521s 00000f50 37 20 6f 66 20 74 68 65 20 4f 53 49 20 6d 6f 64 |7 of the OSI mod| 521s 00000f60 65 6c 29 2e 20 20 54 6f 20 61 63 63 65 73 73 20 |el). To access | 521s 00000f70 74 68 65 73 65 2c 0a 79 6f 75 20 63 61 6e 20 75 |these,.you can u| 521s 00000f80 73 65 20 74 68 65 20 70 61 63 6b 65 74 2e 4c 69 |se the packet.Li| 521s 00000f90 6e 6b 4c 61 79 65 72 2c 20 70 61 63 6b 65 74 2e |nkLayer, packet.| 521s 00000fa0 4e 65 74 77 6f 72 6b 4c 61 79 65 72 2c 0a 70 61 |NetworkLayer,.pa| 521s 00000fb0 63 6b 65 74 2e 54 72 61 6e 73 70 6f 72 74 4c 61 |cket.TransportLa| 521s 00000fc0 79 65 72 2c 20 61 6e 64 20 70 61 63 6b 65 74 2e |yer, and packet.| 521s 00000fd0 41 70 70 6c 69 63 61 74 69 6f 6e 4c 61 79 65 72 |ApplicationLayer| 521s 00000fe0 20 66 75 6e 63 74 69 6f 6e 73 2e 20 20 45 61 63 | functions. Eac| 521s 00000ff0 68 20 6f 66 0a 74 68 65 73 65 20 66 75 6e 63 74 |h of.these funct| 521s 00001000 69 6f 6e 73 20 72 65 74 75 72 6e 73 20 61 20 63 |ions returns a c| 521s 00001010 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 69 6e 74 |orresponding int| 521s 00001020 65 72 66 61 63 65 0a 28 67 6f 70 61 63 6b 65 74 |erface.(gopacket| 521s 00001030 2e 7b 4c 69 6e 6b 2c 4e 65 74 77 6f 72 6b 2c 54 |.{Link,Network,T| 521s 00001040 72 61 6e 73 70 6f 72 74 2c 41 70 70 6c 69 63 61 |ransport,Applica| 521s 00001050 74 69 6f 6e 7d 4c 61 79 65 72 29 2e 20 20 54 68 |tion}Layer). Th| 521s 00001060 65 20 66 69 72 73 74 20 74 68 72 65 65 0a 70 72 |e first three.pr| 521s 00001070 6f 76 69 64 65 20 6d 65 74 68 6f 64 73 20 66 6f |ovide methods fo| 521s 00001080 72 20 67 65 74 74 69 6e 67 20 73 72 63 2f 64 73 |r getting src/ds| 521s 00001090 74 20 61 64 64 72 65 73 73 65 73 20 66 6f 72 20 |t addresses for | 521s 000010a0 74 68 61 74 20 70 61 72 74 69 63 75 6c 61 72 20 |that particular | 521s 000010b0 6c 61 79 65 72 2c 0a 77 68 69 6c 65 20 74 68 65 |layer,.while the| 521s 000010c0 20 66 69 6e 61 6c 20 6c 61 79 65 72 20 70 72 6f | final layer pro| 521s 000010d0 76 69 64 65 73 20 61 20 50 61 79 6c 6f 61 64 20 |vides a Payload | 521s 000010e0 66 75 6e 63 74 69 6f 6e 20 74 6f 20 67 65 74 20 |function to get | 521s 000010f0 70 61 79 6c 6f 61 64 20 64 61 74 61 2e 0a 54 68 |payload data..Th| 521s 00001100 69 73 20 69 73 20 68 65 6c 70 66 75 6c 2c 20 66 |is is helpful, f| 521s 00001110 6f 72 20 65 78 61 6d 70 6c 65 2c 20 74 6f 20 67 |or example, to g| 521s 00001120 65 74 20 70 61 79 6c 6f 61 64 73 20 66 6f 72 20 |et payloads for | 521s 00001130 61 6c 6c 20 70 61 63 6b 65 74 73 20 72 65 67 61 |all packets rega| 521s 00001140 72 64 6c 65 73 73 0a 6f 66 20 74 68 65 69 72 20 |rdless.of their | 521s 00001150 75 6e 64 65 72 6c 79 69 6e 67 20 64 61 74 61 20 |underlying data | 521s 00001160 74 79 70 65 3a 0a 3c 2f 70 3e 0a 3c 70 72 65 3e |type:.

.
|
521s         00001170  2f 2f 20 47 65 74 20 70  61 63 6b 65 74 73 20 66  |// Get packets f|
521s         00001180  72 6f 6d 20 73 6f 6d 65  20 73 6f 75 72 63 65 0a  |rom some source.|
521s         00001190  66 6f 72 20 70 61 63 6b  65 74 20 3a 3d 20 72 61  |for packet := ra|
521s         000011a0  6e 67 65 20 73 6f 6d 65  53 6f 75 72 63 65 20 7b  |nge someSource {|
521s         000011b0  0a 20 20 69 66 20 61 70  70 20 3a 3d 20 70 61 63  |.  if app := pac|
521s         000011c0  6b 65 74 2e 41 70 70 6c  69 63 61 74 69 6f 6e 4c  |ket.ApplicationL|
521s         000011d0  61 79 65 72 28 29 3b 20  61 70 70 20 21 3d 20 6e  |ayer(); app != n|
521s         000011e0  69 6c 20 7b 0a 20 20 20  20 69 66 20 73 74 72 69  |il {.    if stri|
521s         000011f0  6e 67 73 2e 43 6f 6e 74  61 69 6e 73 28 73 74 72  |ngs.Contains(str|
521s         00001200  69 6e 67 28 61 70 70 2e  50 61 79 6c 6f 61 64 28  |ing(app.Payload(|
521s         00001210  29 29 2c 20 26 23 33 34  3b 6d 61 67 69 63 20 73  |)), "magic s|
521s         00001220  74 72 69 6e 67 26 23 33  34 3b 29 20 7b 0a 20 20  |tring") {.  |
521s         00001230  20 20 20 20 66 6d 74 2e  50 72 69 6e 74 6c 6e 28  |    fmt.Println(|
521s         00001240  26 23 33 34 3b 46 6f 75  6e 64 20 6d 61 67 69 63  |"Found magic|
521s         00001250  20 73 74 72 69 6e 67 20  69 6e 20 61 20 70 61 63  | string in a pac|
521s         00001260  6b 65 74 21 26 23 33 34  3b 29 0a 20 20 20 20 7d  |ket!").    }|
521s         00001270  0a 20 20 7d 0a 7d 0a 3c  2f 70 72 65 3e 0a 3c 70  |.  }.}.
..A particularly| 521s 00001290 20 75 73 65 66 75 6c 20 6c 61 79 65 72 20 69 73 | useful layer is| 521s 000012a0 20 45 72 72 6f 72 4c 61 79 65 72 2c 20 77 68 69 | ErrorLayer, whi| 521s 000012b0 63 68 20 69 73 20 73 65 74 20 77 68 65 6e 65 76 |ch is set whenev| 521s 000012c0 65 72 20 74 68 65 72 65 26 23 33 39 3b 73 0a 61 |er there's.a| 521s 000012d0 6e 20 65 72 72 6f 72 20 70 61 72 73 69 6e 67 20 |n error parsing | 521s 000012e0 70 61 72 74 20 6f 66 20 74 68 65 20 70 61 63 6b |part of the pack| 521s 000012f0 65 74 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 70 61 |et..

.
pa|
521s         00001300  63 6b 65 74 20 3a 3d 20  67 6f 70 61 63 6b 65 74  |cket := gopacket|
521s         00001310  2e 4e 65 77 50 61 63 6b  65 74 28 6d 79 50 61 63  |.NewPacket(myPac|
521s         00001320  6b 65 74 44 61 74 61 2c  20 6c 61 79 65 72 73 2e  |ketData, layers.|
521s         00001330  4c 61 79 65 72 54 79 70  65 45 74 68 65 72 6e 65  |LayerTypeEtherne|
521s         00001340  74 2c 20 67 6f 70 61 63  6b 65 74 2e 44 65 66 61  |t, gopacket.Defa|
521s         00001350  75 6c 74 29 0a 69 66 20  65 72 72 20 3a 3d 20 70  |ult).if err := p|
521s         00001360  61 63 6b 65 74 2e 45 72  72 6f 72 4c 61 79 65 72  |acket.ErrorLayer|
521s         00001370  28 29 3b 20 65 72 72 20  21 3d 20 6e 69 6c 20 7b  |(); err != nil {|
521s         00001380  0a 20 20 66 6d 74 2e 50  72 69 6e 74 6c 6e 28 26  |.  fmt.Println(&|
521s         00001390  23 33 34 3b 45 72 72 6f  72 20 64 65 63 6f 64 69  |#34;Error decodi|
521s         000013a0  6e 67 20 73 6f 6d 65 20  70 61 72 74 20 6f 66 20  |ng some part of |
521s         000013b0  74 68 65 20 70 61 63 6b  65 74 3a 26 23 33 34 3b  |the packet:"|
521s         000013c0  2c 20 65 72 72 29 0a 7d  0a 3c 2f 70 72 65 3e 0a  |, err).}.
.| 521s 000013d0 3c 70 3e 0a 4e 6f 74 65 20 74 68 61 74 20 77 65 |

.Note that we| 521s 000013e0 20 64 6f 6e 26 23 33 39 3b 74 20 72 65 74 75 72 | don't retur| 521s 000013f0 6e 20 61 6e 20 65 72 72 6f 72 20 66 72 6f 6d 20 |n an error from | 521s 00001400 4e 65 77 50 61 63 6b 65 74 20 62 65 63 61 75 73 |NewPacket becaus| 521s 00001410 65 20 77 65 20 6d 61 79 20 68 61 76 65 20 64 65 |e we may have de| 521s 00001420 63 6f 64 65 64 0a 61 20 6e 75 6d 62 65 72 20 6f |coded.a number o| 521s 00001430 66 20 6c 61 79 65 72 73 20 73 75 63 63 65 73 73 |f layers success| 521s 00001440 66 75 6c 6c 79 20 62 65 66 6f 72 65 20 72 75 6e |fully before run| 521s 00001450 6e 69 6e 67 20 69 6e 74 6f 20 6f 75 72 20 65 72 |ning into our er| 521s 00001460 72 6f 6e 65 6f 75 73 20 6c 61 79 65 72 2e 20 20 |roneous layer. | 521s 00001470 59 6f 75 0a 6d 61 79 20 73 74 69 6c 6c 20 62 65 |You.may still be| 521s 00001480 20 61 62 6c 65 20 74 6f 20 67 65 74 20 79 6f 75 | able to get you| 521s 00001490 72 20 45 74 68 65 72 6e 65 74 20 61 6e 64 20 49 |r Ethernet and I| 521s 000014a0 50 76 34 20 6c 61 79 65 72 73 20 63 6f 72 72 65 |Pv4 layers corre| 521s 000014b0 63 74 6c 79 2c 20 65 76 65 6e 20 69 66 0a 79 6f |ctly, even if.yo| 521s 000014c0 75 72 20 54 43 50 20 6c 61 79 65 72 20 69 73 20 |ur TCP layer is | 521s 000014d0 6d 61 6c 66 6f 72 6d 65 64 2e 0a 3c 2f 70 3e 0a |malformed..

.| 521s 000014e0 3c 68 33 20 69 64 3d 22 46 6c 6f 77 5f 41 6e 64 |

Flow | 521s 00001500 41 6e 64 20 45 6e 64 70 6f 69 6e 74 3c 2f 68 33 |And Endpoint.

.gopacket h| 521s 00001520 61 73 20 74 77 6f 20 75 73 65 66 75 6c 20 6f 62 |as two useful ob| 521s 00001530 6a 65 63 74 73 2c 20 46 6c 6f 77 20 61 6e 64 20 |jects, Flow and | 521s 00001540 45 6e 64 70 6f 69 6e 74 2c 20 66 6f 72 20 63 6f |Endpoint, for co| 521s 00001550 6d 6d 75 6e 69 63 61 74 69 6e 67 20 69 6e 20 61 |mmunicating in a| 521s 00001560 20 70 72 6f 74 6f 63 6f 6c 0a 69 6e 64 65 70 65 | protocol.indepe| 521s 00001570 6e 64 65 6e 74 20 6d 61 6e 6e 65 72 20 74 68 65 |ndent manner the| 521s 00001580 20 66 61 63 74 20 74 68 61 74 20 61 20 70 61 63 | fact that a pac| 521s 00001590 6b 65 74 20 69 73 20 63 6f 6d 69 6e 67 20 66 72 |ket is coming fr| 521s 000015a0 6f 6d 20 41 20 61 6e 64 20 67 6f 69 6e 67 20 74 |om A and going t| 521s 000015b0 6f 20 42 2e 0a 54 68 65 20 67 65 6e 65 72 61 6c |o B..The general| 521s 000015c0 20 6c 61 79 65 72 20 74 79 70 65 73 20 4c 69 6e | layer types Lin| 521s 000015d0 6b 4c 61 79 65 72 2c 20 4e 65 74 77 6f 72 6b 4c |kLayer, NetworkL| 521s 000015e0 61 79 65 72 2c 20 61 6e 64 20 54 72 61 6e 73 70 |ayer, and Transp| 521s 000015f0 6f 72 74 4c 61 79 65 72 20 61 6c 6c 20 70 72 6f |ortLayer all pro| 521s 00001600 76 69 64 65 0a 6d 65 74 68 6f 64 73 20 66 6f 72 |vide.methods for| 521s 00001610 20 65 78 74 72 61 63 74 69 6e 67 20 74 68 65 69 | extracting thei| 521s 00001620 72 20 66 6c 6f 77 20 69 6e 66 6f 72 6d 61 74 69 |r flow informati| 521s 00001630 6f 6e 2c 20 77 69 74 68 6f 75 74 20 77 6f 72 72 |on, without worr| 521s 00001640 79 69 6e 67 20 61 62 6f 75 74 20 74 68 65 20 74 |ying about the t| 521s 00001650 79 70 65 0a 6f 66 20 74 68 65 20 75 6e 64 65 72 |ype.of the under| 521s 00001660 6c 79 69 6e 67 20 4c 61 79 65 72 2e 0a 3c 2f 70 |lying Layer...

.A Flow is | 521s 00001680 61 20 73 69 6d 70 6c 65 20 6f 62 6a 65 63 74 20 |a simple object | 521s 00001690 6d 61 64 65 20 75 70 20 6f 66 20 61 20 73 65 74 |made up of a set| 521s 000016a0 20 6f 66 20 74 77 6f 20 45 6e 64 70 6f 69 6e 74 | of two Endpoint| 521s 000016b0 73 2c 20 6f 6e 65 20 73 6f 75 72 63 65 20 61 6e |s, one source an| 521s 000016c0 64 20 6f 6e 65 0a 64 65 73 74 69 6e 61 74 69 6f |d one.destinatio| 521s 000016d0 6e 2e 20 20 49 74 20 64 65 74 61 69 6c 73 20 74 |n. It details t| 521s 000016e0 68 65 20 73 65 6e 64 65 72 20 61 6e 64 20 72 65 |he sender and re| 521s 000016f0 63 65 69 76 65 72 20 6f 66 20 74 68 65 20 4c 61 |ceiver of the La| 521s 00001700 79 65 72 20 6f 66 20 74 68 65 20 50 61 63 6b 65 |yer of the Packe| 521s 00001710 74 2e 0a 3c 2f 70 3e 0a 3c 70 3e 0a 41 6e 20 45 |t..

.

.An E| 521s 00001720 6e 64 70 6f 69 6e 74 20 69 73 20 61 20 68 61 73 |ndpoint is a has| 521s 00001730 68 61 62 6c 65 20 72 65 70 72 65 73 65 6e 74 61 |hable representa| 521s 00001740 74 69 6f 6e 20 6f 66 20 61 20 73 6f 75 72 63 65 |tion of a source| 521s 00001750 20 6f 72 20 64 65 73 74 69 6e 61 74 69 6f 6e 2e | or destination.| 521s 00001760 20 20 46 6f 72 0a 65 78 61 6d 70 6c 65 2c 20 66 | For.example, f| 521s 00001770 6f 72 20 4c 61 79 65 72 54 79 70 65 49 50 76 34 |or LayerTypeIPv4| 521s 00001780 2c 20 61 6e 20 45 6e 64 70 6f 69 6e 74 20 63 6f |, an Endpoint co| 521s 00001790 6e 74 61 69 6e 73 20 74 68 65 20 49 50 20 61 64 |ntains the IP ad| 521s 000017a0 64 72 65 73 73 20 62 79 74 65 73 20 66 6f 72 20 |dress bytes for | 521s 000017b0 61 20 76 34 0a 49 50 20 70 61 63 6b 65 74 2e 20 |a v4.IP packet. | 521s 000017c0 20 41 20 46 6c 6f 77 20 63 61 6e 20 62 65 20 62 | A Flow can be b| 521s 000017d0 72 6f 6b 65 6e 20 69 6e 74 6f 20 45 6e 64 70 6f |roken into Endpo| 521s 000017e0 69 6e 74 73 2c 20 61 6e 64 20 45 6e 64 70 6f 69 |ints, and Endpoi| 521s 000017f0 6e 74 73 20 63 61 6e 20 62 65 20 63 6f 6d 62 69 |nts can be combi| 521s 00001800 6e 65 64 0a 69 6e 74 6f 20 46 6c 6f 77 73 3a 0a |ned.into Flows:.| 521s 00001810 3c 2f 70 3e 0a 3c 70 72 65 3e 70 61 63 6b 65 74 |

.
packet|
521s         00001820  20 3a 3d 20 67 6f 70 61  63 6b 65 74 2e 4e 65 77  | := gopacket.New|
521s         00001830  50 61 63 6b 65 74 28 6d  79 50 61 63 6b 65 74 44  |Packet(myPacketD|
521s         00001840  61 74 61 2c 20 6c 61 79  65 72 73 2e 4c 61 79 65  |ata, layers.Laye|
521s         00001850  72 54 79 70 65 45 74 68  65 72 6e 65 74 2c 20 67  |rTypeEthernet, g|
521s         00001860  6f 70 61 63 6b 65 74 2e  4c 61 7a 79 29 0a 6e 65  |opacket.Lazy).ne|
521s         00001870  74 46 6c 6f 77 20 3a 3d  20 70 61 63 6b 65 74 2e  |tFlow := packet.|
521s         00001880  4e 65 74 77 6f 72 6b 4c  61 79 65 72 28 29 2e 4e  |NetworkLayer().N|
521s         00001890  65 74 77 6f 72 6b 46 6c  6f 77 28 29 0a 73 72 63  |etworkFlow().src|
521s         000018a0  2c 20 64 73 74 20 3a 3d  20 6e 65 74 46 6c 6f 77  |, dst := netFlow|
521s         000018b0  2e 45 6e 64 70 6f 69 6e  74 73 28 29 0a 72 65 76  |.Endpoints().rev|
521s         000018c0  65 72 73 65 46 6c 6f 77  20 3a 3d 20 67 6f 70 61  |erseFlow := gopa|
521s         000018d0  63 6b 65 74 2e 4e 65 77  46 6c 6f 77 28 64 73 74  |cket.NewFlow(dst|
521s         000018e0  2c 20 73 72 63 29 0a 3c  2f 70 72 65 3e 0a 3c 70  |, src).
..Both Endpoint | 521s 00001900 61 6e 64 20 46 6c 6f 77 20 6f 62 6a 65 63 74 73 |and Flow objects| 521s 00001910 20 63 61 6e 20 62 65 20 75 73 65 64 20 61 73 20 | can be used as | 521s 00001920 6d 61 70 20 6b 65 79 73 2c 20 61 6e 64 20 74 68 |map keys, and th| 521s 00001930 65 20 65 71 75 61 6c 69 74 79 0a 6f 70 65 72 61 |e equality.opera| 521s 00001940 74 6f 72 20 63 61 6e 20 63 6f 6d 70 61 72 65 20 |tor can compare | 521s 00001950 74 68 65 6d 2c 20 73 6f 20 79 6f 75 20 63 61 6e |them, so you can| 521s 00001960 20 65 61 73 69 6c 79 20 67 72 6f 75 70 20 74 6f | easily group to| 521s 00001970 67 65 74 68 65 72 20 61 6c 6c 20 70 61 63 6b 65 |gether all packe| 521s 00001980 74 73 0a 62 61 73 65 64 20 6f 6e 20 65 6e 64 70 |ts.based on endp| 521s 00001990 6f 69 6e 74 20 63 72 69 74 65 72 69 61 3a 0a 3c |oint criteria:.<| 521s 000019a0 2f 70 3e 0a 3c 70 72 65 3e 66 6c 6f 77 73 20 3a |/p>.
flows :|
521s         000019b0  3d 20 6d 61 70 5b 67 6f  70 61 63 6b 65 74 2e 45  |= map[gopacket.E|
521s         000019c0  6e 64 70 6f 69 6e 74 5d  63 68 61 6e 20 67 6f 70  |ndpoint]chan gop|
521s         000019d0  61 63 6b 65 74 2e 50 61  63 6b 65 74 0a 70 61 63  |acket.Packet.pac|
521s         000019e0  6b 65 74 20 3a 3d 20 67  6f 70 61 63 6b 65 74 2e  |ket := gopacket.|
521s         000019f0  4e 65 77 50 61 63 6b 65  74 28 6d 79 50 61 63 6b  |NewPacket(myPack|
521s         00001a00  65 74 44 61 74 61 2c 20  6c 61 79 65 72 73 2e 4c  |etData, layers.L|
521s         00001a10  61 79 65 72 54 79 70 65  45 74 68 65 72 6e 65 74  |ayerTypeEthernet|
521s         00001a20  2c 20 67 6f 70 61 63 6b  65 74 2e 4c 61 7a 79 29  |, gopacket.Lazy)|
521s         00001a30  0a 2f 2f 20 53 65 6e 64  20 61 6c 6c 20 54 43 50  |.// Send all TCP|
521s         00001a40  20 70 61 63 6b 65 74 73  20 74 6f 20 63 68 61 6e  | packets to chan|
521s         00001a50  6e 65 6c 73 20 62 61 73  65 64 20 6f 6e 20 74 68  |nels based on th|
521s         00001a60  65 69 72 20 64 65 73 74  69 6e 61 74 69 6f 6e 20  |eir destination |
521s         00001a70  70 6f 72 74 2e 0a 69 66  20 74 63 70 20 3a 3d 20  |port..if tcp := |
521s         00001a80  70 61 63 6b 65 74 2e 4c  61 79 65 72 28 6c 61 79  |packet.Layer(lay|
521s         00001a90  65 72 73 2e 4c 61 79 65  72 54 79 70 65 54 43 50  |ers.LayerTypeTCP|
521s         00001aa0  29 3b 20 74 63 70 20 21  3d 20 6e 69 6c 20 7b 0a  |); tcp != nil {.|
521s         00001ab0  20 20 66 6c 6f 77 73 5b  74 63 70 2e 54 72 61 6e  |  flows[tcp.Tran|
521s         00001ac0  73 70 6f 72 74 46 6c 6f  77 28 29 2e 44 73 74 28  |sportFlow().Dst(|
521s         00001ad0  29 5d 20 26 6c 74 3b 2d  20 70 61 63 6b 65 74 0a  |)] <- packet.|
521s         00001ae0  7d 0a 2f 2f 20 4c 6f 6f  6b 20 66 6f 72 20 61 6c  |}.// Look for al|
521s         00001af0  6c 20 70 61 63 6b 65 74  73 20 77 69 74 68 20 74  |l packets with t|
521s         00001b00  68 65 20 73 61 6d 65 20  73 6f 75 72 63 65 20 61  |he same source a|
521s         00001b10  6e 64 20 64 65 73 74 69  6e 61 74 69 6f 6e 20 6e  |nd destination n|
521s         00001b20  65 74 77 6f 72 6b 20 61  64 64 72 65 73 73 0a 69  |etwork address.i|
521s         00001b30  66 20 6e 65 74 20 3a 3d  20 70 61 63 6b 65 74 2e  |f net := packet.|
521s         00001b40  4e 65 74 77 6f 72 6b 4c  61 79 65 72 28 29 3b 20  |NetworkLayer(); |
521s         00001b50  6e 65 74 20 21 3d 20 6e  69 6c 20 7b 0a 20 20 73  |net != nil {.  s|
521s         00001b60  72 63 2c 20 64 73 74 20  3a 3d 20 6e 65 74 2e 4e  |rc, dst := net.N|
521s         00001b70  65 74 77 6f 72 6b 46 6c  6f 77 28 29 2e 45 6e 64  |etworkFlow().End|
521s         00001b80  70 6f 69 6e 74 73 28 29  0a 20 20 69 66 20 73 72  |points().  if sr|
521s         00001b90  63 20 3d 3d 20 64 73 74  20 7b 0a 20 20 20 20 66  |c == dst {.    f|
521s         00001ba0  6d 74 2e 50 72 69 6e 74  6c 6e 28 26 23 33 34 3b  |mt.Println("|
521s         00001bb0  46 69 73 68 79 20 70 61  63 6b 65 74 20 68 61 73  |Fishy packet has|
521s         00001bc0  20 73 61 6d 65 20 6e 65  74 77 6f 72 6b 20 73 6f  | same network so|
521s         00001bd0  75 72 63 65 20 61 6e 64  20 64 73 74 3a 20 25 73  |urce and dst: %s|
521s         00001be0  26 23 33 34 3b 2c 20 73  72 63 29 0a 20 20 7d 0a  |", src).  }.|
521s         00001bf0  7d 0a 2f 2f 20 46 69 6e  64 20 61 6c 6c 20 70 61  |}.// Find all pa|
521s         00001c00  63 6b 65 74 73 20 63 6f  6d 69 6e 67 20 66 72 6f  |ckets coming fro|
521s         00001c10  6d 20 55 44 50 20 70 6f  72 74 20 31 30 30 30 20  |m UDP port 1000 |
521s         00001c20  74 6f 20 55 44 50 20 70  6f 72 74 20 35 30 30 0a  |to UDP port 500.|
521s         00001c30  69 6e 74 65 72 65 73 74  69 6e 67 46 6c 6f 77 20  |interestingFlow |
521s         00001c40  3a 3d 20 67 6f 70 61 63  6b 65 74 2e 4e 65 77 46  |:= gopacket.NewF|
521s         00001c50  6c 6f 77 28 6c 61 79 65  72 73 2e 4e 65 77 55 44  |low(layers.NewUD|
521s         00001c60  50 50 6f 72 74 45 6e 64  70 6f 69 6e 74 28 31 30  |PPortEndpoint(10|
521s         00001c70  30 30 29 2c 20 6c 61 79  65 72 73 2e 4e 65 77 55  |00), layers.NewU|
521s         00001c80  44 50 50 6f 72 74 45 6e  64 70 6f 69 6e 74 28 35  |DPPortEndpoint(5|
521s         00001c90  30 30 29 29 0a 69 66 20  74 20 3a 3d 20 70 61 63  |00)).if t := pac|
521s         00001ca0  6b 65 74 2e 4e 65 74 77  6f 72 6b 4c 61 79 65 72  |ket.NetworkLayer|
521s         00001cb0  28 29 3b 20 74 20 21 3d  20 6e 69 6c 20 26 61 6d  |(); t != nil &am|
521s         00001cc0  70 3b 26 61 6d 70 3b 20  74 2e 54 72 61 6e 73 70  |p;& t.Transp|
521s         00001cd0  6f 72 74 46 6c 6f 77 28  29 20 3d 3d 20 69 6e 74  |ortFlow() == int|
521s         00001ce0  65 72 65 73 74 69 6e 67  46 6c 6f 77 20 7b 0a 20  |erestingFlow {. |
521s         00001cf0  20 66 6d 74 2e 50 72 69  6e 74 6c 6e 28 26 23 33  | fmt.Println(|
521s         00001d00  34 3b 46 6f 75 6e 64 20  74 68 61 74 20 55 44 50  |4;Found that UDP|
521s         00001d10  20 66 6c 6f 77 20 49 20  77 61 73 20 6c 6f 6f 6b  | flow I was look|
521s         00001d20  69 6e 67 20 66 6f 72 21  26 23 33 34 3b 29 0a 7d  |ing for!").}|
521s         00001d30  0a 3c 2f 70 72 65 3e 0a  3c 68 33 20 69 64 3d 22  |.
.

I| 521s 00001d60 6d 70 6c 65 6d 65 6e 74 69 6e 67 20 59 6f 75 72 |mplementing Your| 521s 00001d70 20 4f 77 6e 20 44 65 63 6f 64 65 72 3c 2f 68 33 | Own Decoder.

.If your ne| 521s 00001d90 74 77 6f 72 6b 20 68 61 73 20 73 6f 6d 65 20 73 |twork has some s| 521s 00001da0 74 72 61 6e 67 65 20 65 6e 63 61 70 73 75 6c 61 |trange encapsula| 521s 00001db0 74 69 6f 6e 2c 20 79 6f 75 20 63 61 6e 20 69 6d |tion, you can im| 521s 00001dc0 70 6c 65 6d 65 6e 74 20 79 6f 75 72 20 6f 77 6e |plement your own| 521s 00001dd0 0a 64 65 63 6f 64 65 72 2e 20 20 49 6e 20 74 68 |.decoder. In th| 521s 00001de0 69 73 20 65 78 61 6d 70 6c 65 2c 20 77 65 20 68 |is example, we h| 521s 00001df0 61 6e 64 6c 65 20 45 74 68 65 72 6e 65 74 20 70 |andle Ethernet p| 521s 00001e00 61 63 6b 65 74 73 20 77 68 69 63 68 20 61 72 65 |ackets which are| 521s 00001e10 20 65 6e 63 61 70 73 75 6c 61 74 65 64 0a 69 6e | encapsulated.in| 521s 00001e20 20 61 20 34 2d 62 79 74 65 20 68 65 61 64 65 72 | a 4-byte header| 521s 00001e30 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 2f 2f 20 43 |..

.
// C|
521s         00001e40  72 65 61 74 65 20 61 20  6c 61 79 65 72 20 74 79  |reate a layer ty|
521s         00001e50  70 65 2c 20 73 68 6f 75  6c 64 20 62 65 20 75 6e  |pe, should be un|
521s         00001e60  69 71 75 65 20 61 6e 64  20 68 69 67 68 2c 20 73  |ique and high, s|
521s         00001e70  6f 20 69 74 20 64 6f 65  73 6e 26 23 33 39 3b 74  |o it doesn't|
521s         00001e80  20 63 6f 6e 66 6c 69 63  74 2c 0a 2f 2f 20 67 69  | conflict,.// gi|
521s         00001e90  76 69 6e 67 20 69 74 20  61 20 6e 61 6d 65 20 61  |ving it a name a|
521s         00001ea0  6e 64 20 61 20 64 65 63  6f 64 65 72 20 74 6f 20  |nd a decoder to |
521s         00001eb0  75 73 65 2e 0a 76 61 72  20 4d 79 4c 61 79 65 72  |use..var MyLayer|
521s         00001ec0  54 79 70 65 20 3d 20 67  6f 70 61 63 6b 65 74 2e  |Type = gopacket.|
521s         00001ed0  52 65 67 69 73 74 65 72  4c 61 79 65 72 54 79 70  |RegisterLayerTyp|
521s         00001ee0  65 28 31 32 33 34 35 2c  20 26 23 33 34 3b 4d 79  |e(12345, "My|
521s         00001ef0  4c 61 79 65 72 54 79 70  65 26 23 33 34 3b 2c 20  |LayerType", |
521s         00001f00  67 6f 70 61 63 6b 65 74  2e 44 65 63 6f 64 65 46  |gopacket.DecodeF|
521s         00001f10  75 6e 63 28 64 65 63 6f  64 65 4d 79 4c 61 79 65  |unc(decodeMyLaye|
521s         00001f20  72 29 29 0a 0a 2f 2f 20  49 6d 70 6c 65 6d 65 6e  |r))..// Implemen|
521s         00001f30  74 20 6d 79 20 6c 61 79  65 72 0a 74 79 70 65 20  |t my layer.type |
521s         00001f40  4d 79 4c 61 79 65 72 20  73 74 72 75 63 74 20 7b  |MyLayer struct {|
521s         00001f50  0a 20 20 53 74 72 61 6e  67 65 48 65 61 64 65 72  |.  StrangeHeader|
521s         00001f60  20 5b 5d 62 79 74 65 0a  20 20 70 61 79 6c 6f 61  | []byte.  payloa|
521s         00001f70  64 20 5b 5d 62 79 74 65  0a 7d 0a 66 75 6e 63 20  |d []byte.}.func |
521s         00001f80  28 6d 20 4d 79 4c 61 79  65 72 29 20 4c 61 79 65  |(m MyLayer) Laye|
521s         00001f90  72 54 79 70 65 28 29 20  4c 61 79 65 72 54 79 70  |rType() LayerTyp|
521s         00001fa0  65 20 7b 20 72 65 74 75  72 6e 20 4d 79 4c 61 79  |e { return MyLay|
521s         00001fb0  65 72 54 79 70 65 20 7d  0a 66 75 6e 63 20 28 6d  |erType }.func (m|
521s         00001fc0  20 4d 79 4c 61 79 65 72  29 20 4c 61 79 65 72 43  | MyLayer) LayerC|
521s         00001fd0  6f 6e 74 65 6e 74 73 28  29 20 5b 5d 62 79 74 65  |ontents() []byte|
521s         00001fe0  20 7b 20 72 65 74 75 72  6e 20 6d 2e 53 74 72 61  | { return m.Stra|
521s         00001ff0  6e 67 65 48 65 61 64 65  72 20 7d 0a 66 75 6e 63  |ngeHeader }.func|
521s         00002000  20 28 6d 20 4d 79 4c 61  79 65 72 29 20 4c 61 79  | (m MyLayer) Lay|
521s         00002010  65 72 50 61 79 6c 6f 61  64 28 29 20 5b 5d 62 79  |erPayload() []by|
521s         00002020  74 65 20 7b 20 72 65 74  75 72 6e 20 6d 2e 70 61  |te { return m.pa|
521s         00002030  79 6c 6f 61 64 20 7d 0a  0a 2f 2f 20 4e 6f 77 20  |yload }..// Now |
521s         00002040  69 6d 70 6c 65 6d 65 6e  74 20 61 20 64 65 63 6f  |implement a deco|
521s         00002050  64 65 72 2e 2e 2e 20 74  68 69 73 20 6f 6e 65 20  |der... this one |
521s         00002060  73 74 72 69 70 73 20 6f  66 66 20 74 68 65 20 66  |strips off the f|
521s         00002070  69 72 73 74 20 34 20 62  79 74 65 73 20 6f 66 20  |irst 4 bytes of |
521s         00002080  74 68 65 0a 2f 2f 20 70  61 63 6b 65 74 2e 0a 66  |the.// packet..f|
521s         00002090  75 6e 63 20 64 65 63 6f  64 65 4d 79 4c 61 79 65  |unc decodeMyLaye|
521s         000020a0  72 28 64 61 74 61 20 5b  5d 62 79 74 65 2c 20 70  |r(data []byte, p|
521s         000020b0  20 67 6f 70 61 63 6b 65  74 2e 50 61 63 6b 65 74  | gopacket.Packet|
521s         000020c0  42 75 69 6c 64 65 72 29  20 65 72 72 6f 72 20 7b  |Builder) error {|
521s         000020d0  0a 20 20 2f 2f 20 43 72  65 61 74 65 20 6d 79 20  |.  // Create my |
521s         000020e0  6c 61 79 65 72 0a 20 20  70 2e 41 64 64 4c 61 79  |layer.  p.AddLay|
521s         000020f0  65 72 28 26 61 6d 70 3b  4d 79 4c 61 79 65 72 7b  |er(&MyLayer{|
521s         00002100  64 61 74 61 5b 3a 34 5d  2c 20 64 61 74 61 5b 34  |data[:4], data[4|
521s         00002110  3a 5d 7d 29 0a 20 20 2f  2f 20 44 65 74 65 72 6d  |:]}).  // Determ|
521s         00002120  69 6e 65 20 68 6f 77 20  74 6f 20 68 61 6e 64 6c  |ine how to handl|
521s         00002130  65 20 74 68 65 20 72 65  73 74 20 6f 66 20 74 68  |e the rest of th|
521s         00002140  65 20 70 61 63 6b 65 74  0a 20 20 72 65 74 75 72  |e packet.  retur|
521s         00002150  6e 20 70 2e 4e 65 78 74  44 65 63 6f 64 65 72 28  |n p.NextDecoder(|
521s         00002160  6c 61 79 65 72 73 2e 4c  61 79 65 72 54 79 70 65  |layers.LayerType|
521s         00002170  45 74 68 65 72 6e 65 74  29 0a 7d 0a 0a 2f 2f 20  |Ethernet).}..// |
521s         00002180  46 69 6e 61 6c 6c 79 2c  20 64 65 63 6f 64 65 20  |Finally, decode |
521s         00002190  79 6f 75 72 20 70 61 63  6b 65 74 73 3a 0a 70 20  |your packets:.p |
521s         000021a0  3a 3d 20 67 6f 70 61 63  6b 65 74 2e 4e 65 77 50  |:= gopacket.NewP|
521s         000021b0  61 63 6b 65 74 28 64 61  74 61 2c 20 4d 79 4c 61  |acket(data, MyLa|
521s         000021c0  79 65 72 54 79 70 65 2c  20 67 6f 70 61 63 6b 65  |yerType, gopacke|
521s         000021d0  74 2e 4c 61 7a 79 29 0a  3c 2f 70 72 65 3e 0a 3c  |t.Lazy).
.<| 521s 000021e0 70 3e 0a 53 65 65 20 74 68 65 20 64 6f 63 73 20 |p>.See the docs | 521s 000021f0 66 6f 72 20 44 65 63 6f 64 65 72 20 61 6e 64 20 |for Decoder and | 521s 00002200 50 61 63 6b 65 74 42 75 69 6c 64 65 72 20 66 6f |PacketBuilder fo| 521s 00002210 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 20 6f |r more details o| 521s 00002220 6e 20 68 6f 77 20 63 6f 64 69 6e 67 0a 64 65 63 |n how coding.dec| 521s 00002230 6f 64 65 72 73 20 77 6f 72 6b 73 2c 20 6f 72 20 |oders works, or | 521s 00002240 6c 6f 6f 6b 20 61 74 20 52 65 67 69 73 74 65 72 |look at Register| 521s 00002250 4c 61 79 65 72 54 79 70 65 20 61 6e 64 20 52 65 |LayerType and Re| 521s 00002260 67 69 73 74 65 72 45 6e 64 70 6f 69 6e 74 54 79 |gisterEndpointTy| 521s 00002270 70 65 20 74 6f 20 73 65 65 20 68 6f 77 0a 74 6f |pe to see how.to| 521s 00002280 20 61 64 64 20 6c 61 79 65 72 2f 65 6e 64 70 6f | add layer/endpo| 521s 00002290 69 6e 74 20 74 79 70 65 73 20 74 6f 20 67 6f 70 |int types to gop| 521s 000022a0 61 63 6b 65 74 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 |acket..

.....| 521s 000022b0 3c 2f 64 69 76 3e 0a 09 09 3c 2f 64 69 76 3e 0a |

....| 521s 000022c0 09 09 0a 09 0a 09 09 3c 68 32 20 69 64 3d 22 70 |.......

Index<| 521s 000022e0 2f 68 32 3e 0a 09 09 3c 21 2d 2d 20 54 61 62 6c |/h2>..........
.......| 521s 00002360 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 |......
Variables| 521s 00002390 3c 2f 64 64 3e 0a 09 09 09 0a 09 09 09 0a 09 09 |
...........| 521s 000023a0 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c |...........
<| 521s 000023b0 61 20 68 72 65 66 3d 22 23 41 70 70 6c 69 63 61 |a href="#Applica| 521s 000023c0 74 69 6f 6e 4c 61 79 65 72 22 3e 74 79 70 65 20 |tionLayer">type | 521s 000023d0 41 70 70 6c 69 63 61 74 69 6f 6e 4c 61 79 65 72 |ApplicationLayer| 521s 000023e0 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 000023f0 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002400 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 43 |.
type| 521s 00002420 20 43 61 70 74 75 72 65 49 6e 66 6f 3c 2f 61 3e | CaptureInfo| 521s 00002430 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a |
...........| 521s 00002440 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 |.............type D| 521s 00002470 65 63 6f 64 65 46 61 69 6c 75 72 65 3c 2f 61 3e |ecodeFailure| 521s 00002480 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a |...........| 521s 00002490 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 000024a0 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   func| 521s 000024d0 20 28 64 20 2a 44 65 63 6f 64 65 46 61 69 6c 75 | (d *DecodeFailu| 521s 000024e0 72 65 29 20 45 72 72 6f 72 28 29 20 65 72 72 6f |re) Error() erro| 521s 000024f0 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |r
......| 521s 00002500 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 00002510 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   func (d *Dec| 521s 00002550 6f 64 65 46 61 69 6c 75 72 65 29 20 4c 61 79 65 |odeFailure) Laye| 521s 00002560 72 43 6f 6e 74 65 6e 74 73 28 29 20 5b 5d 62 79 |rContents() []by| 521s 00002570 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |te
.....| 521s 00002580 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00002590 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func (d *Dec| 521s 000025d0 6f 64 65 46 61 69 6c 75 72 65 29 20 4c 61 79 65 |odeFailure) Laye| 521s 000025e0 72 50 61 79 6c 6f 61 64 28 29 20 5b 5d 62 79 74 |rPayload() []byt| 521s 000025f0 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |e
......| 521s 00002600 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 00002610 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   | 521s 00002640 66 75 6e 63 20 28 64 20 2a 44 65 63 6f 64 65 46 |func (d *DecodeF| 521s 00002650 61 69 6c 75 72 65 29 20 4c 61 79 65 72 54 79 70 |ailure) LayerTyp| 521s 00002660 65 28 29 20 4c 61 79 65 72 54 79 70 65 3c 2f 61 |e() LayerType
..........| 521s 00002680 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 |.......
 | 521s 00002690 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 |;   func (d| 521s 000026c0 20 2a 44 65 63 6f 64 65 46 61 69 6c 75 72 65 29 | *DecodeFailure)| 521s 000026d0 20 53 74 72 69 6e 67 28 29 20 73 74 72 69 6e 67 | String() string| 521s 000026e0 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 000026f0 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 3e |............
| 521s 00002700 3c 61 20 68 72 65 66 3d 22 23 44 65 63 6f 64 65 |type Decod| 521s 00002720 65 46 75 6e 63 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |eFunc
..| 521s 00002730 09 09 09 0a 09 09 09 09 0a 09 09 09 09 09 0a 09 |................| 521s 00002740 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 |....
  &| 521s 00002750 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 |nbsp; func (d Decod| 521s 00002780 65 46 75 6e 63 29 20 44 65 63 6f 64 65 28 64 61 |eFunc) Decode(da| 521s 00002790 74 61 20 5b 5d 62 79 74 65 2c 20 70 20 50 61 63 |ta []byte, p Pac| 521s 000027a0 6b 65 74 42 75 69 6c 64 65 72 29 20 65 72 72 6f |ketBuilder) erro| 521s 000027b0 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |r
......| 521s 000027c0 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 |.............type D| 521s 000027f0 65 63 6f 64 65 4f 70 74 69 6f 6e 73 3c 2f 61 3e |ecodeOptions| 521s 00002800 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a |...........| 521s 00002810 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 |.............type Decoder| 521s 00002840 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |.......| 521s 00002850 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002860 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 45 |.
type En| 521s 00002880 64 70 6f 69 6e 74 3c 2f 61 3e 3c 2f 64 64 3e 0a |dpoint
.| 521s 00002890 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 000028a0 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 000028b0 3b 20 3c 61 20 68 72 65 66 3d 22 23 4e 65 77 45 |; func Ne| 521s 000028d0 77 45 6e 64 70 6f 69 6e 74 28 74 79 70 20 45 6e |wEndpoint(typ En| 521s 000028e0 64 70 6f 69 6e 74 54 79 70 65 2c 20 72 61 77 20 |dpointType, raw | 521s 000028f0 5b 5d 62 79 74 65 29 20 45 6e 64 70 6f 69 6e 74 |[]byte) Endpoint| 521s 00002900 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 00002910 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00002920 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00002930 20 3c 61 20 68 72 65 66 3d 22 23 45 6e 64 70 6f | func (e Endpoi| 521s 00002960 6e 74 29 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 |nt) EndpointType| 521s 00002970 28 29 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 3c |() EndpointType<| 521s 00002980 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 |/a>........| 521s 00002990 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 |.........
&nb| 521s 000029a0 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 |sp;   func (a | 521s 000029d0 45 6e 64 70 6f 69 6e 74 29 20 4c 65 73 73 54 68 |Endpoint) LessTh| 521s 000029e0 61 6e 28 62 20 45 6e 64 70 6f 69 6e 74 29 20 62 |an(b Endpoint) b| 521s 000029f0 6f 6f 6c 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |ool
....| 521s 00002a00 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 |.............    <| 521s 00002a20 61 20 68 72 65 66 3d 22 23 45 6e 64 70 6f 69 6e |a href="#Endpoin| 521s 00002a30 74 2e 52 61 77 22 3e 66 75 6e 63 20 28 65 20 45 |t.Raw">func (e E| 521s 00002a40 6e 64 70 6f 69 6e 74 29 20 52 61 77 28 29 20 5b |ndpoint) Raw() [| 521s 00002a50 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |]byte..| 521s 00002a60 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00002a70 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00002a80 20 3c 61 20 68 72 65 66 3d 22 23 45 6e 64 70 6f | func| 521s 00002aa0 20 28 65 20 45 6e 64 70 6f 69 6e 74 29 20 53 74 | (e Endpoint) St| 521s 00002ab0 72 69 6e 67 28 29 20 73 74 72 69 6e 67 3c 2f 61 |ring() string..........| 521s 00002ad0 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 |.........
type Endpoi| 521s 00002b00 6e 74 54 79 70 65 3c 2f 61 3e 3c 2f 64 64 3e 0a |ntType
.| 521s 00002b10 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 00002b20 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 00002b30 3b 20 3c 61 20 68 72 65 66 3d 22 23 52 65 67 69 |; func RegisterE| 521s 00002b60 6e 64 70 6f 69 6e 74 54 79 70 65 28 6e 75 6d 20 |ndpointType(num | 521s 00002b70 69 6e 74 2c 20 6d 65 74 61 20 45 6e 64 70 6f 69 |int, meta Endpoi| 521s 00002b80 6e 74 54 79 70 65 4d 65 74 61 64 61 74 61 29 20 |ntTypeMetadata) | 521s 00002b90 45 6e 64 70 6f 69 6e 74 54 79 70 65 3c 2f 61 3e |EndpointType| 521s 00002ba0 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a |
...........| 521s 00002bb0 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 00002bc0 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   func| 521s 00002bf0 20 28 65 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 | (e EndpointType| 521s 00002c00 29 20 53 74 72 69 6e 67 28 29 20 73 74 72 69 6e |) String() strin| 521s 00002c10 67 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |g
......| 521s 00002c20 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 |.............type EndpointTy| 521s 00002c60 70 65 4d 65 74 61 64 61 74 61 3c 2f 61 3e 3c 2f |peMetadata.............| 521s 00002c80 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c |...........
<| 521s 00002c90 61 20 68 72 65 66 3d 22 23 45 72 72 6f 72 4c 61 |a href="#ErrorLa| 521s 00002ca0 79 65 72 22 3e 74 79 70 65 20 45 72 72 6f 72 4c |yer">type ErrorL| 521s 00002cb0 61 79 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 |ayer
...| 521s 00002cc0 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 00002cd0 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 |.....
type Fl| 521s 00002cf0 6f 77 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |ow
.....| 521s 00002d00 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00002d10 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func | 521s 00002d40 46 6c 6f 77 46 72 6f 6d 45 6e 64 70 6f 69 6e 74 |FlowFromEndpoint| 521s 00002d50 73 28 73 72 63 2c 20 64 73 74 20 45 6e 64 70 6f |s(src, dst Endpo| 521s 00002d60 69 6e 74 29 20 28 5f 20 46 6c 6f 77 2c 20 65 72 |int) (_ Flow, er| 521s 00002d70 72 20 65 72 72 6f 72 29 3c 2f 61 3e 3c 2f 64 64 |r error)...............| 521s 00002d90 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 |..
  &nb| 521s 00002da0 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 4e 65 |sp; func NewF| 521s 00002dc0 6c 6f 77 28 74 20 45 6e 64 70 6f 69 6e 74 54 79 |low(t EndpointTy| 521s 00002dd0 70 65 2c 20 73 72 63 2c 20 64 73 74 20 5b 5d 62 |pe, src, dst []b| 521s 00002de0 79 74 65 29 20 46 6c 6f 77 3c 2f 61 3e 3c 2f 64 |yte) Flow..............| 521s 00002e00 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 |........
&nbs| 521s 00002e10 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 |p;   fu| 521s 00002e30 6e 63 20 28 66 20 46 6c 6f 77 29 20 44 73 74 28 |nc (f Flow) Dst(| 521s 00002e40 29 20 28 64 73 74 20 45 6e 64 70 6f 69 6e 74 29 |) (dst Endpoint)| 521s 00002e50 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 00002e60 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e |..........
&n| 521s 00002e70 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 |bsp;   func (f| 521s 00002ea0 20 46 6c 6f 77 29 20 45 6e 64 70 6f 69 6e 74 54 | Flow) EndpointT| 521s 00002eb0 79 70 65 28 29 20 45 6e 64 70 6f 69 6e 74 54 79 |ype() EndpointTy| 521s 00002ec0 70 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |pe
.....| 521s 00002ed0 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00002ee0 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func (f | 521s 00002f10 46 6c 6f 77 29 20 45 6e 64 70 6f 69 6e 74 73 28 |Flow) Endpoints(| 521s 00002f20 29 20 28 73 72 63 2c 20 64 73 74 20 45 6e 64 70 |) (src, dst Endp| 521s 00002f30 6f 69 6e 74 29 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |oint)
..| 521s 00002f40 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00002f50 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00002f60 20 3c 61 20 68 72 65 66 3d 22 23 46 6c 6f 77 2e | func (f| 521s 00002f80 20 46 6c 6f 77 29 20 52 65 76 65 72 73 65 28 29 | Flow) Reverse()| 521s 00002f90 20 46 6c 6f 77 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 | Flow..| 521s 00002fa0 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00002fb0 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00002fc0 20 3c 61 20 68 72 65 66 3d 22 23 46 6c 6f 77 2e | func (f Flo| 521s 00002fe0 77 29 20 53 72 63 28 29 20 28 73 72 63 20 45 6e |w) Src() (src En| 521s 00002ff0 64 70 6f 69 6e 74 29 3c 2f 61 3e 3c 2f 64 64 3e |dpoint)| 521s 00003000 0a 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 |................| 521s 00003010 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 |.
  &nbs| 521s 00003020 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 46 6c 6f |p; func (| 521s 00003040 66 20 46 6c 6f 77 29 20 53 74 72 69 6e 67 28 29 |f Flow) String()| 521s 00003050 20 73 74 72 69 6e 67 3c 2f 61 3e 3c 2f 64 64 3e | string
| 521s 00003060 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00003070 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 |...
type Lay| 521s 00003090 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |er
.....| 521s 000030a0 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 000030b0 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 |...
typ| 521s 000030d0 65 20 4c 61 79 65 72 43 6c 61 73 73 3c 2f 61 3e |e LayerClass| 521s 000030e0 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 09 |
...........| 521s 000030f0 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b |......
 | 521s 00003100 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d |   func NewLayerCl| 521s 00003130 61 73 73 28 74 79 70 65 73 20 5b 5d 4c 61 79 65 |ass(types []Laye| 521s 00003140 72 54 79 70 65 29 20 4c 61 79 65 72 43 6c 61 73 |rType) LayerClas| 521s 00003150 73 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |s
......| 521s 00003160 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 00003170 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 |..
t| 521s 00003190 79 70 65 20 4c 61 79 65 72 43 6c 61 73 73 4d 61 |ype LayerClassMa| 521s 000031a0 70 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |p
......| 521s 000031b0 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 000031c0 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   func Ne| 521s 000031f0 77 4c 61 79 65 72 43 6c 61 73 73 4d 61 70 28 74 |wLayerClassMap(t| 521s 00003200 79 70 65 73 20 5b 5d 4c 61 79 65 72 54 79 70 65 |ypes []LayerType| 521s 00003210 29 20 4c 61 79 65 72 43 6c 61 73 73 4d 61 70 3c |) LayerClassMap<| 521s 00003220 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 |/a>
........| 521s 00003230 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 |..............    | 521s 00003250 3c 61 20 68 72 65 66 3d 22 23 4c 61 79 65 72 43 |func (m LayerC| 521s 00003280 6c 61 73 73 4d 61 70 29 20 43 6f 6e 74 61 69 6e |lassMap) Contain| 521s 00003290 73 28 74 20 4c 61 79 65 72 54 79 70 65 29 20 62 |s(t LayerType) b| 521s 000032a0 6f 6f 6c 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |ool....| 521s 000032b0 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 000032c0 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 4c 61 79 |dd>ty| 521s 000032e0 70 65 20 4c 61 79 65 72 43 6c 61 73 73 53 6c 69 |pe LayerClassSli| 521s 000032f0 63 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |ce.....| 521s 00003300 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00003310 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func| 521s 00003340 20 4e 65 77 4c 61 79 65 72 43 6c 61 73 73 53 6c | NewLayerClassSl| 521s 00003350 69 63 65 28 74 79 70 65 73 20 5b 5d 4c 61 79 65 |ice(types []Laye| 521s 00003360 72 54 79 70 65 29 20 4c 61 79 65 72 43 6c 61 73 |rType) LayerClas| 521s 00003370 73 53 6c 69 63 65 3c 2f 61 3e 3c 2f 64 64 3e 0a |sSlice
.| 521s 00003380 09 09 09 09 0a 09 09 09 09 0a 09 09 09 09 09 0a |................| 521s 00003390 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 |.....
  | 521s 000033a0 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 |  func | 521s 000033d0 28 73 20 4c 61 79 65 72 43 6c 61 73 73 53 6c 69 |(s LayerClassSli| 521s 000033e0 63 65 29 20 43 6f 6e 74 61 69 6e 73 28 74 20 4c |ce) Contains(t L| 521s 000033f0 61 79 65 72 54 79 70 65 29 20 62 6f 6f 6c 3c 2f |ayerType) bool
.........| 521s 00003410 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 |..........
type LayerTyp| 521s 00003440 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |e
......| 521s 00003450 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 00003460 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   func R| 521s 00003490 65 67 69 73 74 65 72 4c 61 79 65 72 54 79 70 65 |egisterLayerType| 521s 000034a0 28 6e 75 6d 20 69 6e 74 2c 20 6d 65 74 61 20 4c |(num int, meta L| 521s 000034b0 61 79 65 72 54 79 70 65 4d 65 74 61 64 61 74 61 |ayerTypeMetadata| 521s 000034c0 29 20 4c 61 79 65 72 54 79 70 65 3c 2f 61 3e 3c |) LayerType<| 521s 000034d0 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a 09 |/dd>............| 521s 000034e0 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e |..........
&n| 521s 000034f0 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 |bsp;   func (t | 521s 00003520 4c 61 79 65 72 54 79 70 65 29 20 44 65 63 6f 64 |LayerType) Decod| 521s 00003530 65 28 64 61 74 61 20 5b 5d 62 79 74 65 2c 20 63 |e(data []byte, c| 521s 00003540 20 50 61 63 6b 65 74 42 75 69 6c 64 65 72 29 20 | PacketBuilder) | 521s 00003550 65 72 72 6f 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |error
..| 521s 00003560 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00003570 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00003580 20 3c 61 20 68 72 65 66 3d 22 23 4c 61 79 65 72 | fun| 521s 000035a0 63 20 28 74 20 4c 61 79 65 72 54 79 70 65 29 20 |c (t LayerType) | 521s 000035b0 53 74 72 69 6e 67 28 29 20 28 73 20 73 74 72 69 |String() (s stri| 521s 000035c0 6e 67 29 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |ng)....| 521s 000035d0 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 000035e0 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 4c 61 79 |dd>| 521s 00003600 74 79 70 65 20 4c 61 79 65 72 54 79 70 65 4d 65 |type LayerTypeMe| 521s 00003610 74 61 64 61 74 61 3c 2f 61 3e 3c 2f 64 64 3e 0a |tadata.| 521s 00003620 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00003630 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 |.......
| 521s 00003650 74 79 70 65 20 4c 69 6e 6b 4c 61 79 65 72 3c 2f |type LinkLayer
.........| 521s 00003670 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 00003680 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 4e 65 74 |dd>type | 521s 000036a0 4e 65 74 77 6f 72 6b 4c 61 79 65 72 3c 2f 61 3e |NetworkLayer| 521s 000036b0 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a |...........| 521s 000036c0 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 |.............type Packet.........| 521s 00003700 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 |........
&nbs| 521s 00003710 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 |p;   f| 521s 00003730 75 6e 63 20 4e 65 77 50 61 63 6b 65 74 28 64 61 |unc NewPacket(da| 521s 00003740 74 61 20 5b 5d 62 79 74 65 2c 20 66 69 72 73 74 |ta []byte, first| 521s 00003750 4c 61 79 65 72 44 65 63 6f 64 65 72 20 44 65 63 |LayerDecoder Dec| 521s 00003760 6f 64 65 72 2c 20 6f 70 74 69 6f 6e 73 20 44 65 |oder, options De| 521s 00003770 63 6f 64 65 4f 70 74 69 6f 6e 73 29 20 50 61 63 |codeOptions) Pac| 521s 00003780 6b 65 74 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |ket
....| 521s 00003790 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a |................| 521s 000037a0 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d |....
type PacketBuil| 521s 000037d0 64 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |der
....| 521s 000037e0 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a |................| 521s 000037f0 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d |....
type PacketD| 521s 00003820 61 74 61 53 6f 75 72 63 65 3c 2f 61 3e 3c 2f 64 |ataSource..............| 521s 00003840 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 |..........
type Packe| 521s 00003870 74 53 6f 75 72 63 65 3c 2f 61 3e 3c 2f 64 64 3e |tSource
| 521s 00003880 0a 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 |................| 521s 00003890 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 |.
  &nbs| 521s 000038a0 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 4e 65 77 |p; fu| 521s 000038c0 6e 63 20 4e 65 77 50 61 63 6b 65 74 53 6f 75 72 |nc NewPacketSour| 521s 000038d0 63 65 28 73 6f 75 72 63 65 20 50 61 63 6b 65 74 |ce(source Packet| 521s 000038e0 44 61 74 61 53 6f 75 72 63 65 2c 20 64 65 63 6f |DataSource, deco| 521s 000038f0 64 65 72 20 44 65 63 6f 64 65 72 29 20 2a 50 61 |der Decoder) *Pa| 521s 00003900 63 6b 65 74 53 6f 75 72 63 65 3c 2f 61 3e 3c 2f |cketSource.............| 521s 00003920 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 |.........
&nb| 521s 00003930 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 |sp;   fu| 521s 00003960 6e 63 20 28 70 20 2a 50 61 63 6b 65 74 53 6f 75 |nc (p *PacketSou| 521s 00003970 72 63 65 29 20 4e 65 78 74 50 61 63 6b 65 74 28 |rce) NextPacket(| 521s 00003980 29 20 28 50 61 63 6b 65 74 2c 20 65 72 72 6f 72 |) (Packet, error| 521s 00003990 29 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |)
......| 521s 000039a0 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 000039b0 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   fun| 521s 000039e0 63 20 28 70 20 2a 50 61 63 6b 65 74 53 6f 75 72 |c (p *PacketSour| 521s 000039f0 63 65 29 20 50 61 63 6b 65 74 73 28 29 20 63 68 |ce) Packets() ch| 521s 00003a00 61 6e 20 50 61 63 6b 65 74 3c 2f 61 3e 3c 2f 64 |an Packet..............| 521s 00003a20 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 |.....
type| 521s 00003a40 20 50 61 79 6c 6f 61 64 3c 2f 61 3e 3c 2f 64 64 | Payload...............| 521s 00003a60 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 |.......
 | 521s 00003a70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 |;   func (| 521s 00003aa0 70 20 2a 50 61 79 6c 6f 61 64 29 20 4c 61 79 65 |p *Payload) Laye| 521s 00003ab0 72 43 6f 6e 74 65 6e 74 73 28 29 20 5b 5d 62 79 |rContents() []by| 521s 00003ac0 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |te
.....| 521s 00003ad0 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00003ae0 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    fu| 521s 00003b10 6e 63 20 28 70 20 2a 50 61 79 6c 6f 61 64 29 20 |nc (p *Payload) | 521s 00003b20 4c 61 79 65 72 50 61 79 6c 6f 61 64 28 29 20 5b |LayerPayload() [| 521s 00003b30 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |]byte
..| 521s 00003b40 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00003b50 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00003b60 20 3c 61 20 68 72 65 66 3d 22 23 50 61 79 6c 6f | fu| 521s 00003b80 6e 63 20 28 70 20 2a 50 61 79 6c 6f 61 64 29 20 |nc (p *Payload) | 521s 00003b90 4c 61 79 65 72 54 79 70 65 28 29 20 4c 61 79 65 |LayerType() Laye| 521s 00003ba0 72 54 79 70 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |rType..| 521s 00003bb0 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00003bc0 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00003bd0 20 3c 61 20 68 72 65 66 3d 22 23 50 61 79 6c 6f | func| 521s 00003bf0 20 28 70 20 2a 50 61 79 6c 6f 61 64 29 20 50 61 | (p *Payload) Pa| 521s 00003c00 79 6c 6f 61 64 28 29 20 5b 5d 62 79 74 65 3c 2f |yload() []byte.........| 521s 00003c20 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 |........
&nbs| 521s 00003c30 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 |p;   func (p *Pay| 521s 00003c60 6c 6f 61 64 29 20 53 74 72 69 6e 67 28 29 20 73 |load) String() s| 521s 00003c70 74 72 69 6e 67 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |tring
..| 521s 00003c80 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00003c90 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 54 |.
t| 521s 00003cb0 79 70 65 20 54 72 61 6e 73 70 6f 72 74 4c 61 79 |ype TransportLay| 521s 00003cc0 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |er
.....| 521s 00003cd0 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00003ce0 3c 2f 64 6c 3e 0a 0a 09 09 0a 0a 09 09 0a 09 09 |
...........| 521s 00003cf0 09 3c 68 34 3e 50 61 63 6b 61 67 65 20 66 69 6c |.

Package fil| 521s 00003d00 65 73 3c 2f 68 34 3e 0a 09 09 09 3c 70 3e 0a 09 |es

....

..| 521s 00003d10 09 09 3c 73 70 61 6e 20 73 74 79 6c 65 3d 22 66 |....| 521s 00003d30 09 09 0a 09 09 09 09 3c 61 20 68 72 65 66 3d 22 |.......b| 521s 00003d70 61 73 65 2e 67 6f 3c 2f 61 3e 0a 09 09 09 0a 09 |ase.go......| 521s 00003d80 09 09 09 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |...dec| 521s 00003dc0 6f 64 65 2e 67 6f 3c 2f 61 3e 0a 09 09 09 0a 09 |ode.go......| 521s 00003dd0 09 09 09 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |...doc.go| 521s 00003e10 3c 2f 61 3e 0a 09 09 09 0a 09 09 09 09 3c 61 20 |.........flows.go.........layercl| 521s 00003eb0 61 73 73 2e 67 6f 3c 2f 61 3e 0a 09 09 09 0a 09 |ass.go......| 521s 00003ec0 09 09 09 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |...| 521s 00003f00 6c 61 79 65 72 74 79 70 65 2e 67 6f 3c 2f 61 3e |layertype.go| 521s 00003f10 0a 09 09 09 0a 09 09 09 09 3c 61 20 68 72 65 66 |.........packet.go| 521s 00003f60 0a 09 09 09 0a 09 09 09 09 3c 61 20 68 72 65 66 |.........v| 521s 00003fb0 61 6c 69 64 5f 6d 61 63 5f 70 72 65 66 69 78 65 |alid_mac_prefixe| 521s 00003fc0 73 2e 67 6f 3c 2f 61 3e 0a 09 09 09 0a 09 09 09 |s.go........| 521s 00003fd0 3c 2f 73 70 61 6e 3e 0a 09 09 09 3c 2f 70 3e 0a |....

.| 521s 00003fe0 09 09 0a 09 0a 09 09 0a 09 09 0a 09 09 09 3c 68 |..............| 521s 00000010 0a 3c 68 33 20 69 64 3d 22 52 65 61 64 69 6e 67 |.

Reading | 521s 00000040 50 61 63 6b 65 74 73 20 46 72 6f 6d 20 41 20 53 |Packets From A S| 521s 00000050 6f 75 72 63 65 3c 2f 68 33 3e 0a 3c 70 3e 0a 4d |ource

.

.M| 521s 00000060 6f 73 74 20 6f 66 20 74 68 65 20 74 69 6d 65 2c |ost of the time,| 521s 00000070 20 79 6f 75 20 77 6f 6e 26 23 33 39 3b 74 20 6a | you won't j| 521s 00000080 75 73 74 20 68 61 76 65 20 61 20 5b 5d 62 79 74 |ust have a []byt| 521s 00000090 65 20 6f 66 20 70 61 63 6b 65 74 20 64 61 74 61 |e of packet data| 521s 000000a0 20 6c 79 69 6e 67 20 61 72 6f 75 6e 64 2e 0a 49 | lying around..I| 521s 000000b0 6e 73 74 65 61 64 2c 20 79 6f 75 26 23 33 39 3b |nstead, you'| 521s 000000c0 6c 6c 20 77 61 6e 74 20 74 6f 20 72 65 61 64 20 |ll want to read | 521s 000000d0 70 61 63 6b 65 74 73 20 69 6e 20 66 72 6f 6d 20 |packets in from | 521s 000000e0 73 6f 6d 65 77 68 65 72 65 20 28 66 69 6c 65 2c |somewhere (file,| 521s 000000f0 20 69 6e 74 65 72 66 61 63 65 2c 20 65 74 63 29 | interface, etc)| 521s 00000100 0a 61 6e 64 20 70 72 6f 63 65 73 73 20 74 68 65 |.and process the| 521s 00000110 6d 2e 20 20 54 6f 20 64 6f 20 74 68 61 74 2c 20 |m. To do that, | 521s 00000120 79 6f 75 26 23 33 39 3b 6c 6c 20 77 61 6e 74 20 |you'll want | 521s 00000130 74 6f 20 62 75 69 6c 64 20 61 20 50 61 63 6b 65 |to build a Packe| 521s 00000140 74 53 6f 75 72 63 65 2e 0a 3c 2f 70 3e 0a 3c 70 |tSource..

..First, you'| 521s 00000160 3b 6c 6c 20 6e 65 65 64 20 74 6f 20 63 6f 6e 73 |;ll need to cons| 521s 00000170 74 72 75 63 74 20 61 6e 20 6f 62 6a 65 63 74 20 |truct an object | 521s 00000180 74 68 61 74 20 69 6d 70 6c 65 6d 65 6e 74 73 20 |that implements | 521s 00000190 74 68 65 20 50 61 63 6b 65 74 44 61 74 61 53 6f |the PacketDataSo| 521s 000001a0 75 72 63 65 0a 69 6e 74 65 72 66 61 63 65 2e 20 |urce.interface. | 521s 000001b0 20 54 68 65 72 65 20 61 72 65 20 69 6d 70 6c 65 | There are imple| 521s 000001c0 6d 65 6e 74 61 74 69 6f 6e 73 20 6f 66 20 74 68 |mentations of th| 521s 000001d0 69 73 20 69 6e 74 65 72 66 61 63 65 20 62 75 6e |is interface bun| 521s 000001e0 64 6c 65 64 20 77 69 74 68 20 67 6f 70 61 63 6b |dled with gopack| 521s 000001f0 65 74 0a 69 6e 20 74 68 65 20 67 6f 70 61 63 6b |et.in the gopack| 521s 00000200 65 74 2f 70 63 61 70 20 61 6e 64 20 67 6f 70 61 |et/pcap and gopa| 521s 00000210 63 6b 65 74 2f 70 66 72 69 6e 67 20 73 75 62 70 |cket/pfring subp| 521s 00000220 61 63 6b 61 67 65 73 2e 2e 2e 20 73 65 65 20 74 |ackages... see t| 521s 00000230 68 65 69 72 20 64 6f 63 75 6d 65 6e 74 61 74 69 |heir documentati| 521s 00000240 6f 6e 0a 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f |on.for more info| 521s 00000250 72 6d 61 74 69 6f 6e 20 6f 6e 20 74 68 65 69 72 |rmation on their| 521s 00000260 20 75 73 61 67 65 2e 20 20 4f 6e 63 65 20 79 6f | usage. Once yo| 521s 00000270 75 20 68 61 76 65 20 61 20 50 61 63 6b 65 74 44 |u have a PacketD| 521s 00000280 61 74 61 53 6f 75 72 63 65 2c 20 79 6f 75 20 63 |ataSource, you c| 521s 00000290 61 6e 0a 70 61 73 73 20 69 74 20 69 6e 74 6f 20 |an.pass it into | 521s 000002a0 4e 65 77 50 61 63 6b 65 74 53 6f 75 72 63 65 2c |NewPacketSource,| 521s 000002b0 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 20 44 65 | along with a De| 521s 000002c0 63 6f 64 65 72 20 6f 66 20 79 6f 75 72 20 63 68 |coder of your ch| 521s 000002d0 6f 69 63 65 2c 20 74 6f 20 63 72 65 61 74 65 0a |oice, to create.| 521s 000002e0 61 20 50 61 63 6b 65 74 53 6f 75 72 63 65 2e 0a |a PacketSource..| 521s 000002f0 3c 2f 70 3e 0a 3c 70 3e 0a 4f 6e 63 65 20 79 6f |

.

.Once yo| 521s 00000300 75 20 68 61 76 65 20 61 20 50 61 63 6b 65 74 53 |u have a PacketS| 521s 00000310 6f 75 72 63 65 2c 20 79 6f 75 20 63 61 6e 20 72 |ource, you can r| 521s 00000320 65 61 64 20 70 61 63 6b 65 74 73 20 66 72 6f 6d |ead packets from| 521s 00000330 20 69 74 20 69 6e 20 6d 75 6c 74 69 70 6c 65 20 | it in multiple | 521s 00000340 77 61 79 73 2e 0a 53 65 65 20 74 68 65 20 64 6f |ways..See the do| 521s 00000350 63 73 20 66 6f 72 20 50 61 63 6b 65 74 53 6f 75 |cs for PacketSou| 521s 00000360 72 63 65 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 |rce for more det| 521s 00000370 61 69 6c 73 2e 20 20 54 68 65 20 65 61 73 69 65 |ails. The easie| 521s 00000380 73 74 20 6d 65 74 68 6f 64 20 69 73 20 74 68 65 |st method is the| 521s 00000390 0a 50 61 63 6b 65 74 73 20 66 75 6e 63 74 69 6f |.Packets functio| 521s 000003a0 6e 2c 20 77 68 69 63 68 20 72 65 74 75 72 6e 73 |n, which returns| 521s 000003b0 20 61 20 63 68 61 6e 6e 65 6c 2c 20 74 68 65 6e | a channel, then| 521s 000003c0 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 20 | asynchronously | 521s 000003d0 77 72 69 74 65 73 20 6e 65 77 0a 70 61 63 6b 65 |writes new.packe| 521s 000003e0 74 73 20 69 6e 74 6f 20 74 68 61 74 20 63 68 61 |ts into that cha| 521s 000003f0 6e 6e 65 6c 2c 20 63 6c 6f 73 69 6e 67 20 74 68 |nnel, closing th| 521s 00000400 65 20 63 68 61 6e 6e 65 6c 20 69 66 20 74 68 65 |e channel if the| 521s 00000410 20 70 61 63 6b 65 74 53 6f 75 72 63 65 20 68 69 | packetSource hi| 521s 00000420 74 73 20 61 6e 0a 65 6e 64 2d 6f 66 2d 66 69 6c |ts an.end-of-fil| 521s 00000430 65 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 70 61 63 |e..

.
pac|
521s         00000440  6b 65 74 53 6f 75 72 63  65 20 3a 3d 20 2e 2e 2e  |ketSource := ...|
521s         00000450  20 20 2f 2f 20 63 6f 6e  73 74 72 75 63 74 20 75  |  // construct u|
521s         00000460  73 69 6e 67 20 70 63 61  70 20 6f 72 20 70 66 72  |sing pcap or pfr|
521s         00000470  69 6e 67 0a 66 6f 72 20  70 61 63 6b 65 74 20 3a  |ing.for packet :|
521s         00000480  3d 20 72 61 6e 67 65 20  70 61 63 6b 65 74 53 6f  |= range packetSo|
521s         00000490  75 72 63 65 2e 50 61 63  6b 65 74 73 28 29 20 7b  |urce.Packets() {|
521s         000004a0  0a 20 20 68 61 6e 64 6c  65 50 61 63 6b 65 74 28  |.  handlePacket(|
521s         000004b0  70 61 63 6b 65 74 29 20  20 2f 2f 20 64 6f 20 73  |packet)  // do s|
521s         000004c0  6f 6d 65 74 68 69 6e 67  20 77 69 74 68 20 65 61  |omething with ea|
521s         000004d0  63 68 20 70 61 63 6b 65  74 0a 7d 0a 3c 2f 70 72  |ch packet.}..

.You can c| 521s 000004f0 68 61 6e 67 65 20 74 68 65 20 64 65 63 6f 64 69 |hange the decodi| 521s 00000500 6e 67 20 6f 70 74 69 6f 6e 73 20 6f 66 20 74 68 |ng options of th| 521s 00000510 65 20 70 61 63 6b 65 74 53 6f 75 72 63 65 20 62 |e packetSource b| 521s 00000520 79 20 73 65 74 74 69 6e 67 20 66 69 65 6c 64 73 |y setting fields| 521s 00000530 20 69 6e 0a 70 61 63 6b 65 74 53 6f 75 72 63 65 | in.packetSource| 521s 00000540 2e 44 65 63 6f 64 65 4f 70 74 69 6f 6e 73 2e 2e |.DecodeOptions..| 521s 00000550 2e 20 73 65 65 20 74 68 65 20 66 6f 6c 6c 6f 77 |. see the follow| 521s 00000560 69 6e 67 20 73 65 63 74 69 6f 6e 73 20 66 6f 72 |ing sections for| 521s 00000570 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a 3c | more details..<| 521s 00000580 2f 70 3e 0a 3c 68 33 20 69 64 3d 22 4c 61 7a 79 |/p>.

Lazy | 521s 000005a0 44 65 63 6f 64 69 6e 67 3c 2f 68 33 3e 0a 3c 70 |Decoding

..gopacket optio| 521s 000005c0 6e 61 6c 6c 79 20 64 65 63 6f 64 65 73 20 70 61 |nally decodes pa| 521s 000005d0 63 6b 65 74 20 64 61 74 61 20 6c 61 7a 69 6c 79 |cket data lazily| 521s 000005e0 2c 20 6d 65 61 6e 69 6e 67 20 69 74 0a 6f 6e 6c |, meaning it.onl| 521s 000005f0 79 20 64 65 63 6f 64 65 73 20 61 20 70 61 63 6b |y decodes a pack| 521s 00000600 65 74 20 6c 61 79 65 72 20 77 68 65 6e 20 69 74 |et layer when it| 521s 00000610 20 6e 65 65 64 73 20 74 6f 20 74 6f 20 68 61 6e | needs to to han| 521s 00000620 64 6c 65 20 61 20 66 75 6e 63 74 69 6f 6e 20 63 |dle a function c| 521s 00000630 61 6c 6c 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 2f |all..

.
/|
521s         00000640  2f 20 43 72 65 61 74 65  20 61 20 70 61 63 6b 65  |/ Create a packe|
521s         00000650  74 2c 20 62 75 74 20 64  6f 6e 26 23 33 39 3b 74  |t, but don't|
521s         00000660  20 61 63 74 75 61 6c 6c  79 20 64 65 63 6f 64 65  | actually decode|
521s         00000670  20 61 6e 79 74 68 69 6e  67 20 79 65 74 0a 70 61  | anything yet.pa|
521s         00000680  63 6b 65 74 20 3a 3d 20  67 6f 70 61 63 6b 65 74  |cket := gopacket|
521s         00000690  2e 4e 65 77 50 61 63 6b  65 74 28 6d 79 50 61 63  |.NewPacket(myPac|
521s         000006a0  6b 65 74 44 61 74 61 2c  20 6c 61 79 65 72 73 2e  |ketData, layers.|
521s         000006b0  4c 61 79 65 72 54 79 70  65 45 74 68 65 72 6e 65  |LayerTypeEtherne|
521s         000006c0  74 2c 20 67 6f 70 61 63  6b 65 74 2e 4c 61 7a 79  |t, gopacket.Lazy|
521s         000006d0  29 0a 2f 2f 20 4e 6f 77  2c 20 64 65 63 6f 64 65  |).// Now, decode|
521s         000006e0  20 74 68 65 20 70 61 63  6b 65 74 20 75 70 20 74  | the packet up t|
521s         000006f0  6f 20 74 68 65 20 66 69  72 73 74 20 49 50 76 34  |o the first IPv4|
521s         00000700  20 6c 61 79 65 72 20 66  6f 75 6e 64 20 62 75 74  | layer found but|
521s         00000710  20 6e 6f 20 66 75 72 74  68 65 72 2e 0a 2f 2f 20  | no further..// |
521s         00000720  49 66 20 6e 6f 20 49 50  76 34 20 6c 61 79 65 72  |If no IPv4 layer|
521s         00000730  20 77 61 73 20 66 6f 75  6e 64 2c 20 74 68 65 20  | was found, the |
521s         00000740  77 68 6f 6c 65 20 70 61  63 6b 65 74 20 77 69 6c  |whole packet wil|
521s         00000750  6c 20 62 65 20 64 65 63  6f 64 65 64 20 6c 6f 6f  |l be decoded loo|
521s         00000760  6b 69 6e 67 20 66 6f 72  0a 2f 2f 20 69 74 2e 0a  |king for.// it..|
521s         00000770  69 70 34 20 3a 3d 20 70  61 63 6b 65 74 2e 4c 61  |ip4 := packet.La|
521s         00000780  79 65 72 28 6c 61 79 65  72 73 2e 4c 61 79 65 72  |yer(layers.Layer|
521s         00000790  54 79 70 65 49 50 76 34  29 0a 2f 2f 20 44 65 63  |TypeIPv4).// Dec|
521s         000007a0  6f 64 65 20 61 6c 6c 20  6c 61 79 65 72 73 20 61  |ode all layers a|
521s         000007b0  6e 64 20 72 65 74 75 72  6e 20 74 68 65 6d 2e 20  |nd return them. |
521s         000007c0  20 54 68 65 20 6c 61 79  65 72 73 20 75 70 20 74  | The layers up t|
521s         000007d0  6f 20 74 68 65 20 66 69  72 73 74 20 49 50 76 34  |o the first IPv4|
521s         000007e0  20 6c 61 79 65 72 0a 2f  2f 20 61 72 65 20 61 6c  | layer.// are al|
521s         000007f0  72 65 61 64 79 20 64 65  63 6f 64 65 64 2c 20 61  |ready decoded, a|
521s         00000800  6e 64 20 77 69 6c 6c 20  6e 6f 74 20 72 65 71 75  |nd will not requ|
521s         00000810  69 72 65 20 64 65 63 6f  64 69 6e 67 20 61 20 73  |ire decoding a s|
521s         00000820  65 63 6f 6e 64 20 74 69  6d 65 2e 0a 6c 61 79 65  |econd time..laye|
521s         00000830  72 73 20 3a 3d 20 70 61  63 6b 65 74 2e 4c 61 79  |rs := packet.Lay|
521s         00000840  65 72 73 28 29 0a 3c 2f  70 72 65 3e 0a 3c 70 3e  |ers().
.

| 521s 00000850 0a 4c 61 7a 69 6c 79 2d 64 65 63 6f 64 65 64 20 |.Lazily-decoded | 521s 00000860 70 61 63 6b 65 74 73 20 61 72 65 20 6e 6f 74 20 |packets are not | 521s 00000870 63 6f 6e 63 75 72 72 65 6e 63 79 2d 73 61 66 65 |concurrency-safe| 521s 00000880 2e 20 20 53 69 6e 63 65 20 6c 61 79 65 72 73 20 |. Since layers | 521s 00000890 68 61 76 65 20 6e 6f 74 20 61 6c 6c 20 62 65 65 |have not all bee| 521s 000008a0 6e 0a 64 65 63 6f 64 65 64 2c 20 65 61 63 68 20 |n.decoded, each | 521s 000008b0 63 61 6c 6c 20 74 6f 20 4c 61 79 65 72 28 29 20 |call to Layer() | 521s 000008c0 6f 72 20 4c 61 79 65 72 73 28 29 20 68 61 73 20 |or Layers() has | 521s 000008d0 74 68 65 20 70 6f 74 65 6e 74 69 61 6c 20 74 6f |the potential to| 521s 000008e0 20 6d 75 74 61 74 65 20 74 68 65 20 70 61 63 6b | mutate the pack| 521s 000008f0 65 74 0a 69 6e 20 6f 72 64 65 72 20 74 6f 20 64 |et.in order to d| 521s 00000900 65 63 6f 64 65 20 74 68 65 20 6e 65 78 74 20 6c |ecode the next l| 521s 00000910 61 79 65 72 2e 20 20 49 66 20 61 20 70 61 63 6b |ayer. If a pack| 521s 00000920 65 74 20 69 73 20 75 73 65 64 0a 69 6e 20 6d 75 |et is used.in mu| 521s 00000930 6c 74 69 70 6c 65 20 67 6f 72 6f 75 74 69 6e 65 |ltiple goroutine| 521s 00000940 73 20 63 6f 6e 63 75 72 72 65 6e 74 6c 79 2c 20 |s concurrently, | 521s 00000950 64 6f 6e 26 23 33 39 3b 74 20 75 73 65 20 67 6f |don't use go| 521s 00000960 70 61 63 6b 65 74 2e 4c 61 7a 79 2e 20 20 54 68 |packet.Lazy. Th| 521s 00000970 65 6e 20 67 6f 70 61 63 6b 65 74 0a 77 69 6c 6c |en gopacket.will| 521s 00000980 20 64 65 63 6f 64 65 20 74 68 65 20 70 61 63 6b | decode the pack| 521s 00000990 65 74 20 66 75 6c 6c 79 2c 20 61 6e 64 20 61 6c |et fully, and al| 521s 000009a0 6c 20 66 75 74 75 72 65 20 66 75 6e 63 74 69 6f |l future functio| 521s 000009b0 6e 20 63 61 6c 6c 73 20 77 6f 6e 26 23 33 39 3b |n calls won'| 521s 000009c0 74 20 6d 75 74 61 74 65 20 74 68 65 0a 6f 62 6a |t mutate the.obj| 521s 000009d0 65 63 74 2e 0a 3c 2f 70 3e 0a 3c 68 33 20 69 64 |ect..

.

NoCopy Decodi| 521s 00000a00 6e 67 3c 2f 68 33 3e 0a 3c 70 3e 0a 42 79 20 64 |ng

.

.By d| 521s 00000a10 65 66 61 75 6c 74 2c 20 67 6f 70 61 63 6b 65 74 |efault, gopacket| 521s 00000a20 20 77 69 6c 6c 20 63 6f 70 79 20 74 68 65 20 73 | will copy the s| 521s 00000a30 6c 69 63 65 20 70 61 73 73 65 64 20 74 6f 20 4e |lice passed to N| 521s 00000a40 65 77 50 61 63 6b 65 74 20 61 6e 64 20 73 74 6f |ewPacket and sto| 521s 00000a50 72 65 20 74 68 65 0a 63 6f 70 79 20 77 69 74 68 |re the.copy with| 521s 00000a60 69 6e 20 74 68 65 20 70 61 63 6b 65 74 2c 20 73 |in the packet, s| 521s 00000a70 6f 20 66 75 74 75 72 65 20 6d 75 74 61 74 69 6f |o future mutatio| 521s 00000a80 6e 73 20 74 6f 20 74 68 65 20 62 79 74 65 73 20 |ns to the bytes | 521s 00000a90 75 6e 64 65 72 6c 79 69 6e 67 20 74 68 65 20 73 |underlying the s| 521s 00000aa0 6c 69 63 65 0a 64 6f 6e 26 23 33 39 3b 74 20 61 |lice.don't a| 521s 00000ab0 66 66 65 63 74 20 74 68 65 20 70 61 63 6b 65 74 |ffect the packet| 521s 00000ac0 20 61 6e 64 20 69 74 73 20 6c 61 79 65 72 73 2e | and its layers.| 521s 00000ad0 20 20 49 66 20 79 6f 75 20 63 61 6e 20 67 75 61 | If you can gua| 521s 00000ae0 72 61 6e 74 65 65 20 74 68 61 74 20 74 68 65 0a |rantee that the.| 521s 00000af0 75 6e 64 65 72 6c 79 69 6e 67 20 73 6c 69 63 65 |underlying slice| 521s 00000b00 20 62 79 74 65 73 20 77 6f 6e 26 23 33 39 3b 74 | bytes won't| 521s 00000b10 20 62 65 20 63 68 61 6e 67 65 64 2c 20 79 6f 75 | be changed, you| 521s 00000b20 20 63 61 6e 20 75 73 65 20 4e 6f 43 6f 70 79 20 | can use NoCopy | 521s 00000b30 74 6f 20 74 65 6c 6c 0a 67 6f 70 61 63 6b 65 74 |to tell.gopacket| 521s 00000b40 2e 4e 65 77 50 61 63 6b 65 74 2c 20 61 6e 64 20 |.NewPacket, and | 521s 00000b50 69 74 26 23 33 39 3b 6c 6c 20 75 73 65 20 74 68 |it'll use th| 521s 00000b60 65 20 70 61 73 73 65 64 2d 69 6e 20 73 6c 69 63 |e passed-in slic| 521s 00000b70 65 20 69 74 73 65 6c 66 2e 0a 3c 2f 70 3e 0a 3c |e itself..

.<| 521s 00000b80 70 72 65 3e 2f 2f 20 54 68 69 73 20 63 68 61 6e |pre>// This chan| 521s 00000b90 6e 65 6c 20 72 65 74 75 72 6e 73 20 6e 65 77 20 |nel returns new | 521s 00000ba0 62 79 74 65 20 73 6c 69 63 65 73 2c 20 65 61 63 |byte slices, eac| 521s 00000bb0 68 20 6f 66 20 77 68 69 63 68 20 70 6f 69 6e 74 |h of which point| 521s 00000bc0 73 20 74 6f 20 61 20 6e 65 77 0a 2f 2f 20 6d 65 |s to a new.// me| 521s 00000bd0 6d 6f 72 79 20 6c 6f 63 61 74 69 6f 6e 20 74 68 |mory location th| 521s 00000be0 61 74 26 23 33 39 3b 73 20 67 75 61 72 61 6e 74 |at's guarant| 521s 00000bf0 65 65 64 20 69 6d 6d 75 74 61 62 6c 65 20 66 6f |eed immutable fo| 521s 00000c00 72 20 74 68 65 20 64 75 72 61 74 69 6f 6e 20 6f |r the duration o| 521s 00000c10 66 20 74 68 65 0a 2f 2f 20 70 61 63 6b 65 74 2e |f the.// packet.| 521s 00000c20 0a 66 6f 72 20 64 61 74 61 20 3a 3d 20 72 61 6e |.for data := ran| 521s 00000c30 67 65 20 6d 79 42 79 74 65 53 6c 69 63 65 43 68 |ge myByteSliceCh| 521s 00000c40 61 6e 6e 65 6c 20 7b 0a 20 20 70 20 3a 3d 20 67 |annel {. p := g| 521s 00000c50 6f 70 61 63 6b 65 74 2e 4e 65 77 50 61 63 6b 65 |opacket.NewPacke| 521s 00000c60 74 28 64 61 74 61 2c 20 6c 61 79 65 72 73 2e 4c |t(data, layers.L| 521s 00000c70 61 79 65 72 54 79 70 65 45 74 68 65 72 6e 65 74 |ayerTypeEthernet| 521s 00000c80 2c 20 67 6f 70 61 63 6b 65 74 2e 4e 6f 43 6f 70 |, gopacket.NoCop| 521s 00000c90 79 29 0a 20 20 64 6f 53 6f 6d 65 74 68 69 6e 67 |y). doSomething| 521s 00000ca0 57 69 74 68 50 61 63 6b 65 74 28 70 29 0a 7d 0a |WithPacket(p).}.| 521s 00000cb0 3c 2f 70 72 65 3e 0a 3c 70 3e 0a 54 68 65 20 66 |
.

.The f| 521s 00000cc0 61 73 74 65 73 74 20 6d 65 74 68 6f 64 20 6f 66 |astest method of| 521s 00000cd0 20 64 65 63 6f 64 69 6e 67 20 69 73 20 74 6f 20 | decoding is to | 521s 00000ce0 75 73 65 20 62 6f 74 68 20 4c 61 7a 79 20 61 6e |use both Lazy an| 521s 00000cf0 64 20 4e 6f 43 6f 70 79 2c 20 62 75 74 20 6e 6f |d NoCopy, but no| 521s 00000d00 74 65 20 66 72 6f 6d 0a 74 68 65 20 6d 61 6e 79 |te from.the many| 521s 00000d10 20 63 61 76 65 61 74 73 20 61 62 6f 76 65 20 74 | caveats above t| 521s 00000d20 68 61 74 20 66 6f 72 20 73 6f 6d 65 20 69 6d 70 |hat for some imp| 521s 00000d30 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 74 68 65 |lementations the| 521s 00000d40 79 20 6d 61 79 20 62 65 20 64 61 6e 67 65 72 6f |y may be dangero| 521s 00000d50 75 73 0a 65 69 74 68 65 72 20 6f 72 20 62 6f 74 |us.either or bot| 521s 00000d60 68 20 6d 61 79 20 62 65 20 64 61 6e 67 65 72 6f |h may be dangero| 521s 00000d70 75 73 2e 0a 3c 2f 70 3e 0a 3c 68 33 20 69 64 3d |us..

.

Point| 521s 00000da0 65 72 73 20 54 6f 20 4b 6e 6f 77 6e 20 4c 61 79 |ers To Known Lay| 521s 00000db0 65 72 73 3c 2f 68 33 3e 0a 3c 70 3e 0a 44 75 72 |ers

.

.Dur| 521s 00000dc0 69 6e 67 20 64 65 63 6f 64 69 6e 67 2c 20 63 65 |ing decoding, ce| 521s 00000dd0 72 74 61 69 6e 20 6c 61 79 65 72 73 20 61 72 65 |rtain layers are| 521s 00000de0 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 20 70 | stored in the p| 521s 00000df0 61 63 6b 65 74 20 61 73 20 77 65 6c 6c 2d 6b 6e |acket as well-kn| 521s 00000e00 6f 77 6e 0a 6c 61 79 65 72 20 74 79 70 65 73 2e |own.layer types.| 521s 00000e10 20 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 49 | For example, I| 521s 00000e20 50 76 34 20 61 6e 64 20 49 50 76 36 20 61 72 65 |Pv4 and IPv6 are| 521s 00000e30 20 62 6f 74 68 20 63 6f 6e 73 69 64 65 72 65 64 | both considered| 521s 00000e40 20 4e 65 74 77 6f 72 6b 4c 61 79 65 72 0a 6c 61 | NetworkLayer.la| 521s 00000e50 79 65 72 73 2c 20 77 68 69 6c 65 20 54 43 50 20 |yers, while TCP | 521s 00000e60 61 6e 64 20 55 44 50 20 61 72 65 20 62 6f 74 68 |and UDP are both| 521s 00000e70 20 54 72 61 6e 73 70 6f 72 74 4c 61 79 65 72 20 | TransportLayer | 521s 00000e80 6c 61 79 65 72 73 2e 20 20 57 65 20 73 75 70 70 |layers. We supp| 521s 00000e90 6f 72 74 20 34 0a 6c 61 79 65 72 73 2c 20 63 6f |ort 4.layers, co| 521s 00000ea0 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 74 |rresponding to t| 521s 00000eb0 68 65 20 34 20 6c 61 79 65 72 73 20 6f 66 20 74 |he 4 layers of t| 521s 00000ec0 68 65 20 54 43 50 2f 49 50 20 6c 61 79 65 72 69 |he TCP/IP layeri| 521s 00000ed0 6e 67 20 73 63 68 65 6d 65 20 28 72 6f 75 67 68 |ng scheme (rough| 521s 00000ee0 6c 79 0a 61 6e 61 67 61 6c 6f 75 73 20 74 6f 20 |ly.anagalous to | 521s 00000ef0 6c 61 79 65 72 73 20 32 2c 20 33 2c 20 34 2c 20 |layers 2, 3, 4, | 521s 00000f00 61 6e 64 20 37 20 6f 66 20 74 68 65 20 4f 53 49 |and 7 of the OSI| 521s 00000f10 20 6d 6f 64 65 6c 29 2e 20 20 54 6f 20 61 63 63 | model). To acc| 521s 00000f20 65 73 73 20 74 68 65 73 65 2c 0a 79 6f 75 20 63 |ess these,.you c| 521s 00000f30 61 6e 20 75 73 65 20 74 68 65 20 70 61 63 6b 65 |an use the packe| 521s 00000f40 74 2e 4c 69 6e 6b 4c 61 79 65 72 2c 20 70 61 63 |t.LinkLayer, pac| 521s 00000f50 6b 65 74 2e 4e 65 74 77 6f 72 6b 4c 61 79 65 72 |ket.NetworkLayer| 521s 00000f60 2c 0a 70 61 63 6b 65 74 2e 54 72 61 6e 73 70 6f |,.packet.Transpo| 521s 00000f70 72 74 4c 61 79 65 72 2c 20 61 6e 64 20 70 61 63 |rtLayer, and pac| 521s 00000f80 6b 65 74 2e 41 70 70 6c 69 63 61 74 69 6f 6e 4c |ket.ApplicationL| 521s 00000f90 61 79 65 72 20 66 75 6e 63 74 69 6f 6e 73 2e 20 |ayer functions. | 521s 00000fa0 20 45 61 63 68 20 6f 66 0a 74 68 65 73 65 20 66 | Each of.these f| 521s 00000fb0 75 6e 63 74 69 6f 6e 73 20 72 65 74 75 72 6e 73 |unctions returns| 521s 00000fc0 20 61 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 | a corresponding| 521s 00000fd0 20 69 6e 74 65 72 66 61 63 65 0a 28 67 6f 70 61 | interface.(gopa| 521s 00000fe0 63 6b 65 74 2e 7b 4c 69 6e 6b 2c 4e 65 74 77 6f |cket.{Link,Netwo| 521s 00000ff0 72 6b 2c 54 72 61 6e 73 70 6f 72 74 2c 41 70 70 |rk,Transport,App| 521s 00001000 6c 69 63 61 74 69 6f 6e 7d 4c 61 79 65 72 29 2e |lication}Layer).| 521s 00001010 20 20 54 68 65 20 66 69 72 73 74 20 74 68 72 65 | The first thre| 521s 00001020 65 0a 70 72 6f 76 69 64 65 20 6d 65 74 68 6f 64 |e.provide method| 521s 00001030 73 20 66 6f 72 20 67 65 74 74 69 6e 67 20 73 72 |s for getting sr| 521s 00001040 63 2f 64 73 74 20 61 64 64 72 65 73 73 65 73 20 |c/dst addresses | 521s 00001050 66 6f 72 20 74 68 61 74 20 70 61 72 74 69 63 75 |for that particu| 521s 00001060 6c 61 72 20 6c 61 79 65 72 2c 0a 77 68 69 6c 65 |lar layer,.while| 521s 00001070 20 74 68 65 20 66 69 6e 61 6c 20 6c 61 79 65 72 | the final layer| 521s 00001080 20 70 72 6f 76 69 64 65 73 20 61 20 50 61 79 6c | provides a Payl| 521s 00001090 6f 61 64 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 |oad function to | 521s 000010a0 67 65 74 20 70 61 79 6c 6f 61 64 20 64 61 74 61 |get payload data| 521s 000010b0 2e 0a 54 68 69 73 20 69 73 20 68 65 6c 70 66 75 |..This is helpfu| 521s 000010c0 6c 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 |l, for example, | 521s 000010d0 74 6f 20 67 65 74 20 70 61 79 6c 6f 61 64 73 20 |to get payloads | 521s 000010e0 66 6f 72 20 61 6c 6c 20 70 61 63 6b 65 74 73 20 |for all packets | 521s 000010f0 72 65 67 61 72 64 6c 65 73 73 0a 6f 66 20 74 68 |regardless.of th| 521s 00001100 65 69 72 20 75 6e 64 65 72 6c 79 69 6e 67 20 64 |eir underlying d| 521s 00001110 61 74 61 20 74 79 70 65 3a 0a 3c 2f 70 3e 0a 3c |ata type:.

.<| 521s 00001120 70 72 65 3e 2f 2f 20 47 65 74 20 70 61 63 6b 65 |pre>// Get packe| 521s 00001130 74 73 20 66 72 6f 6d 20 73 6f 6d 65 20 73 6f 75 |ts from some sou| 521s 00001140 72 63 65 0a 66 6f 72 20 70 61 63 6b 65 74 20 3a |rce.for packet :| 521s 00001150 3d 20 72 61 6e 67 65 20 73 6f 6d 65 53 6f 75 72 |= range someSour| 521s 00001160 63 65 20 7b 0a 20 20 69 66 20 61 70 70 20 3a 3d |ce {. if app :=| 521s 00001170 20 70 61 63 6b 65 74 2e 41 70 70 6c 69 63 61 74 | packet.Applicat| 521s 00001180 69 6f 6e 4c 61 79 65 72 28 29 3b 20 61 70 70 20 |ionLayer(); app | 521s 00001190 21 3d 20 6e 69 6c 20 7b 0a 20 20 20 20 69 66 20 |!= nil {. if | 521s 000011a0 73 74 72 69 6e 67 73 2e 43 6f 6e 74 61 69 6e 73 |strings.Contains| 521s 000011b0 28 73 74 72 69 6e 67 28 61 70 70 2e 50 61 79 6c |(string(app.Payl| 521s 000011c0 6f 61 64 28 29 29 2c 20 26 23 33 34 3b 6d 61 67 |oad()), "mag| 521s 000011d0 69 63 20 73 74 72 69 6e 67 26 23 33 34 3b 29 20 |ic string") | 521s 000011e0 7b 0a 20 20 20 20 20 20 66 6d 74 2e 50 72 69 6e |{. fmt.Prin| 521s 000011f0 74 6c 6e 28 26 23 33 34 3b 46 6f 75 6e 64 20 6d |tln("Found m| 521s 00001200 61 67 69 63 20 73 74 72 69 6e 67 20 69 6e 20 61 |agic string in a| 521s 00001210 20 70 61 63 6b 65 74 21 26 23 33 34 3b 29 0a 20 | packet!"). | 521s 00001220 20 20 20 7d 0a 20 20 7d 0a 7d 0a 3c 2f 70 72 65 | }. }.}..

.A particul| 521s 00001240 61 72 6c 79 20 75 73 65 66 75 6c 20 6c 61 79 65 |arly useful laye| 521s 00001250 72 20 69 73 20 45 72 72 6f 72 4c 61 79 65 72 2c |r is ErrorLayer,| 521s 00001260 20 77 68 69 63 68 20 69 73 20 73 65 74 20 77 68 | which is set wh| 521s 00001270 65 6e 65 76 65 72 20 74 68 65 72 65 26 23 33 39 |enever there'| 521s 00001280 3b 73 0a 61 6e 20 65 72 72 6f 72 20 70 61 72 73 |;s.an error pars| 521s 00001290 69 6e 67 20 70 61 72 74 20 6f 66 20 74 68 65 20 |ing part of the | 521s 000012a0 70 61 63 6b 65 74 2e 0a 3c 2f 70 3e 0a 3c 70 72 |packet..

.packet := gopa| 521s 000012c0 63 6b 65 74 2e 4e 65 77 50 61 63 6b 65 74 28 6d |cket.NewPacket(m| 521s 000012d0 79 50 61 63 6b 65 74 44 61 74 61 2c 20 6c 61 79 |yPacketData, lay| 521s 000012e0 65 72 73 2e 4c 61 79 65 72 54 79 70 65 45 74 68 |ers.LayerTypeEth| 521s 000012f0 65 72 6e 65 74 2c 20 67 6f 70 61 63 6b 65 74 2e |ernet, gopacket.| 521s 00001300 44 65 66 61 75 6c 74 29 0a 69 66 20 65 72 72 20 |Default).if err | 521s 00001310 3a 3d 20 70 61 63 6b 65 74 2e 45 72 72 6f 72 4c |:= packet.ErrorL| 521s 00001320 61 79 65 72 28 29 3b 20 65 72 72 20 21 3d 20 6e |ayer(); err != n| 521s 00001330 69 6c 20 7b 0a 20 20 66 6d 74 2e 50 72 69 6e 74 |il {. fmt.Print| 521s 00001340 6c 6e 28 26 23 33 34 3b 45 72 72 6f 72 20 64 65 |ln("Error de| 521s 00001350 63 6f 64 69 6e 67 20 73 6f 6d 65 20 70 61 72 74 |coding some part| 521s 00001360 20 6f 66 20 74 68 65 20 70 61 63 6b 65 74 3a 26 | of the packet:&| 521s 00001370 23 33 34 3b 2c 20 65 72 72 29 0a 7d 0a 3c 2f 70 |#34;, err).}.
.

.Note tha| 521s 00001390 74 20 77 65 20 64 6f 6e 26 23 33 39 3b 74 20 72 |t we don't r| 521s 000013a0 65 74 75 72 6e 20 61 6e 20 65 72 72 6f 72 20 66 |eturn an error f| 521s 000013b0 72 6f 6d 20 4e 65 77 50 61 63 6b 65 74 20 62 65 |rom NewPacket be| 521s 000013c0 63 61 75 73 65 20 77 65 20 6d 61 79 20 68 61 76 |cause we may hav| 521s 000013d0 65 20 64 65 63 6f 64 65 64 0a 61 20 6e 75 6d 62 |e decoded.a numb| 521s 000013e0 65 72 20 6f 66 20 6c 61 79 65 72 73 20 73 75 63 |er of layers suc| 521s 000013f0 63 65 73 73 66 75 6c 6c 79 20 62 65 66 6f 72 65 |cessfully before| 521s 00001400 20 72 75 6e 6e 69 6e 67 20 69 6e 74 6f 20 6f 75 | running into ou| 521s 00001410 72 20 65 72 72 6f 6e 65 6f 75 73 20 6c 61 79 65 |r erroneous laye| 521s 00001420 72 2e 20 20 59 6f 75 0a 6d 61 79 20 73 74 69 6c |r. You.may stil| 521s 00001430 6c 20 62 65 20 61 62 6c 65 20 74 6f 20 67 65 74 |l be able to get| 521s 00001440 20 79 6f 75 72 20 45 74 68 65 72 6e 65 74 20 61 | your Ethernet a| 521s 00001450 6e 64 20 49 50 76 34 20 6c 61 79 65 72 73 20 63 |nd IPv4 layers c| 521s 00001460 6f 72 72 65 63 74 6c 79 2c 20 65 76 65 6e 20 69 |orrectly, even i| 521s 00001470 66 0a 79 6f 75 72 20 54 43 50 20 6c 61 79 65 72 |f.your TCP layer| 521s 00001480 20 69 73 20 6d 61 6c 66 6f 72 6d 65 64 2e 0a 3c | is malformed..<| 521s 00001490 2f 70 3e 0a 3c 68 33 20 69 64 3d 22 46 6c 6f 77 |/p>.

F| 521s 000014b0 6c 6f 77 20 41 6e 64 20 45 6e 64 70 6f 69 6e 74 |low And Endpoint| 521s 000014c0 3c 2f 68 33 3e 0a 3c 70 3e 0a 67 6f 70 61 63 6b |

.

.gopack| 521s 000014d0 65 74 20 68 61 73 20 74 77 6f 20 75 73 65 66 75 |et has two usefu| 521s 000014e0 6c 20 6f 62 6a 65 63 74 73 2c 20 46 6c 6f 77 20 |l objects, Flow | 521s 000014f0 61 6e 64 20 45 6e 64 70 6f 69 6e 74 2c 20 66 6f |and Endpoint, fo| 521s 00001500 72 20 63 6f 6d 6d 75 6e 69 63 61 74 69 6e 67 20 |r communicating | 521s 00001510 69 6e 20 61 20 70 72 6f 74 6f 63 6f 6c 0a 69 6e |in a protocol.in| 521s 00001520 64 65 70 65 6e 64 65 6e 74 20 6d 61 6e 6e 65 72 |dependent manner| 521s 00001530 20 74 68 65 20 66 61 63 74 20 74 68 61 74 20 61 | the fact that a| 521s 00001540 20 70 61 63 6b 65 74 20 69 73 20 63 6f 6d 69 6e | packet is comin| 521s 00001550 67 20 66 72 6f 6d 20 41 20 61 6e 64 20 67 6f 69 |g from A and goi| 521s 00001560 6e 67 20 74 6f 20 42 2e 0a 54 68 65 20 67 65 6e |ng to B..The gen| 521s 00001570 65 72 61 6c 20 6c 61 79 65 72 20 74 79 70 65 73 |eral layer types| 521s 00001580 20 4c 69 6e 6b 4c 61 79 65 72 2c 20 4e 65 74 77 | LinkLayer, Netw| 521s 00001590 6f 72 6b 4c 61 79 65 72 2c 20 61 6e 64 20 54 72 |orkLayer, and Tr| 521s 000015a0 61 6e 73 70 6f 72 74 4c 61 79 65 72 20 61 6c 6c |ansportLayer all| 521s 000015b0 20 70 72 6f 76 69 64 65 0a 6d 65 74 68 6f 64 73 | provide.methods| 521s 000015c0 20 66 6f 72 20 65 78 74 72 61 63 74 69 6e 67 20 | for extracting | 521s 000015d0 74 68 65 69 72 20 66 6c 6f 77 20 69 6e 66 6f 72 |their flow infor| 521s 000015e0 6d 61 74 69 6f 6e 2c 20 77 69 74 68 6f 75 74 20 |mation, without | 521s 000015f0 77 6f 72 72 79 69 6e 67 20 61 62 6f 75 74 20 74 |worrying about t| 521s 00001600 68 65 20 74 79 70 65 0a 6f 66 20 74 68 65 20 75 |he type.of the u| 521s 00001610 6e 64 65 72 6c 79 69 6e 67 20 4c 61 79 65 72 2e |nderlying Layer.| 521s 00001620 0a 3c 2f 70 3e 0a 3c 70 3e 0a 41 20 46 6c 6f 77 |.

.

.A Flow| 521s 00001630 20 69 73 20 61 20 73 69 6d 70 6c 65 20 6f 62 6a | is a simple obj| 521s 00001640 65 63 74 20 6d 61 64 65 20 75 70 20 6f 66 20 61 |ect made up of a| 521s 00001650 20 73 65 74 20 6f 66 20 74 77 6f 20 45 6e 64 70 | set of two Endp| 521s 00001660 6f 69 6e 74 73 2c 20 6f 6e 65 20 73 6f 75 72 63 |oints, one sourc| 521s 00001670 65 20 61 6e 64 20 6f 6e 65 0a 64 65 73 74 69 6e |e and one.destin| 521s 00001680 61 74 69 6f 6e 2e 20 20 49 74 20 64 65 74 61 69 |ation. It detai| 521s 00001690 6c 73 20 74 68 65 20 73 65 6e 64 65 72 20 61 6e |ls the sender an| 521s 000016a0 64 20 72 65 63 65 69 76 65 72 20 6f 66 20 74 68 |d receiver of th| 521s 000016b0 65 20 4c 61 79 65 72 20 6f 66 20 74 68 65 20 50 |e Layer of the P| 521s 000016c0 61 63 6b 65 74 2e 0a 3c 2f 70 3e 0a 3c 70 3e 0a |acket..

.

.| 521s 000016d0 41 6e 20 45 6e 64 70 6f 69 6e 74 20 69 73 20 61 |An Endpoint is a| 521s 000016e0 20 68 61 73 68 61 62 6c 65 20 72 65 70 72 65 73 | hashable repres| 521s 000016f0 65 6e 74 61 74 69 6f 6e 20 6f 66 20 61 20 73 6f |entation of a so| 521s 00001700 75 72 63 65 20 6f 72 20 64 65 73 74 69 6e 61 74 |urce or destinat| 521s 00001710 69 6f 6e 2e 20 20 46 6f 72 0a 65 78 61 6d 70 6c |ion. For.exampl| 521s 00001720 65 2c 20 66 6f 72 20 4c 61 79 65 72 54 79 70 65 |e, for LayerType| 521s 00001730 49 50 76 34 2c 20 61 6e 20 45 6e 64 70 6f 69 6e |IPv4, an Endpoin| 521s 00001740 74 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 49 |t contains the I| 521s 00001750 50 20 61 64 64 72 65 73 73 20 62 79 74 65 73 20 |P address bytes | 521s 00001760 66 6f 72 20 61 20 76 34 0a 49 50 20 70 61 63 6b |for a v4.IP pack| 521s 00001770 65 74 2e 20 20 41 20 46 6c 6f 77 20 63 61 6e 20 |et. A Flow can | 521s 00001780 62 65 20 62 72 6f 6b 65 6e 20 69 6e 74 6f 20 45 |be broken into E| 521s 00001790 6e 64 70 6f 69 6e 74 73 2c 20 61 6e 64 20 45 6e |ndpoints, and En| 521s 000017a0 64 70 6f 69 6e 74 73 20 63 61 6e 20 62 65 20 63 |dpoints can be c| 521s 000017b0 6f 6d 62 69 6e 65 64 0a 69 6e 74 6f 20 46 6c 6f |ombined.into Flo| 521s 000017c0 77 73 3a 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 70 61 |ws:.

.
pa|
521s         000017d0  63 6b 65 74 20 3a 3d 20  67 6f 70 61 63 6b 65 74  |cket := gopacket|
521s         000017e0  2e 4e 65 77 50 61 63 6b  65 74 28 6d 79 50 61 63  |.NewPacket(myPac|
521s         000017f0  6b 65 74 44 61 74 61 2c  20 6c 61 79 65 72 73 2e  |ketData, layers.|
521s         00001800  4c 61 79 65 72 54 79 70  65 45 74 68 65 72 6e 65  |LayerTypeEtherne|
521s         00001810  74 2c 20 67 6f 70 61 63  6b 65 74 2e 4c 61 7a 79  |t, gopacket.Lazy|
521s         00001820  29 0a 6e 65 74 46 6c 6f  77 20 3a 3d 20 70 61 63  |).netFlow := pac|
521s         00001830  6b 65 74 2e 4e 65 74 77  6f 72 6b 4c 61 79 65 72  |ket.NetworkLayer|
521s         00001840  28 29 2e 4e 65 74 77 6f  72 6b 46 6c 6f 77 28 29  |().NetworkFlow()|
521s         00001850  0a 73 72 63 2c 20 64 73  74 20 3a 3d 20 6e 65 74  |.src, dst := net|
521s         00001860  46 6c 6f 77 2e 45 6e 64  70 6f 69 6e 74 73 28 29  |Flow.Endpoints()|
521s         00001870  0a 72 65 76 65 72 73 65  46 6c 6f 77 20 3a 3d 20  |.reverseFlow := |
521s         00001880  67 6f 70 61 63 6b 65 74  2e 4e 65 77 46 6c 6f 77  |gopacket.NewFlow|
521s         00001890  28 64 73 74 2c 20 73 72  63 29 0a 3c 2f 70 72 65  |(dst, src)..

.Both Endpo| 521s 000018b0 69 6e 74 20 61 6e 64 20 46 6c 6f 77 20 6f 62 6a |int and Flow obj| 521s 000018c0 65 63 74 73 20 63 61 6e 20 62 65 20 75 73 65 64 |ects can be used| 521s 000018d0 20 61 73 20 6d 61 70 20 6b 65 79 73 2c 20 61 6e | as map keys, an| 521s 000018e0 64 20 74 68 65 20 65 71 75 61 6c 69 74 79 0a 6f |d the equality.o| 521s 000018f0 70 65 72 61 74 6f 72 20 63 61 6e 20 63 6f 6d 70 |perator can comp| 521s 00001900 61 72 65 20 74 68 65 6d 2c 20 73 6f 20 79 6f 75 |are them, so you| 521s 00001910 20 63 61 6e 20 65 61 73 69 6c 79 20 67 72 6f 75 | can easily grou| 521s 00001920 70 20 74 6f 67 65 74 68 65 72 20 61 6c 6c 20 70 |p together all p| 521s 00001930 61 63 6b 65 74 73 0a 62 61 73 65 64 20 6f 6e 20 |ackets.based on | 521s 00001940 65 6e 64 70 6f 69 6e 74 20 63 72 69 74 65 72 69 |endpoint criteri| 521s 00001950 61 3a 0a 3c 2f 70 3e 0a 3c 70 72 65 3e 66 6c 6f |a:.

.
flo|
521s         00001960  77 73 20 3a 3d 20 6d 61  70 5b 67 6f 70 61 63 6b  |ws := map[gopack|
521s         00001970  65 74 2e 45 6e 64 70 6f  69 6e 74 5d 63 68 61 6e  |et.Endpoint]chan|
521s         00001980  20 67 6f 70 61 63 6b 65  74 2e 50 61 63 6b 65 74  | gopacket.Packet|
521s         00001990  0a 70 61 63 6b 65 74 20  3a 3d 20 67 6f 70 61 63  |.packet := gopac|
521s         000019a0  6b 65 74 2e 4e 65 77 50  61 63 6b 65 74 28 6d 79  |ket.NewPacket(my|
521s         000019b0  50 61 63 6b 65 74 44 61  74 61 2c 20 6c 61 79 65  |PacketData, laye|
521s         000019c0  72 73 2e 4c 61 79 65 72  54 79 70 65 45 74 68 65  |rs.LayerTypeEthe|
521s         000019d0  72 6e 65 74 2c 20 67 6f  70 61 63 6b 65 74 2e 4c  |rnet, gopacket.L|
521s         000019e0  61 7a 79 29 0a 2f 2f 20  53 65 6e 64 20 61 6c 6c  |azy).// Send all|
521s         000019f0  20 54 43 50 20 70 61 63  6b 65 74 73 20 74 6f 20  | TCP packets to |
521s         00001a00  63 68 61 6e 6e 65 6c 73  20 62 61 73 65 64 20 6f  |channels based o|
521s         00001a10  6e 20 74 68 65 69 72 20  64 65 73 74 69 6e 61 74  |n their destinat|
521s         00001a20  69 6f 6e 20 70 6f 72 74  2e 0a 69 66 20 74 63 70  |ion port..if tcp|
521s         00001a30  20 3a 3d 20 70 61 63 6b  65 74 2e 4c 61 79 65 72  | := packet.Layer|
521s         00001a40  28 6c 61 79 65 72 73 2e  4c 61 79 65 72 54 79 70  |(layers.LayerTyp|
521s         00001a50  65 54 43 50 29 3b 20 74  63 70 20 21 3d 20 6e 69  |eTCP); tcp != ni|
521s         00001a60  6c 20 7b 0a 20 20 66 6c  6f 77 73 5b 74 63 70 2e  |l {.  flows[tcp.|
521s         00001a70  54 72 61 6e 73 70 6f 72  74 46 6c 6f 77 28 29 2e  |TransportFlow().|
521s         00001a80  44 73 74 28 29 5d 20 26  6c 74 3b 2d 20 70 61 63  |Dst()] <- pac|
521s         00001a90  6b 65 74 0a 7d 0a 2f 2f  20 4c 6f 6f 6b 20 66 6f  |ket.}.// Look fo|
521s         00001aa0  72 20 61 6c 6c 20 70 61  63 6b 65 74 73 20 77 69  |r all packets wi|
521s         00001ab0  74 68 20 74 68 65 20 73  61 6d 65 20 73 6f 75 72  |th the same sour|
521s         00001ac0  63 65 20 61 6e 64 20 64  65 73 74 69 6e 61 74 69  |ce and destinati|
521s         00001ad0  6f 6e 20 6e 65 74 77 6f  72 6b 20 61 64 64 72 65  |on network addre|
521s         00001ae0  73 73 0a 69 66 20 6e 65  74 20 3a 3d 20 70 61 63  |ss.if net := pac|
521s         00001af0  6b 65 74 2e 4e 65 74 77  6f 72 6b 4c 61 79 65 72  |ket.NetworkLayer|
521s         00001b00  28 29 3b 20 6e 65 74 20  21 3d 20 6e 69 6c 20 7b  |(); net != nil {|
521s         00001b10  0a 20 20 73 72 63 2c 20  64 73 74 20 3a 3d 20 6e  |.  src, dst := n|
521s         00001b20  65 74 2e 4e 65 74 77 6f  72 6b 46 6c 6f 77 28 29  |et.NetworkFlow()|
521s         00001b30  2e 45 6e 64 70 6f 69 6e  74 73 28 29 0a 20 20 69  |.Endpoints().  i|
521s         00001b40  66 20 73 72 63 20 3d 3d  20 64 73 74 20 7b 0a 20  |f src == dst {. |
521s         00001b50  20 20 20 66 6d 74 2e 50  72 69 6e 74 6c 6e 28 26  |   fmt.Println(&|
521s         00001b60  23 33 34 3b 46 69 73 68  79 20 70 61 63 6b 65 74  |#34;Fishy packet|
521s         00001b70  20 68 61 73 20 73 61 6d  65 20 6e 65 74 77 6f 72  | has same networ|
521s         00001b80  6b 20 73 6f 75 72 63 65  20 61 6e 64 20 64 73 74  |k source and dst|
521s         00001b90  3a 20 25 73 26 23 33 34  3b 2c 20 73 72 63 29 0a  |: %s", src).|
521s         00001ba0  20 20 7d 0a 7d 0a 2f 2f  20 46 69 6e 64 20 61 6c  |  }.}.// Find al|
521s         00001bb0  6c 20 70 61 63 6b 65 74  73 20 63 6f 6d 69 6e 67  |l packets coming|
521s         00001bc0  20 66 72 6f 6d 20 55 44  50 20 70 6f 72 74 20 31  | from UDP port 1|
521s         00001bd0  30 30 30 20 74 6f 20 55  44 50 20 70 6f 72 74 20  |000 to UDP port |
521s         00001be0  35 30 30 0a 69 6e 74 65  72 65 73 74 69 6e 67 46  |500.interestingF|
521s         00001bf0  6c 6f 77 20 3a 3d 20 67  6f 70 61 63 6b 65 74 2e  |low := gopacket.|
521s         00001c00  4e 65 77 46 6c 6f 77 28  6c 61 79 65 72 73 2e 4e  |NewFlow(layers.N|
521s         00001c10  65 77 55 44 50 50 6f 72  74 45 6e 64 70 6f 69 6e  |ewUDPPortEndpoin|
521s         00001c20  74 28 31 30 30 30 29 2c  20 6c 61 79 65 72 73 2e  |t(1000), layers.|
521s         00001c30  4e 65 77 55 44 50 50 6f  72 74 45 6e 64 70 6f 69  |NewUDPPortEndpoi|
521s         00001c40  6e 74 28 35 30 30 29 29  0a 69 66 20 74 20 3a 3d  |nt(500)).if t :=|
521s         00001c50  20 70 61 63 6b 65 74 2e  4e 65 74 77 6f 72 6b 4c  | packet.NetworkL|
521s         00001c60  61 79 65 72 28 29 3b 20  74 20 21 3d 20 6e 69 6c  |ayer(); t != nil|
521s         00001c70  20 26 61 6d 70 3b 26 61  6d 70 3b 20 74 2e 54 72  | && t.Tr|
521s         00001c80  61 6e 73 70 6f 72 74 46  6c 6f 77 28 29 20 3d 3d  |ansportFlow() ==|
521s         00001c90  20 69 6e 74 65 72 65 73  74 69 6e 67 46 6c 6f 77  | interestingFlow|
521s         00001ca0  20 7b 0a 20 20 66 6d 74  2e 50 72 69 6e 74 6c 6e  | {.  fmt.Println|
521s         00001cb0  28 26 23 33 34 3b 46 6f  75 6e 64 20 74 68 61 74  |("Found that|
521s         00001cc0  20 55 44 50 20 66 6c 6f  77 20 49 20 77 61 73 20  | UDP flow I was |
521s         00001cd0  6c 6f 6f 6b 69 6e 67 20  66 6f 72 21 26 23 33 34  |looking for!"|
521s         00001ce0  3b 29 0a 7d 0a 3c 2f 70  72 65 3e 0a 3c 68 33 20  |;).}.
.

Implementing | 521s 00001d20 59 6f 75 72 20 4f 77 6e 20 44 65 63 6f 64 65 72 |Your Own Decoder| 521s 00001d30 3c 2f 68 33 3e 0a 3c 70 3e 0a 49 66 20 79 6f 75 |

.

.If you| 521s 00001d40 72 20 6e 65 74 77 6f 72 6b 20 68 61 73 20 73 6f |r network has so| 521s 00001d50 6d 65 20 73 74 72 61 6e 67 65 20 65 6e 63 61 70 |me strange encap| 521s 00001d60 73 75 6c 61 74 69 6f 6e 2c 20 79 6f 75 20 63 61 |sulation, you ca| 521s 00001d70 6e 20 69 6d 70 6c 65 6d 65 6e 74 20 79 6f 75 72 |n implement your| 521s 00001d80 20 6f 77 6e 0a 64 65 63 6f 64 65 72 2e 20 20 49 | own.decoder. I| 521s 00001d90 6e 20 74 68 69 73 20 65 78 61 6d 70 6c 65 2c 20 |n this example, | 521s 00001da0 77 65 20 68 61 6e 64 6c 65 20 45 74 68 65 72 6e |we handle Ethern| 521s 00001db0 65 74 20 70 61 63 6b 65 74 73 20 77 68 69 63 68 |et packets which| 521s 00001dc0 20 61 72 65 20 65 6e 63 61 70 73 75 6c 61 74 65 | are encapsulate| 521s 00001dd0 64 0a 69 6e 20 61 20 34 2d 62 79 74 65 20 68 65 |d.in a 4-byte he| 521s 00001de0 61 64 65 72 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 3e |ader..

.
|
521s         00001df0  2f 2f 20 43 72 65 61 74  65 20 61 20 6c 61 79 65  |// Create a laye|
521s         00001e00  72 20 74 79 70 65 2c 20  73 68 6f 75 6c 64 20 62  |r type, should b|
521s         00001e10  65 20 75 6e 69 71 75 65  20 61 6e 64 20 68 69 67  |e unique and hig|
521s         00001e20  68 2c 20 73 6f 20 69 74  20 64 6f 65 73 6e 26 23  |h, so it doesn&#|
521s         00001e30  33 39 3b 74 20 63 6f 6e  66 6c 69 63 74 2c 0a 2f  |39;t conflict,./|
521s         00001e40  2f 20 67 69 76 69 6e 67  20 69 74 20 61 20 6e 61  |/ giving it a na|
521s         00001e50  6d 65 20 61 6e 64 20 61  20 64 65 63 6f 64 65 72  |me and a decoder|
521s         00001e60  20 74 6f 20 75 73 65 2e  0a 76 61 72 20 4d 79 4c  | to use..var MyL|
521s         00001e70  61 79 65 72 54 79 70 65  20 3d 20 67 6f 70 61 63  |ayerType = gopac|
521s         00001e80  6b 65 74 2e 52 65 67 69  73 74 65 72 4c 61 79 65  |ket.RegisterLaye|
521s         00001e90  72 54 79 70 65 28 31 32  33 34 35 2c 20 26 23 33  |rType(12345, |
521s         00001ea0  34 3b 4d 79 4c 61 79 65  72 54 79 70 65 26 23 33  |4;MyLayerType|
521s         00001eb0  34 3b 2c 20 67 6f 70 61  63 6b 65 74 2e 44 65 63  |4;, gopacket.Dec|
521s         00001ec0  6f 64 65 46 75 6e 63 28  64 65 63 6f 64 65 4d 79  |odeFunc(decodeMy|
521s         00001ed0  4c 61 79 65 72 29 29 0a  0a 2f 2f 20 49 6d 70 6c  |Layer))..// Impl|
521s         00001ee0  65 6d 65 6e 74 20 6d 79  20 6c 61 79 65 72 0a 74  |ement my layer.t|
521s         00001ef0  79 70 65 20 4d 79 4c 61  79 65 72 20 73 74 72 75  |ype MyLayer stru|
521s         00001f00  63 74 20 7b 0a 20 20 53  74 72 61 6e 67 65 48 65  |ct {.  StrangeHe|
521s         00001f10  61 64 65 72 20 5b 5d 62  79 74 65 0a 20 20 70 61  |ader []byte.  pa|
521s         00001f20  79 6c 6f 61 64 20 5b 5d  62 79 74 65 0a 7d 0a 66  |yload []byte.}.f|
521s         00001f30  75 6e 63 20 28 6d 20 4d  79 4c 61 79 65 72 29 20  |unc (m MyLayer) |
521s         00001f40  4c 61 79 65 72 54 79 70  65 28 29 20 4c 61 79 65  |LayerType() Laye|
521s         00001f50  72 54 79 70 65 20 7b 20  72 65 74 75 72 6e 20 4d  |rType { return M|
521s         00001f60  79 4c 61 79 65 72 54 79  70 65 20 7d 0a 66 75 6e  |yLayerType }.fun|
521s         00001f70  63 20 28 6d 20 4d 79 4c  61 79 65 72 29 20 4c 61  |c (m MyLayer) La|
521s         00001f80  79 65 72 43 6f 6e 74 65  6e 74 73 28 29 20 5b 5d  |yerContents() []|
521s         00001f90  62 79 74 65 20 7b 20 72  65 74 75 72 6e 20 6d 2e  |byte { return m.|
521s         00001fa0  53 74 72 61 6e 67 65 48  65 61 64 65 72 20 7d 0a  |StrangeHeader }.|
521s         00001fb0  66 75 6e 63 20 28 6d 20  4d 79 4c 61 79 65 72 29  |func (m MyLayer)|
521s         00001fc0  20 4c 61 79 65 72 50 61  79 6c 6f 61 64 28 29 20  | LayerPayload() |
521s         00001fd0  5b 5d 62 79 74 65 20 7b  20 72 65 74 75 72 6e 20  |[]byte { return |
521s         00001fe0  6d 2e 70 61 79 6c 6f 61  64 20 7d 0a 0a 2f 2f 20  |m.payload }..// |
521s         00001ff0  4e 6f 77 20 69 6d 70 6c  65 6d 65 6e 74 20 61 20  |Now implement a |
521s         00002000  64 65 63 6f 64 65 72 2e  2e 2e 20 74 68 69 73 20  |decoder... this |
521s         00002010  6f 6e 65 20 73 74 72 69  70 73 20 6f 66 66 20 74  |one strips off t|
521s         00002020  68 65 20 66 69 72 73 74  20 34 20 62 79 74 65 73  |he first 4 bytes|
521s         00002030  20 6f 66 20 74 68 65 0a  2f 2f 20 70 61 63 6b 65  | of the.// packe|
521s         00002040  74 2e 0a 66 75 6e 63 20  64 65 63 6f 64 65 4d 79  |t..func decodeMy|
521s         00002050  4c 61 79 65 72 28 64 61  74 61 20 5b 5d 62 79 74  |Layer(data []byt|
521s         00002060  65 2c 20 70 20 67 6f 70  61 63 6b 65 74 2e 50 61  |e, p gopacket.Pa|
521s         00002070  63 6b 65 74 42 75 69 6c  64 65 72 29 20 65 72 72  |cketBuilder) err|
521s         00002080  6f 72 20 7b 0a 20 20 2f  2f 20 43 72 65 61 74 65  |or {.  // Create|
521s         00002090  20 6d 79 20 6c 61 79 65  72 0a 20 20 70 2e 41 64  | my layer.  p.Ad|
521s         000020a0  64 4c 61 79 65 72 28 26  61 6d 70 3b 4d 79 4c 61  |dLayer(&MyLa|
521s         000020b0  79 65 72 7b 64 61 74 61  5b 3a 34 5d 2c 20 64 61  |yer{data[:4], da|
521s         000020c0  74 61 5b 34 3a 5d 7d 29  0a 20 20 2f 2f 20 44 65  |ta[4:]}).  // De|
521s         000020d0  74 65 72 6d 69 6e 65 20  68 6f 77 20 74 6f 20 68  |termine how to h|
521s         000020e0  61 6e 64 6c 65 20 74 68  65 20 72 65 73 74 20 6f  |andle the rest o|
521s         000020f0  66 20 74 68 65 20 70 61  63 6b 65 74 0a 20 20 72  |f the packet.  r|
521s         00002100  65 74 75 72 6e 20 70 2e  4e 65 78 74 44 65 63 6f  |eturn p.NextDeco|
521s         00002110  64 65 72 28 6c 61 79 65  72 73 2e 4c 61 79 65 72  |der(layers.Layer|
521s         00002120  54 79 70 65 45 74 68 65  72 6e 65 74 29 0a 7d 0a  |TypeEthernet).}.|
521s         00002130  0a 2f 2f 20 46 69 6e 61  6c 6c 79 2c 20 64 65 63  |.// Finally, dec|
521s         00002140  6f 64 65 20 79 6f 75 72  20 70 61 63 6b 65 74 73  |ode your packets|
521s         00002150  3a 0a 70 20 3a 3d 20 67  6f 70 61 63 6b 65 74 2e  |:.p := gopacket.|
521s         00002160  4e 65 77 50 61 63 6b 65  74 28 64 61 74 61 2c 20  |NewPacket(data, |
521s         00002170  4d 79 4c 61 79 65 72 54  79 70 65 2c 20 67 6f 70  |MyLayerType, gop|
521s         00002180  61 63 6b 65 74 2e 4c 61  7a 79 29 0a 3c 2f 70 72  |acket.Lazy)..

.See the d| 521s 000021a0 6f 63 73 20 66 6f 72 20 44 65 63 6f 64 65 72 20 |ocs for Decoder | 521s 000021b0 61 6e 64 20 50 61 63 6b 65 74 42 75 69 6c 64 65 |and PacketBuilde| 521s 000021c0 72 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 |r for more detai| 521s 000021d0 6c 73 20 6f 6e 20 68 6f 77 20 63 6f 64 69 6e 67 |ls on how coding| 521s 000021e0 0a 64 65 63 6f 64 65 72 73 20 77 6f 72 6b 73 2c |.decoders works,| 521s 000021f0 20 6f 72 20 6c 6f 6f 6b 20 61 74 20 52 65 67 69 | or look at Regi| 521s 00002200 73 74 65 72 4c 61 79 65 72 54 79 70 65 20 61 6e |sterLayerType an| 521s 00002210 64 20 52 65 67 69 73 74 65 72 45 6e 64 70 6f 69 |d RegisterEndpoi| 521s 00002220 6e 74 54 79 70 65 20 74 6f 20 73 65 65 20 68 6f |ntType to see ho| 521s 00002230 77 0a 74 6f 20 61 64 64 20 6c 61 79 65 72 2f 65 |w.to add layer/e| 521s 00002240 6e 64 70 6f 69 6e 74 20 74 79 70 65 73 20 74 6f |ndpoint types to| 521s 00002250 20 67 6f 70 61 63 6b 65 74 2e 0a 3c 2f 70 3e 0a | gopacket..

.| 521s 00002260 0a 09 09 09 3c 2f 64 69 76 3e 0a 09 09 3c 2f 64 |...............

In| 521s 00002290 64 65 78 3c 2f 68 32 3e 0a 09 09 3c 21 2d 2d 20 |dex

......| 521s 000022f0 3c 64 69 76 20 69 64 3d 22 6d 61 6e 75 61 6c 2d |
....
...| 521s 00002310 09 0a 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 |..........
Variables| 521s 00002340 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 0a 09 09 |
.......| 521s 00002350 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 00002360 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 41 70 70 |dd>t| 521s 00002380 79 70 65 20 41 70 70 6c 69 63 61 74 69 6f 6e 4c |ype ApplicationL| 521s 00002390 61 79 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 |ayer...| 521s 000023a0 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 000023b0 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 |.....
| 521s 000023d0 74 79 70 65 20 43 61 70 74 75 72 65 49 6e 66 6f |type CaptureInfo| 521s 000023e0 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 000023f0 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002400 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 44 |.
ty| 521s 00002420 70 65 20 44 65 63 6f 64 65 46 61 69 6c 75 72 65 |pe DecodeFailure| 521s 00002430 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 00002440 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00002450 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00002460 20 3c 61 20 68 72 65 66 3d 22 23 44 65 63 6f 64 | | 521s 00002480 66 75 6e 63 20 28 64 20 2a 44 65 63 6f 64 65 46 |func (d *DecodeF| 521s 00002490 61 69 6c 75 72 65 29 20 45 72 72 6f 72 28 29 20 |ailure) Error() | 521s 000024a0 65 72 72 6f 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |error..| 521s 000024b0 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 000024c0 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 000024d0 20 3c 61 20 68 72 65 66 3d 22 23 44 65 63 6f 64 | func (d | 521s 00002500 2a 44 65 63 6f 64 65 46 61 69 6c 75 72 65 29 20 |*DecodeFailure) | 521s 00002510 4c 61 79 65 72 43 6f 6e 74 65 6e 74 73 28 29 20 |LayerContents() | 521s 00002520 5b 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a |[]byte.| 521s 00002530 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 00002540 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 00002550 3b 20 3c 61 20 68 72 65 66 3d 22 23 44 65 63 6f |; func (d | 521s 00002580 2a 44 65 63 6f 64 65 46 61 69 6c 75 72 65 29 20 |*DecodeFailure) | 521s 00002590 4c 61 79 65 72 50 61 79 6c 6f 61 64 28 29 20 5b |LayerPayload() [| 521s 000025a0 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |]byte
..| 521s 000025b0 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 000025c0 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 000025d0 20 3c 61 20 68 72 65 66 3d 22 23 44 65 63 6f 64 | func (d *Dec| 521s 00002600 6f 64 65 46 61 69 6c 75 72 65 29 20 4c 61 79 65 |odeFailure) Laye| 521s 00002610 72 54 79 70 65 28 29 20 4c 61 79 65 72 54 79 70 |rType() LayerTyp| 521s 00002620 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |e......| 521s 00002630 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 00002640 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   fun| 521s 00002670 63 20 28 64 20 2a 44 65 63 6f 64 65 46 61 69 6c |c (d *DecodeFail| 521s 00002680 75 72 65 29 20 53 74 72 69 6e 67 28 29 20 73 74 |ure) String() st| 521s 00002690 72 69 6e 67 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 |ring
...| 521s 000026a0 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 |................| 521s 000026b0 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 44 65 |
type D| 521s 000026d0 65 63 6f 64 65 46 75 6e 63 3c 2f 61 3e 3c 2f 64 |ecodeFunc..............| 521s 000026f0 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 |........
&nbs| 521s 00002700 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 |p;   func (d D| 521s 00002730 65 63 6f 64 65 46 75 6e 63 29 20 44 65 63 6f 64 |ecodeFunc) Decod| 521s 00002740 65 28 64 61 74 61 20 5b 5d 62 79 74 65 2c 20 70 |e(data []byte, p| 521s 00002750 20 50 61 63 6b 65 74 42 75 69 6c 64 65 72 29 20 | PacketBuilder) | 521s 00002760 65 72 72 6f 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |error
..| 521s 00002770 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002780 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 44 |.
ty| 521s 000027a0 70 65 20 44 65 63 6f 64 65 4f 70 74 69 6f 6e 73 |pe DecodeOptions| 521s 000027b0 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 000027c0 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 000027d0 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 44 |.
type Dec| 521s 000027f0 6f 64 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 |oder
...| 521s 00002800 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 00002810 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 |.....
typ| 521s 00002830 65 20 45 6e 64 70 6f 69 6e 74 3c 2f 61 3e 3c 2f |e Endpoint.............| 521s 00002850 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 |....
  &| 521s 00002860 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 |nbsp; fun| 521s 00002880 63 20 4e 65 77 45 6e 64 70 6f 69 6e 74 28 74 79 |c NewEndpoint(ty| 521s 00002890 70 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 2c 20 |p EndpointType, | 521s 000028a0 72 61 77 20 5b 5d 62 79 74 65 29 20 45 6e 64 70 |raw []byte) Endp| 521s 000028b0 6f 69 6e 74 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 |oint
...| 521s 000028c0 09 09 0a 09 09 09 09 0a 09 09 09 09 09 0a 09 09 |................| 521s 000028d0 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 000028e0 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 45 |bsp; func (e En| 521s 00002910 64 70 6f 69 6e 74 29 20 45 6e 64 70 6f 69 6e 74 |dpoint) Endpoint| 521s 00002920 54 79 70 65 28 29 20 45 6e 64 70 6f 69 6e 74 54 |Type() EndpointT| 521s 00002930 79 70 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |ype
....| 521s 00002940 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 |.............    <| 521s 00002960 61 20 68 72 65 66 3d 22 23 45 6e 64 70 6f 69 6e |a href="#Endpoin| 521s 00002970 74 2e 4c 65 73 73 54 68 61 6e 22 3e 66 75 6e 63 |t.LessThan">func| 521s 00002980 20 28 61 20 45 6e 64 70 6f 69 6e 74 29 20 4c 65 | (a Endpoint) Le| 521s 00002990 73 73 54 68 61 6e 28 62 20 45 6e 64 70 6f 69 6e |ssThan(b Endpoin| 521s 000029a0 74 29 20 62 6f 6f 6c 3c 2f 61 3e 3c 2f 64 64 3e |t) bool| 521s 000029b0 0a 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 |................| 521s 000029c0 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 |.
  &nbs| 521s 000029d0 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 45 6e 64 |p; func | 521s 000029f0 28 65 20 45 6e 64 70 6f 69 6e 74 29 20 52 61 77 |(e Endpoint) Raw| 521s 00002a00 28 29 20 5b 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 |() []byte..............| 521s 00002a20 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 00002a30 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 45 |bsp; | 521s 00002a50 66 75 6e 63 20 28 65 20 45 6e 64 70 6f 69 6e 74 |func (e Endpoint| 521s 00002a60 29 20 53 74 72 69 6e 67 28 29 20 73 74 72 69 6e |) String() strin| 521s 00002a70 67 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a |g
......| 521s 00002a80 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 |.............type En| 521s 00002ab0 64 70 6f 69 6e 74 54 79 70 65 3c 2f 61 3e 3c 2f |dpointType.............| 521s 00002ad0 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 |....
  &| 521s 00002ae0 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 |nbsp; func Regis| 521s 00002b10 74 65 72 45 6e 64 70 6f 69 6e 74 54 79 70 65 28 |terEndpointType(| 521s 00002b20 6e 75 6d 20 69 6e 74 2c 20 6d 65 74 61 20 45 6e |num int, meta En| 521s 00002b30 64 70 6f 69 6e 74 54 79 70 65 4d 65 74 61 64 61 |dpointTypeMetada| 521s 00002b40 74 61 29 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 |ta) EndpointType| 521s 00002b50 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 00002b60 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00002b70 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00002b80 20 3c 61 20 68 72 65 66 3d 22 23 45 6e 64 70 6f | | 521s 00002ba0 66 75 6e 63 20 28 65 20 45 6e 64 70 6f 69 6e 74 |func (e Endpoint| 521s 00002bb0 54 79 70 65 29 20 53 74 72 69 6e 67 28 29 20 73 |Type) String() s| 521s 00002bc0 74 72 69 6e 67 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |tring..| 521s 00002bd0 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002be0 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 45 |.
type Endpoi| 521s 00002c10 6e 74 54 79 70 65 4d 65 74 61 64 61 74 61 3c 2f |ntTypeMetadata
.........| 521s 00002c30 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 00002c40 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 45 72 72 |dd>type Er| 521s 00002c60 72 6f 72 4c 61 79 65 72 3c 2f 61 3e 3c 2f 64 64 |rorLayer
...............| 521s 00002c80 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 |.........
typ| 521s 00002ca0 65 20 46 6c 6f 77 3c 2f 61 3e 3c 2f 64 64 3e 0a |e Flow
.| 521s 00002cb0 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 00002cc0 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 00002cd0 3b 20 3c 61 20 68 72 65 66 3d 22 23 46 6c 6f 77 |; f| 521s 00002cf0 75 6e 63 20 46 6c 6f 77 46 72 6f 6d 45 6e 64 70 |unc FlowFromEndp| 521s 00002d00 6f 69 6e 74 73 28 73 72 63 2c 20 64 73 74 20 45 |oints(src, dst E| 521s 00002d10 6e 64 70 6f 69 6e 74 29 20 28 5f 20 46 6c 6f 77 |ndpoint) (_ Flow| 521s 00002d20 2c 20 65 72 72 20 65 72 72 6f 72 29 3c 2f 61 3e |, err error)| 521s 00002d30 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 09 |
...........| 521s 00002d40 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b |......
 | 521s 00002d50 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d |   func | 521s 00002d70 4e 65 77 46 6c 6f 77 28 74 20 45 6e 64 70 6f 69 |NewFlow(t Endpoi| 521s 00002d80 6e 74 54 79 70 65 2c 20 73 72 63 2c 20 64 73 74 |ntType, src, dst| 521s 00002d90 20 5b 5d 62 79 74 65 29 20 46 6c 6f 77 3c 2f 61 | []byte) Flow
..........| 521s 00002db0 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00002dc0 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func (f Flow) | 521s 00002df0 44 73 74 28 29 20 28 64 73 74 20 45 6e 64 70 6f |Dst() (dst Endpo| 521s 00002e00 69 6e 74 29 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 |int)
...| 521s 00002e10 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 |..............    | 521s 00002e30 3c 61 20 68 72 65 66 3d 22 23 46 6c 6f 77 2e 45 |fun| 521s 00002e50 63 20 28 66 20 46 6c 6f 77 29 20 45 6e 64 70 6f |c (f Flow) Endpo| 521s 00002e60 69 6e 74 54 79 70 65 28 29 20 45 6e 64 70 6f 69 |intType() Endpoi| 521s 00002e70 6e 74 54 79 70 65 3c 2f 61 3e 3c 2f 64 64 3e 0a |ntType.| 521s 00002e80 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 00002e90 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 00002ea0 3b 20 3c 61 20 68 72 65 66 3d 22 23 46 6c 6f 77 |; func| 521s 00002ec0 20 28 66 20 46 6c 6f 77 29 20 45 6e 64 70 6f 69 | (f Flow) Endpoi| 521s 00002ed0 6e 74 73 28 29 20 28 73 72 63 2c 20 64 73 74 20 |nts() (src, dst | 521s 00002ee0 45 6e 64 70 6f 69 6e 74 29 3c 2f 61 3e 3c 2f 64 |Endpoint)..............| 521s 00002f00 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 00002f10 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 46 |bsp; fun| 521s 00002f30 63 20 28 66 20 46 6c 6f 77 29 20 52 65 76 65 72 |c (f Flow) Rever| 521s 00002f40 73 65 28 29 20 46 6c 6f 77 3c 2f 61 3e 3c 2f 64 |se() Flow..............| 521s 00002f60 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 00002f70 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 46 |bsp; func (f| 521s 00002f90 20 46 6c 6f 77 29 20 53 72 63 28 29 20 28 73 72 | Flow) Src() (sr| 521s 00002fa0 63 20 45 6e 64 70 6f 69 6e 74 29 3c 2f 61 3e 3c |c Endpoint)<| 521s 00002fb0 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 09 0a |/dd>............| 521s 00002fc0 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 |.....
  | 521s 00002fd0 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 |  fu| 521s 00002ff0 6e 63 20 28 66 20 46 6c 6f 77 29 20 53 74 72 69 |nc (f Flow) Stri| 521s 00003000 6e 67 28 29 20 73 74 72 69 6e 67 3c 2f 61 3e 3c |ng() string<| 521s 00003010 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 0a 09 09 |/dd>............| 521s 00003020 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 |.......
type| 521s 00003040 20 4c 61 79 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a | Layer
.| 521s 00003050 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00003060 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 |.......
type LayerClass| 521s 00003090 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 000030a0 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e |..........
&n| 521s 000030b0 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 |bsp;   func NewLay| 521s 000030e0 65 72 43 6c 61 73 73 28 74 79 70 65 73 20 5b 5d |erClass(types []| 521s 000030f0 4c 61 79 65 72 54 79 70 65 29 20 4c 61 79 65 72 |LayerType) Layer| 521s 00003100 43 6c 61 73 73 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |Class
..| 521s 00003110 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00003120 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 |......
type LayerCla| 521s 00003150 73 73 4d 61 70 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |ssMap
..| 521s 00003160 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00003170 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00003180 20 3c 61 20 68 72 65 66 3d 22 23 4e 65 77 4c 61 | fun| 521s 000031a0 63 20 4e 65 77 4c 61 79 65 72 43 6c 61 73 73 4d |c NewLayerClassM| 521s 000031b0 61 70 28 74 79 70 65 73 20 5b 5d 4c 61 79 65 72 |ap(types []Layer| 521s 000031c0 54 79 70 65 29 20 4c 61 79 65 72 43 6c 61 73 73 |Type) LayerClass| 521s 000031d0 4d 61 70 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 |Map....| 521s 000031e0 09 0a 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 |................| 521s 000031f0 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 |..
  &nb| 521s 00003200 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 4c 61 |sp; func (m La| 521s 00003230 79 65 72 43 6c 61 73 73 4d 61 70 29 20 43 6f 6e |yerClassMap) Con| 521s 00003240 74 61 69 6e 73 28 74 20 4c 61 79 65 72 54 79 70 |tains(t LayerTyp| 521s 00003250 65 29 20 62 6f 6f 6c 3c 2f 61 3e 3c 2f 64 64 3e |e) bool
| 521s 00003260 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00003270 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 |...
type LayerClas| 521s 000032a0 73 53 6c 69 63 65 3c 2f 61 3e 3c 2f 64 64 3e 0a |sSlice
.| 521s 000032b0 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 000032c0 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 000032d0 3b 20 3c 61 20 68 72 65 66 3d 22 23 4e 65 77 4c |; | 521s 000032f0 66 75 6e 63 20 4e 65 77 4c 61 79 65 72 43 6c 61 |func NewLayerCla| 521s 00003300 73 73 53 6c 69 63 65 28 74 79 70 65 73 20 5b 5d |ssSlice(types []| 521s 00003310 4c 61 79 65 72 54 79 70 65 29 20 4c 61 79 65 72 |LayerType) Layer| 521s 00003320 43 6c 61 73 73 53 6c 69 63 65 3c 2f 61 3e 3c 2f |ClassSlice.............| 521s 00003340 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 6e 62 |.........
&nb| 521s 00003350 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 68 72 |sp;   f| 521s 00003380 75 6e 63 20 28 73 20 4c 61 79 65 72 43 6c 61 73 |unc (s LayerClas| 521s 00003390 73 53 6c 69 63 65 29 20 43 6f 6e 74 61 69 6e 73 |sSlice) Contains| 521s 000033a0 28 74 20 4c 61 79 65 72 54 79 70 65 29 20 62 6f |(t LayerType) bo| 521s 000033b0 6f 6c 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |ol
.....| 521s 000033c0 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 |..............type Laye| 521s 000033f0 72 54 79 70 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |rType..| 521s 00003400 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00003410 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00003420 20 3c 61 20 68 72 65 66 3d 22 23 52 65 67 69 73 | fu| 521s 00003440 6e 63 20 52 65 67 69 73 74 65 72 4c 61 79 65 72 |nc RegisterLayer| 521s 00003450 54 79 70 65 28 6e 75 6d 20 69 6e 74 2c 20 6d 65 |Type(num int, me| 521s 00003460 74 61 20 4c 61 79 65 72 54 79 70 65 4d 65 74 61 |ta LayerTypeMeta| 521s 00003470 64 61 74 61 29 20 4c 61 79 65 72 54 79 70 65 3c |data) LayerType<| 521s 00003480 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 |/a>........| 521s 00003490 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 |..............    | 521s 000034b0 3c 61 20 68 72 65 66 3d 22 23 4c 61 79 65 72 54 |func| 521s 000034d0 20 28 74 20 4c 61 79 65 72 54 79 70 65 29 20 44 | (t LayerType) D| 521s 000034e0 65 63 6f 64 65 28 64 61 74 61 20 5b 5d 62 79 74 |ecode(data []byt| 521s 000034f0 65 2c 20 63 20 50 61 63 6b 65 74 42 75 69 6c 64 |e, c PacketBuild| 521s 00003500 65 72 29 20 65 72 72 6f 72 3c 2f 61 3e 3c 2f 64 |er) error..............| 521s 00003520 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 00003530 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 4c |bsp; func (t LayerTy| 521s 00003560 70 65 29 20 53 74 72 69 6e 67 28 29 20 28 73 20 |pe) String() (s | 521s 00003570 73 74 72 69 6e 67 29 3c 2f 61 3e 3c 2f 64 64 3e |string)
| 521s 00003580 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00003590 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 |...
type LayerTy| 521s 000035c0 70 65 4d 65 74 61 64 61 74 61 3c 2f 61 3e 3c 2f |peMetadata.............| 521s 000035e0 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c |...........
<| 521s 000035f0 61 20 68 72 65 66 3d 22 23 4c 69 6e 6b 4c 61 79 |a href="#LinkLay| 521s 00003600 65 72 22 3e 74 79 70 65 20 4c 69 6e 6b 4c 61 79 |er">type LinkLay| 521s 00003610 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |er
.....| 521s 00003620 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00003630 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 |...
t| 521s 00003650 79 70 65 20 4e 65 74 77 6f 72 6b 4c 61 79 65 72 |ype NetworkLayer| 521s 00003660 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 |
.......| 521s 00003670 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00003680 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d 22 23 50 |.
type Pack| 521s 000036a0 65 74 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |et
.....| 521s 000036b0 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 000036c0 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func NewPacke| 521s 000036f0 74 28 64 61 74 61 20 5b 5d 62 79 74 65 2c 20 66 |t(data []byte, f| 521s 00003700 69 72 73 74 4c 61 79 65 72 44 65 63 6f 64 65 72 |irstLayerDecoder| 521s 00003710 20 44 65 63 6f 64 65 72 2c 20 6f 70 74 69 6f 6e | Decoder, option| 521s 00003720 73 20 44 65 63 6f 64 65 4f 70 74 69 6f 6e 73 29 |s DecodeOptions)| 521s 00003730 20 50 61 63 6b 65 74 3c 2f 61 3e 3c 2f 64 64 3e | Packet
| 521s 00003740 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 |................| 521s 00003750 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 |........
type Packet| 521s 00003780 42 75 69 6c 64 65 72 3c 2f 61 3e 3c 2f 64 64 3e |Builder
| 521s 00003790 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 |................| 521s 000037a0 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 |........
type Pac| 521s 000037d0 6b 65 74 44 61 74 61 53 6f 75 72 63 65 3c 2f 61 |ketDataSource
..........| 521s 000037f0 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 64 |..............type P| 521s 00003820 61 63 6b 65 74 53 6f 75 72 63 65 3c 2f 61 3e 3c |acketSource<| 521s 00003830 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 09 0a |/dd>............| 521s 00003840 09 09 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 |.....
  | 521s 00003850 26 6e 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 |  func NewPacket| 521s 00003880 53 6f 75 72 63 65 28 73 6f 75 72 63 65 20 50 61 |Source(source Pa| 521s 00003890 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 2c 20 |cketDataSource, | 521s 000038a0 64 65 63 6f 64 65 72 20 44 65 63 6f 64 65 72 29 |decoder Decoder)| 521s 000038b0 20 2a 50 61 63 6b 65 74 53 6f 75 72 63 65 3c 2f | *PacketSource
.........| 521s 000038d0 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 |.............    <| 521s 000038f0 61 20 68 72 65 66 3d 22 23 50 61 63 6b 65 74 53 |a href="#PacketS| 521s 00003900 6f 75 72 63 65 2e 4e 65 78 74 50 61 63 6b 65 74 |ource.NextPacket| 521s 00003910 22 3e 66 75 6e 63 20 28 70 20 2a 50 61 63 6b 65 |">func (p *Packe| 521s 00003920 74 53 6f 75 72 63 65 29 20 4e 65 78 74 50 61 63 |tSource) NextPac| 521s 00003930 6b 65 74 28 29 20 28 50 61 63 6b 65 74 2c 20 65 |ket() (Packet, e| 521s 00003940 72 72 6f 72 29 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 |rror)..| 521s 00003950 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 3c |...............<| 521s 00003960 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b |dd>   | 521s 00003970 20 3c 61 20 68 72 65 66 3d 22 23 50 61 63 6b 65 | func (p *Packet| 521s 000039a0 53 6f 75 72 63 65 29 20 50 61 63 6b 65 74 73 28 |Source) Packets(| 521s 000039b0 29 20 63 68 61 6e 20 50 61 63 6b 65 74 3c 2f 61 |) chan Packet..........| 521s 000039d0 09 09 09 09 0a 09 09 09 09 3c 64 64 3e 3c 61 20 |.........
| 521s 000039f0 74 79 70 65 20 50 61 79 6c 6f 61 64 3c 2f 61 3e |type Payload| 521s 00003a00 3c 2f 64 64 3e 0a 09 09 09 09 0a 09 09 09 09 0a |
...........| 521s 00003a10 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e 26 |...........
&| 521s 00003a20 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 20 |nbsp;   fu| 521s 00003a50 6e 63 20 28 70 20 2a 50 61 79 6c 6f 61 64 29 20 |nc (p *Payload) | 521s 00003a60 4c 61 79 65 72 43 6f 6e 74 65 6e 74 73 28 29 20 |LayerContents() | 521s 00003a70 5b 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a |[]byte
.| 521s 00003a80 09 09 09 09 0a 09 09 09 09 09 0a 09 09 09 09 09 |................| 521s 00003a90 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e 62 73 70 |
   | 521s 00003aa0 3b 20 3c 61 20 68 72 65 66 3d 22 23 50 61 79 6c |; func (p *Paylo| 521s 00003ad0 61 64 29 20 4c 61 79 65 72 50 61 79 6c 6f 61 64 |ad) LayerPayload| 521s 00003ae0 28 29 20 5b 5d 62 79 74 65 3c 2f 61 3e 3c 2f 64 |() []byte..............| 521s 00003b00 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 00003b10 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 50 |bsp; func (p *Paylo| 521s 00003b40 61 64 29 20 4c 61 79 65 72 54 79 70 65 28 29 20 |ad) LayerType() | 521s 00003b50 4c 61 79 65 72 54 79 70 65 3c 2f 61 3e 3c 2f 64 |LayerType..............| 521s 00003b70 09 09 09 3c 64 64 3e 26 6e 62 73 70 3b 20 26 6e |...
  &n| 521s 00003b80 62 73 70 3b 20 3c 61 20 68 72 65 66 3d 22 23 50 |bsp; | 521s 00003ba0 66 75 6e 63 20 28 70 20 2a 50 61 79 6c 6f 61 64 |func (p *Payload| 521s 00003bb0 29 20 50 61 79 6c 6f 61 64 28 29 20 5b 5d 62 79 |) Payload() []by| 521s 00003bc0 74 65 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 09 |te
.....| 521s 00003bd0 0a 09 09 09 09 09 0a 09 09 09 09 09 3c 64 64 3e |............
| 521s 00003be0 26 6e 62 73 70 3b 20 26 6e 62 73 70 3b 20 3c 61 |    func (p | 521s 00003c10 2a 50 61 79 6c 6f 61 64 29 20 53 74 72 69 6e 67 |*Payload) String| 521s 00003c20 28 29 20 73 74 72 69 6e 67 3c 2f 61 3e 3c 2f 64 |() string..............| 521s 00003c40 0a 09 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 |.....
type Transpor| 521s 00003c70 74 4c 61 79 65 72 3c 2f 61 3e 3c 2f 64 64 3e 0a |tLayer
.| 521s 00003c80 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00003c90 09 0a 09 09 3c 2f 64 6c 3e 0a 0a 09 09 0a 0a 09 |....
.......| 521s 00003ca0 09 0a 09 09 09 3c 68 34 3e 50 61 63 6b 61 67 65 |.....

Package| 521s 00003cb0 20 66 69 6c 65 73 3c 2f 68 34 3e 0a 09 09 09 3c | files

....<| 521s 00003cc0 70 3e 0a 09 09 09 3c 73 70 61 6e 20 73 74 79 6c |p>.............base.go..| 521s 00003d30 09 09 0a 09 09 09 09 3c 61 20 68 72 65 66 3d 22 |.......decode.go..| 521s 00003d80 09 09 0a 09 09 09 09 3c 61 20 68 72 65 66 3d 22 |.......do| 521s 00003dc0 63 2e 67 6f 3c 2f 61 3e 0a 09 09 09 0a 09 09 09 |c.go........| 521s 00003dd0 09 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 |.flows.| 521s 00003e10 67 6f 3c 2f 61 3e 0a 09 09 09 0a 09 09 09 09 3c |go.........<| 521s 00003e20 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b 67 |a href="/src/pkg| 521s 00003e30 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e |/github.com/gcon| 521s 00003e40 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 2f 6c 61 |nell/gopacket/la| 521s 00003e50 79 65 72 63 6c 61 73 73 2e 67 6f 22 3e 6c 61 79 |yerclass.go">lay| 521s 00003e60 65 72 63 6c 61 73 73 2e 67 6f 3c 2f 61 3e 0a 09 |erclass.go..| 521s 00003e70 09 09 0a 09 09 09 09 3c 61 20 68 72 65 66 3d 22 |.......layertype.go| 521s 00003ec0 3c 2f 61 3e 0a 09 09 09 0a 09 09 09 09 3c 61 20 |.........packet.go| 521s 00003f10 3c 2f 61 3e 0a 09 09 09 0a 09 09 09 09 3c 61 20 |.........valid_mac_pre| 521s 00003f70 66 69 78 65 73 2e 67 6f 3c 2f 61 3e 0a 09 09 09 |fixes.go....| 521s 00003f80 0a 09 09 09 3c 2f 73 70 61 6e 3e 0a 09 09 09 3c |........<| 521s 00003f90 2f 70 3e 0a 09 09 0a 09 0a 09 09 0a 09 09 0a 09 |/p>.............| 521s 00003fa0 09 09 3c 68 32 20 69 64 3d 22 70 6b 67 2d 76 61 |..

Var| 521s 00000050 69 61 62 6c 65 73 3c 2f 68 32 3e 0a 09 09 09 0a |iables

.....| 521s 00000060 09 09 09 09 3c 70 72 65 3e 76 61 72 20 56 61 6c |....
var Val|
521s         00000070  69 64 4d 41 43 50 72 65  66 69 78 4d 61 70 20 3d  |idMACPrefixMap =|
521s         00000080  20 76 61 6c 69 64 4d 41  43 50 72 65 66 69 78 4d  | validMACPrefixM|
521s         00000090  61 70 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |ap
.....

| 521s 000000a0 0a 56 61 6c 69 64 4d 41 43 50 72 65 66 69 78 4d |.ValidMACPrefixM| 521s 000000b0 61 70 20 6d 61 70 73 20 61 20 76 61 6c 69 64 20 |ap maps a valid | 521s 000000c0 4d 41 43 20 61 64 64 72 65 73 73 20 70 72 65 66 |MAC address pref| 521s 000000d0 69 78 20 74 6f 20 74 68 65 20 6e 61 6d 65 20 6f |ix to the name o| 521s 000000e0 66 20 74 68 65 0a 6f 72 67 61 6e 69 7a 61 74 69 |f the.organizati| 521s 000000f0 6f 6e 20 74 68 61 74 20 6f 77 6e 73 20 74 68 65 |on that owns the| 521s 00000100 20 72 69 67 68 74 73 20 74 6f 20 75 73 65 20 69 | rights to use i| 521s 00000110 74 2e 20 20 57 65 20 6d 61 70 20 69 74 20 74 6f |t. We map it to| 521s 00000120 20 61 20 68 69 64 64 65 6e 0a 76 61 72 69 61 62 | a hidden.variab| 521s 00000130 6c 65 20 73 6f 20 69 74 20 77 6f 6e 26 23 33 39 |le so it won'| 521s 00000140 3b 74 20 73 68 6f 77 20 75 70 20 69 6e 20 67 6f |;t show up in go| 521s 00000150 64 6f 63 2c 20 73 69 6e 63 65 20 69 74 26 23 33 |doc, since it| 521s 00000160 39 3b 73 20 61 20 76 65 72 79 20 6c 61 72 67 65 |9;s a very large| 521s 00000170 20 6d 61 70 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 0a | map..

......| 521s 00000180 09 09 0a 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00000190 0a 09 09 09 3c 68 32 20 69 64 3d 22 41 70 70 6c |....

ty| 521s 000001b0 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |pe Appli| 521s 00000200 63 61 74 69 6f 6e 4c 61 79 65 72 3c 2f 61 3e 3c |cationLayer<| 521s 00000210 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         00000220  65 20 41 70 70 6c 69 63  61 74 69 6f 6e 4c 61 79  |e ApplicationLay|
521s         00000230  65 72 20 69 6e 74 65 72  66 61 63 65 20 7b 0a 20  |er interface {. |
521s         00000240  20 20 20 4c 61 79 65 72  0a 20 20 20 20 50 61 79  |   Layer.    Pay|
521s         00000250  6c 6f 61 64 28 29 20 5b  5d 62 79 74 65 0a 7d 3c  |load() []byte.}<|
521s         00000260  2f 70 72 65 3e 0a 09 09  09 3c 70 3e 0a 41 70 70  |/pre>....

.App| 521s 00000270 6c 69 63 61 74 69 6f 6e 4c 61 79 65 72 20 69 73 |licationLayer is| 521s 00000280 20 74 68 65 20 70 61 63 6b 65 74 20 6c 61 79 65 | the packet laye| 521s 00000290 72 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 |r corresponding | 521s 000002a0 74 6f 20 74 68 65 20 54 43 50 2f 49 50 20 6c 61 |to the TCP/IP la| 521s 000002b0 79 65 72 20 34 20 28 4f 53 49 0a 6c 61 79 65 72 |yer 4 (OSI.layer| 521s 000002c0 20 37 29 2c 20 61 6c 73 6f 20 6b 6e 6f 77 6e 20 | 7), also known | 521s 000002d0 61 73 20 74 68 65 20 70 61 63 6b 65 74 20 70 61 |as the packet pa| 521s 000002e0 79 6c 6f 61 64 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 |yload..

.....| 521s 000002f0 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 |................| 521s 00000300 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00000310 0a 09 09 09 3c 68 32 20 69 64 3d 22 43 61 70 74 |....

type CaptureInfo| 521s 00000380 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 |

....type CaptureIn| 521s 000003a0 66 6f 20 73 74 72 75 63 74 20 7b 0a 20 20 20 20 |fo struct {. | 521s 000003b0 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 6f 6d |// Populat| 521s 000003d0 65 64 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 |ed is set to tru| 521s 000003e0 65 20 69 66 20 74 68 65 20 72 65 73 74 20 6f 66 |e if the rest of| 521s 000003f0 20 74 68 65 20 43 61 70 74 75 72 65 49 6e 66 6f | the CaptureInfo| 521s 00000400 20 68 61 73 20 62 65 65 6e 20 70 6f 70 75 6c 61 | has been popula| 521s 00000410 74 65 64 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 3c |ted. <| 521s 00000420 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 6f 6d 6d |span class="comm| 521s 00000430 65 6e 74 22 3e 2f 2f 20 77 69 74 68 20 61 63 74 |ent">// with act| 521s 00000440 75 61 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e |ual information.| 521s 00000450 20 20 49 66 20 50 6f 70 75 6c 61 74 65 64 20 69 | If Populated i| 521s 00000460 73 20 66 61 6c 73 65 2c 20 74 68 65 72 65 26 23 |s false, there&#| 521s 00000470 33 39 3b 73 20 6e 6f 20 70 6f 69 6e 74 20 69 6e |39;s no point in| 521s 00000480 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 3c 73 70 61 |. // reading any| 521s 000004b0 20 6f 66 20 74 68 65 20 6f 74 68 65 72 20 66 69 | of the other fi| 521s 000004c0 65 6c 64 73 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 |elds.. | 521s 000004d0 20 50 6f 70 75 6c 61 74 65 64 20 20 20 20 20 20 | Populated | 521s 000004e0 20 20 20 20 20 20 20 62 6f 6f 6c 0a 20 20 20 20 | bool. | 521s 000004f0 54 69 6d 65 73 74 61 6d 70 20 20 20 20 20 20 20 |Timestamp | 521s 00000500 20 20 20 20 20 20 74 69 6d 65 2e 54 69 6d 65 0a | time.Time.| 521s 00000510 20 20 20 20 43 61 70 74 75 72 65 4c 65 6e 67 74 | CaptureLengt| 521s 00000520 68 2c 20 4c 65 6e 67 74 68 20 69 6e 74 0a 7d 3c |h, Length int.}<| 521s 00000530 2f 70 72 65 3e 0a 09 09 09 3c 70 3e 0a 43 61 70 |/pre>....

.Cap| 521s 00000540 74 75 72 65 49 6e 66 6f 20 63 6f 6e 74 61 69 6e |tureInfo contain| 521s 00000550 73 20 63 61 70 74 75 72 65 20 6d 65 74 61 64 61 |s capture metada| 521s 00000560 74 61 20 66 6f 72 20 61 20 70 61 63 6b 65 74 2e |ta for a packet.| 521s 00000570 20 20 49 66 20 61 20 70 61 63 6b 65 74 20 77 61 | If a packet wa| 521s 00000580 73 20 63 61 70 74 75 72 65 64 0a 6f 66 66 20 74 |s captured.off t| 521s 00000590 68 65 20 77 69 72 65 20 6f 72 20 72 65 61 64 20 |he wire or read | 521s 000005a0 66 72 6f 6d 20 61 20 70 63 61 70 20 66 69 6c 65 |from a pcap file| 521s 000005b0 20 28 73 65 65 20 74 68 65 20 26 23 33 39 3b 70 | (see the 'p| 521s 000005c0 63 61 70 26 23 33 39 3b 20 73 75 62 64 69 72 65 |cap' subdire| 521s 000005d0 63 74 6f 72 79 29 2c 20 74 68 69 73 0a 69 6e 66 |ctory), this.inf| 521s 000005e0 6f 72 6d 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 |ormation will be| 521s 000005f0 20 61 74 74 61 63 68 65 64 20 74 6f 20 74 68 65 | attached to the| 521s 00000600 20 70 61 63 6b 65 74 2e 0a 3c 2f 70 3e 0a 0a 0a | packet..

...| 521s 00000610 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 |................| 521s 00000620 09 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 |................| 521s 00000630 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 44 65 |......

typ| 521s 00000650 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e Deco| 521s 000006a0 64 65 46 61 69 6c 75 72 65 3c 2f 61 3e 3c 2f 68 |deFailure....
type |
521s         000006c0  44 65 63 6f 64 65 46 61  69 6c 75 72 65 20 73 74  |DecodeFailure st|
521s         000006d0  72 75 63 74 20 7b 0a 20  20 20 20 3c 73 70 61 6e  |ruct {.    // contains fil|
521s         00000700  74 65 72 65 64 20 6f 72  20 75 6e 65 78 70 6f 72  |tered or unexpor|
521s         00000710  74 65 64 20 66 69 65 6c  64 73 3c 2f 73 70 61 6e  |ted fields.}
....

| 521s 00000730 0a 44 65 63 6f 64 65 46 61 69 6c 75 72 65 20 69 |.DecodeFailure i| 521s 00000740 73 20 61 20 70 61 63 6b 65 74 20 6c 61 79 65 72 |s a packet layer| 521s 00000750 20 63 72 65 61 74 65 64 20 69 66 20 64 65 63 6f | created if deco| 521s 00000760 64 69 6e 67 20 6f 66 20 74 68 65 20 70 61 63 6b |ding of the pack| 521s 00000770 65 74 20 64 61 74 61 20 66 61 69 6c 65 64 0a 66 |et data failed.f| 521s 00000780 6f 72 20 73 6f 6d 65 20 72 65 61 73 6f 6e 2e 20 |or some reason. | 521s 00000790 20 49 74 20 69 6d 70 6c 65 6d 65 6e 74 73 20 45 | It implements E| 521s 000007a0 72 72 6f 72 4c 61 79 65 72 2e 20 20 4c 61 79 65 |rrorLayer. Laye| 521s 000007b0 72 43 6f 6e 74 65 6e 74 73 20 77 69 6c 6c 20 62 |rContents will b| 521s 000007c0 65 20 74 68 65 20 65 6e 74 69 72 65 0a 73 65 74 |e the entire.set| 521s 000007d0 20 6f 66 20 62 79 74 65 73 20 74 68 61 74 20 66 | of bytes that f| 521s 000007e0 61 69 6c 65 64 20 74 6f 20 70 61 72 73 65 2c 20 |ailed to parse, | 521s 000007f0 61 6e 64 20 45 72 72 6f 72 20 77 69 6c 6c 20 72 |and Error will r| 521s 00000800 65 74 75 72 6e 20 74 68 65 20 72 65 61 73 6f 6e |eturn the reason| 521s 00000810 20 70 61 72 73 69 6e 67 0a 66 61 69 6c 65 64 2e | parsing.failed.| 521s 00000820 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 |.

...........| 521s 00000830 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 00000840 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d |.........

func (*Dec| 521s 00000870 6f 64 65 46 61 69 6c 75 72 65 29 20 3c 61 20 68 |odeFailure) Error<| 521s 000008d0 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 75 |/h3>.....
fu|
521s         000008e0  6e 63 20 28 64 20 2a 44  65 63 6f 64 65 46 61 69  |nc (d *DecodeFai|
521s         000008f0  6c 75 72 65 29 20 45 72  72 6f 72 28 29 20 65 72  |lure) Error() er|
521s         00000900  72 6f 72 3c 2f 70 72 65  3e 0a 09 09 09 09 3c 70  |ror
......Error returns | 521s 00000920 74 68 65 20 65 72 72 6f 72 20 65 6e 63 6f 75 6e |the error encoun| 521s 00000930 74 65 72 65 64 20 64 75 72 69 6e 67 20 64 65 63 |tered during dec| 521s 00000940 6f 64 69 6e 67 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 |oding..

.....| 521s 00000950 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a |................| 521s 00000960 09 09 09 09 3c 68 33 20 69 64 3d 22 44 65 63 6f |....

func (*| 521s 00000990 44 65 63 6f 64 65 46 61 69 6c 75 72 65 29 20 3c |DecodeFailure) <| 521s 000009a0 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b 67 |a href="/src/pkg| 521s 000009b0 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e |/github.com/gcon| 521s 000009c0 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 2f 64 65 |nell/gopacket/de| 521s 000009d0 63 6f 64 65 2e 67 6f 3f 73 3d 33 35 30 33 3a 33 |code.go?s=3503:3| 521s 000009e0 35 34 39 23 4c 38 30 22 3e 4c 61 79 65 72 43 6f |549#L80">LayerCo| 521s 000009f0 6e 74 65 6e 74 73 3c 2f 61 3e 3c 2f 68 33 3e 0a |ntents

.| 521s 00000a00 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 64 |....
func (d|
521s         00000a10  20 2a 44 65 63 6f 64 65  46 61 69 6c 75 72 65 29  | *DecodeFailure)|
521s         00000a20  20 4c 61 79 65 72 43 6f  6e 74 65 6e 74 73 28 29  | LayerContents()|
521s         00000a30  20 5b 5d 62 79 74 65 3c  2f 70 72 65 3e 0a 09 09  | []byte
...| 521s 00000a40 09 09 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00000a50 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

fu| 521s 00000a80 6e 63 20 28 2a 44 65 63 6f 64 65 46 61 69 6c 75 |nc (*DecodeFailu| 521s 00000a90 72 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |re) La| 521s 00000ae0 79 65 72 50 61 79 6c 6f 61 64 3c 2f 61 3e 3c 2f |yerPayload.....
fun|
521s         00000b00  63 20 28 64 20 2a 44 65  63 6f 64 65 46 61 69 6c  |c (d *DecodeFail|
521s         00000b10  75 72 65 29 20 4c 61 79  65 72 50 61 79 6c 6f 61  |ure) LayerPayloa|
521s         00000b20  64 28 29 20 5b 5d 62 79  74 65 3c 2f 70 72 65 3e  |d() []byte
| 521s 00000b30 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 09 0a |................| 521s 00000b40 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 |.............fu| 521s 00000b70 6e 63 20 28 2a 44 65 63 6f 64 65 46 61 69 6c 75 |nc (*DecodeFailu| 521s 00000b80 72 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |re) La| 521s 00000bd0 79 65 72 54 79 70 65 3c 2f 61 3e 3c 2f 68 33 3e |yerType

| 521s 00000be0 0a 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 |.....
func (|
521s         00000bf0  64 20 2a 44 65 63 6f 64  65 46 61 69 6c 75 72 65  |d *DecodeFailure|
521s         00000c00  29 20 4c 61 79 65 72 54  79 70 65 28 29 20 4c 61  |) LayerType() La|
521s         00000c10  79 65 72 54 79 70 65 3c  2f 70 72 65 3e 0a 09 09  |yerType
...| 521s 00000c20 09 09 3c 70 3e 0a 4c 61 79 65 72 54 79 70 65 20 |..

.LayerType | 521s 00000c30 72 65 74 75 72 6e 73 20 4c 61 79 65 72 54 79 70 |returns LayerTyp| 521s 00000c40 65 44 65 63 6f 64 65 46 61 69 6c 75 72 65 0a 3c |eDecodeFailure.<| 521s 00000c50 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 09 0a 09 |/p>.............| 521s 00000c60 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 |............

func (| 521s 00000c90 2a 44 65 63 6f 64 65 46 61 69 6c 75 72 65 29 20 |*DecodeFailure) | 521s 00000ca0 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |String| 521s 00000cf0 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 |

.....func (d *Deco| 521s 00000d10 64 65 46 61 69 6c 75 72 65 29 20 53 74 72 69 6e |deFailure) Strin| 521s 00000d20 67 28 29 20 73 74 72 69 6e 67 3c 2f 70 72 65 3e |g() string

| 521s 00000d30 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 09 0a |................| 521s 00000d40 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 |................| 521s 00000d50 09 09 3c 68 32 20 69 64 3d 22 44 65 63 6f 64 65 |..

type DecodeFunc<| 521s 00000dc0 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type DecodeFunc| 521s 00000de0 20 66 75 6e 63 28 5b 5d 62 79 74 65 2c 20 50 61 | func([]byte, Pa| 521s 00000df0 63 6b 65 74 42 75 69 6c 64 65 72 29 20 65 72 72 |cketBuilder) err| 521s 00000e00 6f 72 3c 2f 70 72 65 3e 0a 09 09 09 3c 70 3e 0a |or
....

.| 521s 00000e10 44 65 63 6f 64 65 46 75 6e 63 20 77 72 61 70 73 |DecodeFunc wraps| 521s 00000e20 20 61 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 6d | a function to m| 521s 00000e30 61 6b 65 20 69 74 20 61 20 44 65 63 6f 64 65 72 |ake it a Decoder| 521s 00000e40 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 |..

..........| 521s 00000e50 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 |................| 521s 00000e60 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

func (Decod| 521s 00000e90 65 46 75 6e 63 29 20 3c 61 20 68 72 65 66 3d 22 |eFunc) Decode

| 521s 00000ef0 0a 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 |.....
func (|
521s         00000f00  64 20 44 65 63 6f 64 65  46 75 6e 63 29 20 44 65  |d DecodeFunc) De|
521s         00000f10  63 6f 64 65 28 64 61 74  61 20 5b 5d 62 79 74 65  |code(data []byte|
521s         00000f20  2c 20 70 20 50 61 63 6b  65 74 42 75 69 6c 64 65  |, p PacketBuilde|
521s         00000f30  72 29 20 65 72 72 6f 72  3c 2f 70 72 65 3e 0a 09  |r) error
..| 521s 00000f40 09 09 09 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 00000f50 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00000f60 3c 68 32 20 69 64 3d 22 44 65 63 6f 64 65 4f 70 |

type DecodeOpt| 521s 00000fd0 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 |ions

...| 521s 00000fe0 09 3c 70 72 65 3e 74 79 70 65 20 44 65 63 6f 64 |.
type Decod|
521s         00000ff0  65 4f 70 74 69 6f 6e 73  20 73 74 72 75 63 74 20  |eOptions struct |
521s         00001000  7b 0a 20 20 20 20 3c 73  70 61 6e 20 63 6c 61 73  |{.    // L|
521s         00001020  61 7a 79 20 64 65 63 6f  64 69 6e 67 20 64 65 63  |azy decoding dec|
521s         00001030  6f 64 65 73 20 74 68 65  20 6d 69 6e 69 6d 75 6d  |odes the minimum|
521s         00001040  20 6e 75 6d 62 65 72 20  6f 66 20 6c 61 79 65 72  | number of layer|
521s         00001050  73 20 6e 65 65 64 65 64  20 74 6f 20 72 65 74 75  |s needed to retu|
521s         00001060  72 6e 20 64 61 74 61 3c  2f 73 70 61 6e 3e 0a 20  |rn data. |
521s         00001070  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // for |
521s         00001090  61 20 70 61 63 6b 65 74  20 61 74 20 65 61 63 68  |a packet at each|
521s         000010a0  20 66 75 6e 63 74 69 6f  6e 20 63 61 6c 6c 2e 20  | function call. |
521s         000010b0  20 42 65 20 63 61 72 65  66 75 6c 20 75 73 69 6e  | Be careful usin|
521s         000010c0  67 20 74 68 69 73 20 77  69 74 68 20 63 6f 6e 63  |g this with conc|
521s         000010d0  75 72 72 65 6e 74 3c 2f  73 70 61 6e 3e 0a 20 20  |urrent.  |
521s         000010e0  20 20 3c 73 70 61 6e 20  63 6c 61 73 73 3d 22 63  |  // packe|
521s         00001100  74 20 70 72 6f 63 65 73  73 6f 72 73 2c 20 61 73  |t processors, as|
521s         00001110  20 65 61 63 68 20 63 61  6c 6c 20 74 6f 20 70 61  | each call to pa|
521s         00001120  63 6b 65 74 2e 2a 20 63  6f 75 6c 64 20 6d 75 74  |cket.* could mut|
521s         00001130  61 74 65 20 74 68 65 20  70 61 63 6b 65 74 2c 20  |ate the packet, |
521s         00001140  61 6e 64 3c 2f 73 70 61  6e 3e 0a 20 20 20 20 3c  |and.    <|
521s         00001150  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         00001160  65 6e 74 22 3e 2f 2f 20  74 77 6f 20 63 6f 6e 63  |ent">// two conc|
521s         00001170  75 72 72 65 6e 74 20 66  75 6e 63 74 69 6f 6e 20  |urrent function |
521s         00001180  63 61 6c 6c 73 20 63 6f  75 6c 64 20 69 6e 74 65  |calls could inte|
521s         00001190  72 61 63 74 20 70 6f 6f  72 6c 79 2e 3c 2f 73 70  |ract poorly..    Lazy boo|
521s         000011b0  6c 0a 20 20 20 20 3c 73  70 61 6e 20 63 6c 61 73  |l.    // N|
521s         000011d0  6f 43 6f 70 79 20 64 65  63 6f 64 69 6e 67 20 64  |oCopy decoding d|
521s         000011e0  6f 65 73 6e 26 23 33 39  3b 74 20 63 6f 70 79 20  |oesn't copy |
521s         000011f0  69 74 73 20 69 6e 70 75  74 20 62 75 66 66 65 72  |its input buffer|
521s         00001200  20 69 6e 74 6f 20 73 74  6f 72 61 67 65 20 74 68  | into storage th|
521s         00001210  61 74 26 23 33 39 3b 73  20 6f 77 6e 65 64 20 62  |at's owned b|
521s         00001220  79 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 3c 73 70  |y.    // the packet|
521s         00001250  2e 20 20 49 66 20 79 6f  75 20 63 61 6e 20 67 75  |.  If you can gu|
521s         00001260  61 72 61 6e 74 65 65 20  74 68 61 74 20 74 68 65  |arantee that the|
521s         00001270  20 62 79 74 65 73 20 75  6e 64 65 72 6c 79 69 6e  | bytes underlyin|
521s         00001280  67 20 74 68 65 20 73 6c  69 63 65 3c 2f 73 70 61  |g the slice.    // |
521s         000012b0  70 61 73 73 65 64 20 69  6e 74 6f 20 4e 65 77 50  |passed into NewP|
521s         000012c0  61 63 6b 65 74 20 61 72  65 6e 26 23 33 39 3b 74  |acket aren't|
521s         000012d0  20 67 6f 69 6e 67 20 74  6f 20 62 65 20 6d 6f 64  | going to be mod|
521s         000012e0  69 66 69 65 64 2c 20 74  68 69 73 20 63 61 6e 20  |ified, this can |
521s         000012f0  62 65 20 66 61 73 74 65  72 2e 20 20 49 66 3c 2f  |be faster.  If.    |
521s         00001320  2f 2f 20 74 68 65 72 65  26 23 33 39 3b 73 20 61  |// there's a|
521s         00001330  6e 79 20 63 68 61 6e 63  65 20 74 68 61 74 20 74  |ny chance that t|
521s         00001340  68 6f 73 65 20 62 79 74  65 73 20 57 49 4c 4c 20  |hose bytes WILL |
521s         00001350  62 65 20 63 68 61 6e 67  65 64 2c 20 74 68 69 73  |be changed, this|
521s         00001360  20 77 69 6c 6c 20 69 6e  76 61 6c 69 64 61 74 65  | will invalidate|
521s         00001370  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // your packet|
521s         000013a0  73 2e 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 4e 6f  |s..    No|
521s         000013b0  43 6f 70 79 20 62 6f 6f  6c 0a 7d 3c 2f 70 72 65  |Copy bool.}....

.DecodeO| 521s 000013d0 70 74 69 6f 6e 73 20 74 65 6c 6c 73 20 67 6f 70 |ptions tells gop| 521s 000013e0 61 63 6b 65 74 20 68 6f 77 20 74 6f 20 64 65 63 |acket how to dec| 521s 000013f0 6f 64 65 20 61 20 70 61 63 6b 65 74 2e 0a 3c 2f |ode a packet................| 521s 00001410 09 09 3c 70 72 65 3e 76 61 72 20 44 65 66 61 75 |..

var Defau|
521s         00001420  6c 74 20 44 65 63 6f 64  65 4f 70 74 69 6f 6e 73  |lt DecodeOptions|
521s         00001430  20 3d 20 44 65 63 6f 64  65 4f 70 74 69 6f 6e 73  | = DecodeOptions|
521s         00001440  7b 7d 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |{}
.....

| 521s 00001450 0a 44 65 66 61 75 6c 74 20 64 65 63 6f 64 69 6e |.Default decodin| 521s 00001460 67 20 70 72 6f 76 69 64 65 73 20 74 68 65 20 73 |g provides the s| 521s 00001470 61 66 65 73 74 20 28 62 75 74 20 73 6c 6f 77 65 |afest (but slowe| 521s 00001480 73 74 29 20 6d 65 74 68 6f 64 20 66 6f 72 20 64 |st) method for d| 521s 00001490 65 63 6f 64 69 6e 67 0a 70 61 63 6b 65 74 73 2e |ecoding.packets.| 521s 000014a0 20 20 49 74 20 65 61 67 65 72 6c 79 20 70 72 6f | It eagerly pro| 521s 000014b0 63 65 73 73 65 73 20 61 6c 6c 20 6c 61 79 65 72 |cesses all layer| 521s 000014c0 73 20 28 73 6f 20 69 74 26 23 33 39 3b 73 20 63 |s (so it's c| 521s 000014d0 6f 6e 63 75 72 72 65 6e 63 79 2d 73 61 66 65 29 |oncurrency-safe)| 521s 000014e0 20 61 6e 64 20 69 74 0a 63 6f 70 69 65 73 20 69 | and it.copies i| 521s 000014f0 74 73 20 69 6e 70 75 74 20 62 75 66 66 65 72 20 |ts input buffer | 521s 00001500 75 70 6f 6e 20 63 72 65 61 74 69 6f 6e 20 6f 66 |upon creation of| 521s 00001510 20 74 68 65 20 70 61 63 6b 65 74 20 28 73 6f 20 | the packet (so | 521s 00001520 74 68 65 20 70 61 63 6b 65 74 20 72 65 6d 61 69 |the packet remai| 521s 00001530 6e 73 0a 76 61 6c 69 64 20 69 66 20 74 68 65 20 |ns.valid if the | 521s 00001540 75 6e 64 65 72 6c 79 69 6e 67 20 73 6c 69 63 65 |underlying slice| 521s 00001550 20 69 73 20 6d 6f 64 69 66 69 65 64 2e 20 20 42 | is modified. B| 521s 00001560 6f 74 68 20 6f 66 20 74 68 65 73 65 20 74 61 6b |oth of these tak| 521s 00001570 65 20 74 69 6d 65 2c 0a 74 68 6f 75 67 68 2c 20 |e time,.though, | 521s 00001580 73 6f 20 62 65 77 61 72 65 2e 20 20 49 66 20 79 |so beware. If y| 521s 00001590 6f 75 20 63 61 6e 20 67 75 61 72 61 6e 74 65 65 |ou can guarantee| 521s 000015a0 20 74 68 61 74 20 74 68 65 20 70 61 63 6b 65 74 | that the packet| 521s 000015b0 20 77 69 6c 6c 20 6f 6e 6c 79 20 62 65 20 75 73 | will only be us| 521s 000015c0 65 64 0a 62 79 20 6f 6e 65 20 67 6f 72 6f 75 74 |ed.by one gorout| 521s 000015d0 69 6e 65 20 61 74 20 61 20 74 69 6d 65 2c 20 73 |ine at a time, s| 521s 000015e0 65 74 20 4c 61 7a 79 20 64 65 63 6f 64 69 6e 67 |et Lazy decoding| 521s 000015f0 2e 20 20 49 66 20 79 6f 75 20 63 61 6e 20 67 75 |. If you can gu| 521s 00001600 61 72 61 6e 74 65 65 20 74 68 61 74 0a 74 68 65 |arantee that.the| 521s 00001610 20 75 6e 64 65 72 6c 79 69 6e 67 20 73 6c 69 63 | underlying slic| 521s 00001620 65 20 77 6f 6e 26 23 33 39 3b 74 20 63 68 61 6e |e won't chan| 521s 00001630 67 65 2c 20 73 65 74 20 4e 6f 43 6f 70 79 20 64 |ge, set NoCopy d| 521s 00001640 65 63 6f 64 69 6e 67 2e 0a 3c 2f 70 3e 0a 0a 09 |ecoding..

...| 521s 00001650 09 09 0a 09 09 09 09 3c 70 72 65 3e 76 61 72 20 |.......
var |
521s         00001660  4c 61 7a 79 20 44 65 63  6f 64 65 4f 70 74 69 6f  |Lazy DecodeOptio|
521s         00001670  6e 73 20 3d 20 44 65 63  6f 64 65 4f 70 74 69 6f  |ns = DecodeOptio|
521s         00001680  6e 73 7b 4c 61 7a 79 3a  20 74 72 75 65 7d 3c 2f  |ns{Lazy: true}.....

.Laz| 521s 000016a0 79 20 69 73 20 61 20 44 65 63 6f 64 65 4f 70 74 |y is a DecodeOpt| 521s 000016b0 69 6f 6e 73 20 77 69 74 68 20 6a 75 73 74 20 4c |ions with just L| 521s 000016c0 61 7a 79 20 73 65 74 2e 0a 3c 2f 70 3e 0a 0a 09 |azy set..

...| 521s 000016d0 09 09 0a 09 09 09 09 3c 70 72 65 3e 76 61 72 20 |.......
var |
521s         000016e0  4e 6f 43 6f 70 79 20 44  65 63 6f 64 65 4f 70 74  |NoCopy DecodeOpt|
521s         000016f0  69 6f 6e 73 20 3d 20 44  65 63 6f 64 65 4f 70 74  |ions = DecodeOpt|
521s         00001700  69 6f 6e 73 7b 4e 6f 43  6f 70 79 3a 20 74 72 75  |ions{NoCopy: tru|
521s         00001710  65 7d 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |e}
.....

| 521s 00001720 0a 4e 6f 43 6f 70 79 20 69 73 20 61 20 44 65 63 |.NoCopy is a Dec| 521s 00001730 6f 64 65 4f 70 74 69 6f 6e 73 20 77 69 74 68 20 |odeOptions with | 521s 00001740 6a 75 73 74 20 4e 6f 43 6f 70 79 20 73 65 74 2e |just NoCopy set.| 521s 00001750 0a 3c 2f 70 3e 0a 0a 09 09 09 0a 0a 09 09 09 0a |.

...........| 521s 00001760 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 |................| 521s 00001770 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 |........

type Decoder<| 521s 000017e0 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type Decoder in| 521s 00001800 74 65 72 66 61 63 65 20 7b 0a 20 20 20 20 3c 73 |terface {. // Decode de| 521s 00001830 63 6f 64 65 73 20 74 68 65 20 62 79 74 65 73 20 |codes the bytes | 521s 00001840 6f 66 20 61 20 70 61 63 6b 65 74 2c 20 73 65 6e |of a packet, sen| 521s 00001850 64 69 6e 67 20 64 65 63 6f 64 65 64 20 76 61 6c |ding decoded val| 521s 00001860 75 65 73 20 61 6e 64 20 6f 74 68 65 72 3c 2f 73 |ues and other. /| 521s 00001890 2f 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 74 6f |/ information to| 521s 000018a0 20 50 61 63 6b 65 74 42 75 69 6c 64 65 72 2c 20 | PacketBuilder, | 521s 000018b0 61 6e 64 20 72 65 74 75 72 6e 69 6e 67 20 61 6e |and returning an| 521s 000018c0 20 65 72 72 6f 72 20 69 66 20 75 6e 73 75 63 63 | error if unsucc| 521s 000018d0 65 73 73 66 75 6c 2e 20 20 53 65 65 3c 2f 73 70 |essful. See. //| 521s 00001900 20 74 68 65 20 50 61 63 6b 65 74 42 75 69 6c 64 | the PacketBuild| 521s 00001910 65 72 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e |er documentation| 521s 00001920 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 6c | for more detail| 521s 00001930 73 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 44 65 |s.. De| 521s 00001940 63 6f 64 65 28 5b 5d 62 79 74 65 2c 20 50 61 63 |code([]byte, Pac| 521s 00001950 6b 65 74 42 75 69 6c 64 65 72 29 20 65 72 72 6f |ketBuilder) erro| 521s 00001960 72 0a 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c 70 3e |r.}
....

| 521s 00001970 0a 44 65 63 6f 64 65 72 20 69 73 20 61 6e 20 69 |.Decoder is an i| 521s 00001980 6e 74 65 72 66 61 63 65 20 66 6f 72 20 6c 6f 67 |nterface for log| 521s 00001990 69 63 20 74 6f 20 64 65 63 6f 64 65 20 61 20 70 |ic to decode a p| 521s 000019a0 61 63 6b 65 74 20 6c 61 79 65 72 2e 20 20 55 73 |acket layer. Us| 521s 000019b0 65 72 73 20 6d 61 79 0a 69 6d 70 6c 65 6d 65 6e |ers may.implemen| 521s 000019c0 74 20 61 20 44 65 63 6f 64 65 72 20 74 6f 20 68 |t a Decoder to h| 521s 000019d0 61 6e 64 6c 65 20 74 68 65 69 72 20 6f 77 6e 20 |andle their own | 521s 000019e0 73 74 72 61 6e 67 65 20 70 61 63 6b 65 74 20 74 |strange packet t| 521s 000019f0 79 70 65 73 2c 20 6f 72 20 6d 61 79 20 75 73 65 |ypes, or may use| 521s 00001a00 20 6f 6e 65 0a 6f 66 20 74 68 65 20 6d 61 6e 79 | one.of the many| 521s 00001a10 20 64 65 63 6f 64 65 72 73 20 61 76 61 69 6c 61 | decoders availa| 521s 00001a20 62 6c 65 20 69 6e 20 74 68 65 20 26 23 33 39 3b |ble in the '| 521s 00001a30 6c 61 79 65 72 73 26 23 33 39 3b 20 73 75 62 70 |layers' subp| 521s 00001a40 61 63 6b 61 67 65 20 74 6f 20 64 65 63 6f 64 65 |ackage to decode| 521s 00001a50 20 74 68 69 6e 67 73 0a 66 6f 72 20 74 68 65 6d | things.for them| 521s 00001a60 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 |..

..........| 521s 00001a70 09 0a 09 09 09 09 3c 70 72 65 3e 76 61 72 20 44 |......
var D|
521s         00001a80  65 63 6f 64 65 50 61 79  6c 6f 61 64 20 44 65 63  |ecodePayload Dec|
521s         00001a90  6f 64 65 72 20 3d 20 44  65 63 6f 64 65 46 75 6e  |oder = DecodeFun|
521s         00001aa0  63 28 64 65 63 6f 64 65  50 61 79 6c 6f 61 64 29  |c(decodePayload)|
521s         00001ab0  3c 2f 70 72 65 3e 0a 09  09 09 09 3c 70 3e 0a 44  |
.....

.D| 521s 00001ac0 65 63 6f 64 65 50 61 79 6c 6f 61 64 20 69 73 20 |ecodePayload is | 521s 00001ad0 61 20 44 65 63 6f 64 65 72 20 74 68 61 74 20 72 |a Decoder that r| 521s 00001ae0 65 74 75 72 6e 73 20 61 20 50 61 79 6c 6f 61 64 |eturns a Payload| 521s 00001af0 20 6c 61 79 65 72 20 63 6f 6e 74 61 69 6e 69 6e | layer containin| 521s 00001b00 67 20 61 6c 6c 0a 72 65 6d 61 69 6e 69 6e 67 20 |g all.remaining | 521s 00001b10 62 79 74 65 73 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 |bytes..

.....| 521s 00001b20 0a 09 09 09 09 3c 70 72 65 3e 76 61 72 20 44 65 |.....
var De|
521s         00001b30  63 6f 64 65 55 6e 6b 6e  6f 77 6e 20 44 65 63 6f  |codeUnknown Deco|
521s         00001b40  64 65 72 20 3d 20 44 65  63 6f 64 65 46 75 6e 63  |der = DecodeFunc|
521s         00001b50  28 64 65 63 6f 64 65 55  6e 6b 6e 6f 77 6e 29 3c  |(decodeUnknown)<|
521s         00001b60  2f 70 72 65 3e 0a 09 09  09 09 3c 70 3e 0a 44 65  |/pre>.....

.De| 521s 00001b70 63 6f 64 65 55 6e 6b 6e 6f 77 6e 20 69 73 20 61 |codeUnknown is a| 521s 00001b80 20 44 65 63 6f 64 65 72 20 74 68 61 74 20 72 65 | Decoder that re| 521s 00001b90 74 75 72 6e 73 20 61 20 44 65 63 6f 64 65 46 61 |turns a DecodeFa| 521s 00001ba0 69 6c 75 72 65 20 6c 61 79 65 72 20 63 6f 6e 74 |ilure layer cont| 521s 00001bb0 61 69 6e 69 6e 67 20 61 6c 6c 0a 72 65 6d 61 69 |aining all.remai| 521s 00001bc0 6e 69 6e 67 20 62 79 74 65 73 2c 20 75 73 65 66 |ning bytes, usef| 521s 00001bd0 75 6c 20 69 66 20 79 6f 75 20 72 75 6e 20 75 70 |ul if you run up| 521s 00001be0 20 61 67 61 69 6e 73 74 20 61 20 6c 61 79 65 72 | against a layer| 521s 00001bf0 20 74 68 61 74 20 79 6f 75 26 23 33 39 3b 72 65 | that you're| 521s 00001c00 20 75 6e 61 62 6c 65 20 74 6f 0a 64 65 63 6f 64 | unable to.decod| 521s 00001c10 65 20 79 65 74 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 |e yet..

.....| 521s 00001c20 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 00001c30 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 |..............| 521s 00001c50 74 79 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 |type Endpo| 521s 00001ca0 69 6e 74 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 |int

....| 521s 00001cb0 3c 70 72 65 3e 74 79 70 65 20 45 6e 64 70 6f 69 |
type Endpoi|
521s         00001cc0  6e 74 20 73 74 72 75 63  74 20 7b 0a 20 20 20 20  |nt struct {.    |
521s         00001cd0  3c 73 70 61 6e 20 63 6c  61 73 73 3d 22 63 6f 6d  |// contain|
521s         00001cf0  73 20 66 69 6c 74 65 72  65 64 20 6f 72 20 75 6e  |s filtered or un|
521s         00001d00  65 78 70 6f 72 74 65 64  20 66 69 65 6c 64 73 3c  |exported fields<|
521s         00001d10  2f 73 70 61 6e 3e 0a 7d  3c 2f 70 72 65 3e 0a 09  |/span>.}
..| 521s 00001d20 09 09 3c 70 3e 0a 45 6e 64 70 6f 69 6e 74 20 69 |..

.Endpoint i| 521s 00001d30 73 20 74 68 65 20 73 65 74 20 6f 66 20 62 79 74 |s the set of byt| 521s 00001d40 65 73 20 75 73 65 64 20 74 6f 20 61 64 64 72 65 |es used to addre| 521s 00001d50 73 73 20 70 61 63 6b 65 74 73 20 61 74 20 76 61 |ss packets at va| 521s 00001d60 72 69 6f 75 73 20 6c 61 79 65 72 73 2e 0a 53 65 |rious layers..Se| 521s 00001d70 65 20 4c 69 6e 6b 4c 61 79 65 72 2c 20 4e 65 74 |e LinkLayer, Net| 521s 00001d80 77 6f 72 6b 4c 61 79 65 72 2c 20 61 6e 64 20 54 |workLayer, and T| 521s 00001d90 72 61 6e 73 70 6f 72 74 4c 61 79 65 72 20 73 70 |ransportLayer sp| 521s 00001da0 65 63 69 66 69 63 61 74 69 6f 6e 73 2e 0a 45 6e |ecifications..En| 521s 00001db0 64 70 6f 69 6e 74 73 20 61 72 65 20 75 73 61 62 |dpoints are usab| 521s 00001dc0 6c 65 20 61 73 20 6d 61 70 20 6b 65 79 73 2e 0a |le as map keys..| 521s 00001dd0 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 0a |

............| 521s 00001de0 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00001df0 09 09 09 3c 68 33 20 69 64 3d 22 4e 65 77 45 6e |...

func NewEndpoin| 521s 00001e60 74 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c |t

.....<| 521s 00001e70 70 72 65 3e 66 75 6e 63 20 4e 65 77 45 6e 64 70 |pre>func NewEndp| 521s 00001e80 6f 69 6e 74 28 74 79 70 20 45 6e 64 70 6f 69 6e |oint(typ Endpoin| 521s 00001e90 74 54 79 70 65 2c 20 72 61 77 20 5b 5d 62 79 74 |tType, raw []byt| 521s 00001ea0 65 29 20 45 6e 64 70 6f 69 6e 74 3c 2f 70 72 65 |e) Endpoint.....

.NewEnd| 521s 00001ec0 70 6f 69 6e 74 20 63 72 65 61 74 65 73 20 61 20 |point creates a | 521s 00001ed0 6e 65 77 20 45 6e 64 70 6f 69 6e 74 20 6f 62 6a |new Endpoint obj| 521s 00001ee0 65 63 74 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a |ect..

.......| 521s 00001ef0 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 00001f00 09 09 3c 68 33 20 69 64 3d 22 45 6e 64 70 6f 69 |..

func (Endpoint)| 521s 00001f30 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 | Endpoint| 521s 00001f80 54 79 70 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 |Type

...| 521s 00001f90 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 65 20 45 |..
func (e E|
521s         00001fa0  6e 64 70 6f 69 6e 74 29  20 45 6e 64 70 6f 69 6e  |ndpoint) Endpoin|
521s         00001fb0  74 54 79 70 65 28 29 20  45 6e 64 70 6f 69 6e 74  |tType() Endpoint|
521s         00001fc0  54 79 70 65 3c 2f 70 72  65 3e 0a 09 09 09 09 3c  |Type
.....<| 521s 00001fd0 70 3e 0a 45 6e 64 70 6f 69 6e 74 54 79 70 65 20 |p>.EndpointType | 521s 00001fe0 72 65 74 75 72 6e 73 20 74 68 65 20 65 6e 64 70 |returns the endp| 521s 00001ff0 6f 69 6e 74 20 74 79 70 65 20 61 73 73 6f 63 69 |oint type associ| 521s 00002000 61 74 65 64 20 77 69 74 68 20 74 68 69 73 20 65 |ated with this e| 521s 00002010 6e 64 70 6f 69 6e 74 2e 0a 3c 2f 70 3e 0a 0a 09 |ndpoint..

...| 521s 00002020 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00002030 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 45 6e |......

func (Endpoint)| 521s 00002060 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 | LessTh| 521s 000020b0 61 6e 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 |an

.....| 521s 000020c0 3c 70 72 65 3e 66 75 6e 63 20 28 61 20 45 6e 64 |
func (a End|
521s         000020d0  70 6f 69 6e 74 29 20 4c  65 73 73 54 68 61 6e 28  |point) LessThan(|
521s         000020e0  62 20 45 6e 64 70 6f 69  6e 74 29 20 62 6f 6f 6c  |b Endpoint) bool|
521s         000020f0  3c 2f 70 72 65 3e 0a 09  09 09 09 3c 70 3e 0a 4c  |
.....

.L| 521s 00002100 65 73 73 54 68 61 6e 20 70 72 6f 76 69 64 65 73 |essThan provides| 521s 00002110 20 61 20 73 74 61 62 6c 65 20 6f 72 64 65 72 69 | a stable orderi| 521s 00002120 6e 67 20 66 6f 72 20 61 6c 6c 20 65 6e 64 70 6f |ng for all endpo| 521s 00002130 69 6e 74 73 2e 20 20 49 74 20 73 6f 72 74 73 20 |ints. It sorts | 521s 00002140 66 69 72 73 74 20 62 61 73 65 64 0a 6f 6e 20 74 |first based.on t| 521s 00002150 68 65 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 20 |he EndpointType | 521s 00002160 6f 66 20 61 6e 20 65 6e 64 70 6f 69 6e 74 2c 20 |of an endpoint, | 521s 00002170 74 68 65 6e 20 62 61 73 65 64 20 6f 6e 20 74 68 |then based on th| 521s 00002180 65 20 72 61 77 20 62 79 74 65 73 20 6f 66 20 74 |e raw bytes of t| 521s 00002190 68 61 74 20 65 6e 64 70 6f 69 6e 74 2e 0a 46 6f |hat endpoint..Fo| 521s 000021a0 72 20 73 6f 6d 65 20 65 6e 64 70 6f 69 6e 74 73 |r some endpoints| 521s 000021b0 2c 20 74 68 65 20 61 63 74 75 61 6c 20 63 6f 6d |, the actual com| 521s 000021c0 70 61 72 69 73 6f 6e 20 6d 61 79 20 6e 6f 74 20 |parison may not | 521s 000021d0 6d 61 6b 65 20 73 65 6e 73 65 2c 20 68 6f 77 65 |make sense, howe| 521s 000021e0 76 65 72 20 74 68 69 73 0a 6f 72 64 65 72 69 6e |ver this.orderin| 521s 000021f0 67 20 64 6f 65 73 20 70 72 6f 76 69 64 65 20 75 |g does provide u| 521s 00002200 73 65 66 75 6c 20 69 6e 66 6f 72 6d 61 74 69 6f |seful informatio| 521s 00002210 6e 20 66 6f 72 20 6d 6f 73 74 20 45 6e 64 70 6f |n for most Endpo| 521s 00002220 69 6e 74 20 74 79 70 65 73 2e 0a 3c 2f 70 3e 0a |int types..

.| 521s 00002230 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 |................| 521s 00002240 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 |........

fu| 521s 00002260 6e 63 20 28 45 6e 64 70 6f 69 6e 74 29 20 3c 61 |nc (Endpoint) Raw.....
func |
521s         000022d0  28 65 20 45 6e 64 70 6f  69 6e 74 29 20 52 61 77  |(e Endpoint) Raw|
521s         000022e0  28 29 20 5b 5d 62 79 74  65 3c 2f 70 72 65 3e 0a  |() []byte
.| 521s 000022f0 09 09 09 09 3c 70 3e 0a 52 61 77 20 72 65 74 75 |....

.Raw retu| 521s 00002300 72 6e 73 20 74 68 65 20 72 61 77 20 62 79 74 65 |rns the raw byte| 521s 00002310 73 20 6f 66 20 74 68 69 73 20 65 6e 64 70 6f 69 |s of this endpoi| 521s 00002320 6e 74 2e 20 20 54 68 65 73 65 20 61 72 65 6e 26 |nt. These aren&| 521s 00002330 23 33 39 3b 74 20 68 75 6d 61 6e 2d 72 65 61 64 |#39;t human-read| 521s 00002340 61 62 6c 65 0a 6d 6f 73 74 20 6f 66 20 74 68 65 |able.most of the| 521s 00002350 20 74 69 6d 65 2c 20 62 75 74 20 74 68 65 79 20 | time, but they | 521s 00002360 61 72 65 20 66 61 73 74 65 72 20 74 68 61 6e 20 |are faster than | 521s 00002370 63 61 6c 6c 69 6e 67 20 53 74 72 69 6e 67 2e 0a |calling String..| 521s 00002380 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 09 0a |

............| 521s 00002390 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 |.............func (Endp| 521s 000023c0 6f 69 6e 74 29 20 3c 61 20 68 72 65 66 3d 22 2f |oint) S| 521s 00002410 74 72 69 6e 67 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 |tring

..| 521s 00002420 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 65 20 |...
func (e |
521s         00002430  45 6e 64 70 6f 69 6e 74  29 20 53 74 72 69 6e 67  |Endpoint) String|
521s         00002440  28 29 20 73 74 72 69 6e  67 3c 2f 70 72 65 3e 0a  |() string
.| 521s 00002450 09 09 09 09 0a 09 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00002460 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00002470 09 3c 68 32 20 69 64 3d 22 45 6e 64 70 6f 69 6e |.

type EndpointTyp| 521s 000024e0 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 |e

....type Endpoint| 521s 00002500 54 79 70 65 20 69 6e 74 36 34 3c 2f 70 72 65 3e |Type int64| 521s 00002510 0a 09 09 09 3c 70 3e 0a 45 6e 64 70 6f 69 6e 74 |....

.Endpoint| 521s 00002520 54 79 70 65 20 69 73 20 74 68 65 20 74 79 70 65 |Type is the type| 521s 00002530 20 6f 66 20 61 20 67 6f 70 61 63 6b 65 74 20 45 | of a gopacket E| 521s 00002540 6e 64 70 6f 69 6e 74 2e 20 20 54 68 69 73 20 74 |ndpoint. This t| 521s 00002550 79 70 65 20 64 65 74 65 72 6d 69 6e 65 73 20 68 |ype determines h| 521s 00002560 6f 77 0a 74 68 65 20 62 79 74 65 73 20 73 74 6f |ow.the bytes sto| 521s 00002570 72 65 64 20 69 6e 20 74 68 65 20 65 6e 64 70 6f |red in the endpo| 521s 00002580 69 6e 74 20 73 68 6f 75 6c 64 20 62 65 20 69 6e |int should be in| 521s 00002590 74 65 72 70 72 65 74 65 64 2e 0a 3c 2f 70 3e 0a |terpreted..

.| 521s 000025a0 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 000025b0 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 |..............func| 521s 000025e0 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 | Regist| 521s 00002630 65 72 45 6e 64 70 6f 69 6e 74 54 79 70 65 3c 2f |erEndpointType.....func RegisterEn| 521s 00002660 64 70 6f 69 6e 74 54 79 70 65 28 6e 75 6d 20 69 |dpointType(num i| 521s 00002670 6e 74 2c 20 6d 65 74 61 20 45 6e 64 70 6f 69 6e |nt, meta Endpoin| 521s 00002680 74 54 79 70 65 4d 65 74 61 64 61 74 61 29 20 45 |tTypeMetadata) E| 521s 00002690 6e 64 70 6f 69 6e 74 54 79 70 65 3c 2f 70 72 65 |ndpointType.....

.Regist| 521s 000026b0 65 72 45 6e 64 70 6f 69 6e 74 54 79 70 65 20 63 |erEndpointType c| 521s 000026c0 72 65 61 74 65 73 20 61 20 6e 65 77 20 45 6e 64 |reates a new End| 521s 000026d0 70 6f 69 6e 74 54 79 70 65 20 61 6e 64 20 72 65 |pointType and re| 521s 000026e0 67 69 73 74 65 72 73 20 69 74 20 67 6c 6f 62 61 |gisters it globa| 521s 000026f0 6c 6c 79 2e 0a 49 74 20 4d 55 53 54 20 62 65 20 |lly..It MUST be | 521s 00002700 70 61 73 73 65 64 20 61 20 75 6e 69 71 75 65 20 |passed a unique | 521s 00002710 6e 75 6d 62 65 72 2c 20 6f 72 20 69 74 20 77 69 |number, or it wi| 521s 00002720 6c 6c 20 70 61 6e 69 63 2e 20 20 4e 75 6d 62 65 |ll panic. Numbe| 521s 00002730 72 73 20 30 2d 39 39 39 20 61 72 65 0a 72 65 73 |rs 0-999 are.res| 521s 00002740 65 72 76 65 64 20 66 6f 72 20 67 6f 70 61 63 6b |erved for gopack| 521s 00002750 65 74 26 23 33 39 3b 73 20 75 73 65 2e 0a 3c 2f |et's use................| 521s 00002770 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 |...........

func (En| 521s 000027a0 64 70 6f 69 6e 74 54 79 70 65 29 20 3c 61 20 68 |dpointType) String<| 521s 00002800 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 75 |/h3>.....
fu|
521s         00002810  6e 63 20 28 65 20 45 6e  64 70 6f 69 6e 74 54 79  |nc (e EndpointTy|
521s         00002820  70 65 29 20 53 74 72 69  6e 67 28 29 20 73 74 72  |pe) String() str|
521s         00002830  69 6e 67 3c 2f 70 72 65  3e 0a 09 09 09 09 0a 09  |ing
.......| 521s 00002840 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 0a |................| 521s 00002850 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 |...........

type EndpointT| 521s 000028d0 79 70 65 4d 65 74 61 64 61 74 61 3c 2f 61 3e 3c |ypeMetadata<| 521s 000028e0 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         000028f0  65 20 45 6e 64 70 6f 69  6e 74 54 79 70 65 4d 65  |e EndpointTypeMe|
521s         00002900  74 61 64 61 74 61 20 73  74 72 75 63 74 20 7b 0a  |tadata struct {.|
521s         00002910  20 20 20 20 3c 73 70 61  6e 20 63 6c 61 73 73 3d  |    // Nam|
521s         00002930  65 20 69 73 20 74 68 65  20 73 74 72 69 6e 67 20  |e is the string |
521s         00002940  72 65 74 75 72 6e 65 64  20 62 79 20 61 6e 20 45  |returned by an E|
521s         00002950  6e 64 70 6f 69 6e 74 54  79 70 65 26 23 33 39 3b  |ndpointType'|
521s         00002960  73 20 53 74 72 69 6e 67  20 66 75 6e 63 74 69 6f  |s String functio|
521s         00002970  6e 2e 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 4e 61  |n..    Na|
521s         00002980  6d 65 20 73 74 72 69 6e  67 0a 20 20 20 20 3c 73  |me string.    // Formatter|
521s         000029b0  20 69 73 20 63 61 6c 6c  65 64 20 66 72 6f 6d 20  | is called from |
521s         000029c0  61 6e 20 45 6e 64 70 6f  69 6e 74 26 23 33 39 3b  |an Endpoint'|
521s         000029d0  73 20 53 74 72 69 6e 67  20 66 75 6e 63 74 69 6f  |s String functio|
521s         000029e0  6e 20 74 6f 20 66 6f 72  6d 61 74 20 74 68 65 20  |n to format the |
521s         000029f0  72 61 77 3c 2f 73 70 61  6e 3e 0a 20 20 20 20 3c  |raw.    <|
521s         00002a00  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         00002a10  65 6e 74 22 3e 2f 2f 20  62 79 74 65 73 20 69 6e  |ent">// bytes in|
521s         00002a20  20 61 6e 20 45 6e 64 70  6f 69 6e 74 20 69 6e 74  | an Endpoint int|
521s         00002a30  6f 20 61 20 68 75 6d 61  6e 2d 72 65 61 64 61 62  |o a human-readab|
521s         00002a40  6c 65 20 73 74 72 69 6e  67 2e 3c 2f 73 70 61 6e  |le string..    Formatter |
521s         00002a60  66 75 6e 63 28 5b 5d 62  79 74 65 29 20 73 74 72  |func([]byte) str|
521s         00002a70  69 6e 67 0a 7d 3c 2f 70  72 65 3e 0a 09 09 09 3c  |ing.}
....<| 521s 00002a80 70 3e 0a 45 6e 64 70 6f 69 6e 74 54 79 70 65 4d |p>.EndpointTypeM| 521s 00002a90 65 74 61 64 61 74 61 20 69 73 20 75 73 65 64 20 |etadata is used | 521s 00002aa0 74 6f 20 72 65 67 69 73 74 65 72 20 61 20 6e 65 |to register a ne| 521s 00002ab0 77 20 65 6e 64 70 6f 69 6e 74 20 74 79 70 65 2e |w endpoint type.| 521s 00002ac0 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 |.

...........| 521s 00002ad0 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 00002ae0 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 |..............type E| 521s 00002b50 72 72 6f 72 4c 61 79 65 72 3c 2f 61 3e 3c 2f 68 |rrorLayer....
type |
521s         00002b70  45 72 72 6f 72 4c 61 79  65 72 20 69 6e 74 65 72  |ErrorLayer inter|
521s         00002b80  66 61 63 65 20 7b 0a 20  20 20 20 4c 61 79 65 72  |face {.    Layer|
521s         00002b90  0a 20 20 20 20 45 72 72  6f 72 28 29 20 65 72 72  |.    Error() err|
521s         00002ba0  6f 72 0a 7d 3c 2f 70 72  65 3e 0a 09 09 09 3c 70  |or.}
.....ErrorLayer is | 521s 00002bc0 61 20 70 61 63 6b 65 74 20 6c 61 79 65 72 20 63 |a packet layer c| 521s 00002bd0 72 65 61 74 65 64 20 77 68 65 6e 20 64 65 63 6f |reated when deco| 521s 00002be0 64 69 6e 67 20 6f 66 20 74 68 65 20 70 61 63 6b |ding of the pack| 521s 00002bf0 65 74 20 68 61 73 20 66 61 69 6c 65 64 2e 0a 49 |et has failed..I| 521s 00002c00 74 73 20 70 61 79 6c 6f 61 64 20 69 73 20 61 6c |ts payload is al| 521s 00002c10 6c 20 74 68 65 20 62 79 74 65 73 20 74 68 61 74 |l the bytes that| 521s 00002c20 20 77 65 20 77 65 72 65 20 75 6e 61 62 6c 65 20 | we were unable | 521s 00002c30 74 6f 20 64 65 63 6f 64 65 2c 20 61 6e 64 20 74 |to decode, and t| 521s 00002c40 68 65 20 72 65 74 75 72 6e 65 64 0a 65 72 72 6f |he returned.erro| 521s 00002c50 72 20 64 65 74 61 69 6c 73 20 77 68 79 20 74 68 |r details why th| 521s 00002c60 65 20 64 65 63 6f 64 69 6e 67 20 66 61 69 6c 65 |e decoding faile| 521s 00002c70 64 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 |d..

.........| 521s 00002c80 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 |................| 521s 00002c90 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00002ca0 3c 68 32 20 69 64 3d 22 46 6c 6f 77 22 3e 74 79 |

ty| 521s 00002cb0 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |pe Flow| 521s 00002d00 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 |

....type Flow stru| 521s 00002d20 63 74 20 7b 0a 20 20 20 20 3c 73 70 61 6e 20 63 |ct {. /| 521s 00002d40 2f 20 63 6f 6e 74 61 69 6e 73 20 66 69 6c 74 65 |/ contains filte| 521s 00002d50 72 65 64 20 6f 72 20 75 6e 65 78 70 6f 72 74 65 |red or unexporte| 521s 00002d60 64 20 66 69 65 6c 64 73 3c 2f 73 70 61 6e 3e 0a |d fields.| 521s 00002d70 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c 70 3e 0a 46 |}....

.F| 521s 00002d80 6c 6f 77 20 72 65 70 72 65 73 65 6e 74 73 20 74 |low represents t| 521s 00002d90 68 65 20 64 69 72 65 63 74 69 6f 6e 20 6f 66 20 |he direction of | 521s 00002da0 74 72 61 66 66 69 63 20 66 6f 72 20 61 20 70 61 |traffic for a pa| 521s 00002db0 63 6b 65 74 20 6c 61 79 65 72 2c 20 61 73 20 61 |cket layer, as a| 521s 00002dc0 20 73 6f 75 72 63 65 20 61 6e 64 20 64 65 73 74 | source and dest| 521s 00002dd0 69 6e 61 74 69 6f 6e 20 45 6e 64 70 6f 69 6e 74 |ination Endpoint| 521s 00002de0 2e 0a 46 6c 6f 77 73 20 61 72 65 20 75 73 61 62 |..Flows are usab| 521s 00002df0 6c 65 20 61 73 20 6d 61 70 20 6b 65 79 73 2e 0a |le as map keys..| 521s 00002e00 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 0a |

............| 521s 00002e10 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00002e20 09 09 09 3c 68 33 20 69 64 3d 22 46 6c 6f 77 46 |...

fu| 521s 00002e40 6e 63 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |nc Flow| 521s 00002e90 46 72 6f 6d 45 6e 64 70 6f 69 6e 74 73 3c 2f 61 |FromEndpoints

.....
|
521s         00002eb0  66 75 6e 63 20 46 6c 6f  77 46 72 6f 6d 45 6e 64  |func FlowFromEnd|
521s         00002ec0  70 6f 69 6e 74 73 28 73  72 63 2c 20 64 73 74 20  |points(src, dst |
521s         00002ed0  45 6e 64 70 6f 69 6e 74  29 20 28 5f 20 46 6c 6f  |Endpoint) (_ Flo|
521s         00002ee0  77 2c 20 65 72 72 20 65  72 72 6f 72 29 3c 2f 70  |w, err error).....

.Flow| 521s 00002f00 46 72 6f 6d 45 6e 64 70 6f 69 6e 74 73 20 63 72 |FromEndpoints cr| 521s 00002f10 65 61 74 65 73 20 61 20 6e 65 77 20 66 6c 6f 77 |eates a new flow| 521s 00002f20 20 62 79 20 70 61 73 74 69 6e 67 20 74 6f 67 65 | by pasting toge| 521s 00002f30 74 68 65 72 20 74 77 6f 20 65 6e 64 70 6f 69 6e |ther two endpoin| 521s 00002f40 74 73 2e 0a 54 68 65 20 65 6e 64 70 6f 69 6e 74 |ts..The endpoint| 521s 00002f50 73 20 6d 75 73 74 20 68 61 76 65 20 74 68 65 20 |s must have the | 521s 00002f60 73 61 6d 65 20 45 6e 64 70 6f 69 6e 74 54 79 70 |same EndpointTyp| 521s 00002f70 65 2c 20 6f 72 20 74 68 69 73 20 66 75 6e 63 74 |e, or this funct| 521s 00002f80 69 6f 6e 20 77 69 6c 6c 20 72 65 74 75 72 6e 0a |ion will return.| 521s 00002f90 61 6e 20 65 72 72 6f 72 2e 0a 3c 2f 70 3e 0a 0a |an error..

..| 521s 00002fa0 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 00002fb0 09 09 3c 68 33 20 69 64 3d 22 4e 65 77 46 6c 6f |..

func NewFlow.....
func|
521s         00003030  20 4e 65 77 46 6c 6f 77  28 74 20 45 6e 64 70 6f  | NewFlow(t Endpo|
521s         00003040  69 6e 74 54 79 70 65 2c  20 73 72 63 2c 20 64 73  |intType, src, ds|
521s         00003050  74 20 5b 5d 62 79 74 65  29 20 46 6c 6f 77 3c 2f  |t []byte) Flow.....

.New| 521s 00003070 46 6c 6f 77 20 63 72 65 61 74 65 73 20 61 20 6e |Flow creates a n| 521s 00003080 65 77 20 66 6c 6f 77 2e 0a 3c 2f 70 3e 0a 0a 09 |ew flow..

...| 521s 00003090 09 09 09 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 |................| 521s 000030a0 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 46 6c |......

func (Fl| 521s 000030c0 6f 77 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |ow) Ds| 521s 00003110 74 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c |t

.....<| 521s 00003120 70 72 65 3e 66 75 6e 63 20 28 66 20 46 6c 6f 77 |pre>func (f Flow| 521s 00003130 29 20 44 73 74 28 29 20 28 64 73 74 20 45 6e 64 |) Dst() (dst End| 521s 00003140 70 6f 69 6e 74 29 3c 2f 70 72 65 3e 0a 09 09 09 |point)
....| 521s 00003150 09 3c 70 3e 0a 44 73 74 20 72 65 74 75 72 6e 73 |.

.Dst returns| 521s 00003160 20 74 68 65 20 64 65 73 74 69 6e 61 74 69 6f 6e | the destination| 521s 00003170 20 45 6e 64 70 6f 69 6e 74 20 66 6f 72 20 74 68 | Endpoint for th| 521s 00003180 69 73 20 66 6c 6f 77 2e 0a 3c 2f 70 3e 0a 0a 09 |is flow..

...| 521s 00003190 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 000031a0 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 46 6c |......

func (Flow) EndpointTy| 521s 00003220 70 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 |pe

.....| 521s 00003230 3c 70 72 65 3e 66 75 6e 63 20 28 66 20 46 6c 6f |
func (f Flo|
521s         00003240  77 29 20 45 6e 64 70 6f  69 6e 74 54 79 70 65 28  |w) EndpointType(|
521s         00003250  29 20 45 6e 64 70 6f 69  6e 74 54 79 70 65 3c 2f  |) EndpointType.....

.End| 521s 00003270 70 6f 69 6e 74 54 79 70 65 20 72 65 74 75 72 6e |pointType return| 521s 00003280 73 20 74 68 65 20 45 6e 64 70 6f 69 6e 74 54 79 |s the EndpointTy| 521s 00003290 70 65 20 66 6f 72 20 74 68 69 73 20 46 6c 6f 77 |pe for this Flow| 521s 000032a0 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 |..

..........| 521s 000032b0 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 000032c0 68 33 20 69 64 3d 22 46 6c 6f 77 2e 45 6e 64 70 |h3 id="Flow.Endp| 521s 000032d0 6f 69 6e 74 73 22 3e 66 75 6e 63 20 28 46 6c 6f |oints">func (Flo| 521s 000032e0 77 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |w) End| 521s 00003330 70 6f 69 6e 74 73 3c 2f 61 3e 3c 2f 68 33 3e 0a |points

.| 521s 00003340 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 66 |....
func (f|
521s         00003350  20 46 6c 6f 77 29 20 45  6e 64 70 6f 69 6e 74 73  | Flow) Endpoints|
521s         00003360  28 29 20 28 73 72 63 2c  20 64 73 74 20 45 6e 64  |() (src, dst End|
521s         00003370  70 6f 69 6e 74 29 3c 2f  70 72 65 3e 0a 09 09 09  |point)
....| 521s 00003380 09 3c 70 3e 0a 45 6e 64 70 6f 69 6e 74 73 20 72 |.

.Endpoints r| 521s 00003390 65 74 75 72 6e 73 20 74 68 65 20 74 77 6f 20 45 |eturns the two E| 521s 000033a0 6e 64 70 6f 69 6e 74 73 20 66 6f 72 20 74 68 69 |ndpoints for thi| 521s 000033b0 73 20 66 6c 6f 77 2e 0a 3c 2f 70 3e 0a 0a 09 09 |s flow..

....| 521s 000033c0 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 000033d0 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 46 6c 6f |.....

func | 521s 000033f0 28 46 6c 6f 77 29 20 3c 61 20 68 72 65 66 3d 22 |(Flow) Reverse.....
func |
521s         00003460  28 66 20 46 6c 6f 77 29  20 52 65 76 65 72 73 65  |(f Flow) Reverse|
521s         00003470  28 29 20 46 6c 6f 77 3c  2f 70 72 65 3e 0a 09 09  |() Flow
...| 521s 00003480 09 09 3c 70 3e 0a 52 65 76 65 72 73 65 20 72 65 |..

.Reverse re| 521s 00003490 74 75 72 6e 73 20 61 20 6e 65 77 20 66 6c 6f 77 |turns a new flow| 521s 000034a0 20 77 69 74 68 20 65 6e 64 70 6f 69 6e 74 73 20 | with endpoints | 521s 000034b0 72 65 76 65 72 73 65 64 2e 0a 3c 2f 70 3e 0a 0a |reversed..

..| 521s 000034c0 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 000034d0 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 46 |.......

func (F| 521s 000034f0 6c 6f 77 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 |low) S| 521s 00003540 72 63 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 |rc

.....| 521s 00003550 3c 70 72 65 3e 66 75 6e 63 20 28 66 20 46 6c 6f |
func (f Flo|
521s         00003560  77 29 20 53 72 63 28 29  20 28 73 72 63 20 45 6e  |w) Src() (src En|
521s         00003570  64 70 6f 69 6e 74 29 3c  2f 70 72 65 3e 0a 09 09  |dpoint)
...| 521s 00003580 09 09 3c 70 3e 0a 53 72 63 20 72 65 74 75 72 6e |..

.Src return| 521s 00003590 73 20 74 68 65 20 73 6f 75 72 63 65 20 45 6e 64 |s the source End| 521s 000035a0 70 6f 69 6e 74 20 66 6f 72 20 74 68 69 73 20 66 |point for this f| 521s 000035b0 6c 6f 77 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a |low..

.......| 521s 000035c0 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 000035d0 09 09 3c 68 33 20 69 64 3d 22 46 6c 6f 77 2e 53 |..

func (Flo| 521s 000035f0 77 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |w) Stri| 521s 00003640 6e 67 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 |ng

.....| 521s 00003650 3c 70 72 65 3e 66 75 6e 63 20 28 66 20 46 6c 6f |
func (f Flo|
521s         00003660  77 29 20 53 74 72 69 6e  67 28 29 20 73 74 72 69  |w) String() stri|
521s         00003670  6e 67 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |ng
.....

| 521s 00003680 0a 53 74 72 69 6e 67 20 72 65 74 75 72 6e 73 20 |.String returns | 521s 00003690 61 20 68 75 6d 61 6e 2d 72 65 61 64 61 62 6c 65 |a human-readable| 521s 000036a0 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 | representation | 521s 000036b0 6f 66 20 74 68 69 73 20 66 6c 6f 77 2c 20 69 6e |of this flow, in| 521s 000036c0 20 74 68 65 20 66 6f 72 6d 0a 26 23 33 34 3b 53 | the form."S| 521s 000036d0 72 63 2d 26 67 74 3b 44 73 74 26 23 33 34 3b 0a |rc->Dst".| 521s 000036e0 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 09 0a |

............| 521s 000036f0 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 |................| 521s 00003700 09 09 3c 68 32 20 69 64 3d 22 4c 61 79 65 72 22 |..

type Layer| 521s 00003760 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 |

....type Layer int| 521s 00003780 65 72 66 61 63 65 20 7b 0a 20 20 20 20 66 6d 74 |erface {. fmt| 521s 00003790 2e 53 74 72 69 6e 67 65 72 0a 20 20 20 20 3c 73 |.Stringer. // LayerType| 521s 000037c0 20 69 73 20 74 68 65 20 67 6f 70 61 63 6b 65 74 | is the gopacket| 521s 000037d0 20 74 79 70 65 20 66 6f 72 20 74 68 69 73 20 6c | type for this l| 521s 000037e0 61 79 65 72 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 |ayer.. | 521s 000037f0 20 4c 61 79 65 72 54 79 70 65 28 29 20 4c 61 79 | LayerType() Lay| 521s 00003800 65 72 54 79 70 65 0a 20 20 20 20 3c 73 70 61 6e |erType. // LayerContent| 521s 00003830 73 20 72 65 74 75 72 6e 73 20 74 68 65 20 73 65 |s returns the se| 521s 00003840 74 20 6f 66 20 62 79 74 65 73 20 74 68 61 74 20 |t of bytes that | 521s 00003850 6d 61 6b 65 20 75 70 20 74 68 69 73 20 6c 61 79 |make up this lay| 521s 00003860 65 72 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 4c |er.. L| 521s 00003870 61 79 65 72 43 6f 6e 74 65 6e 74 73 28 29 20 5b |ayerContents() [| 521s 00003880 5d 62 79 74 65 0a 20 20 20 20 3c 73 70 61 6e 20 |]byte. | 521s 000038a0 2f 2f 20 4c 61 79 65 72 50 61 79 6c 6f 61 64 20 |// LayerPayload | 521s 000038b0 72 65 74 75 72 6e 73 20 74 68 65 20 73 65 74 20 |returns the set | 521s 000038c0 6f 66 20 62 79 74 65 73 20 63 6f 6e 74 61 69 6e |of bytes contain| 521s 000038d0 65 64 20 77 69 74 68 69 6e 20 74 68 69 73 20 6c |ed within this l| 521s 000038e0 61 79 65 72 2c 20 6e 6f 74 3c 2f 73 70 61 6e 3e |ayer, not| 521s 000038f0 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 |. // in| 521s 00003910 63 6c 75 64 69 6e 67 20 74 68 65 20 6c 61 79 65 |cluding the laye| 521s 00003920 72 20 69 74 73 65 6c 66 2e 3c 2f 73 70 61 6e 3e |r itself.| 521s 00003930 0a 20 20 20 20 4c 61 79 65 72 50 61 79 6c 6f 61 |. LayerPayloa| 521s 00003940 64 28 29 20 5b 5d 62 79 74 65 0a 7d 3c 2f 70 72 |d() []byte.}....

.Layer | 521s 00003960 72 65 70 72 65 73 65 6e 74 73 20 61 20 73 69 6e |represents a sin| 521s 00003970 67 6c 65 20 64 65 63 6f 64 65 64 20 70 61 63 6b |gle decoded pack| 521s 00003980 65 74 20 6c 61 79 65 72 20 28 75 73 69 6e 67 20 |et layer (using | 521s 00003990 65 69 74 68 65 72 20 74 68 65 0a 4f 53 49 20 6f |either the.OSI o| 521s 000039a0 72 20 54 43 50 2f 49 50 20 64 65 66 69 6e 69 74 |r TCP/IP definit| 521s 000039b0 69 6f 6e 20 6f 66 20 61 20 6c 61 79 65 72 29 2e |ion of a layer).| 521s 000039c0 20 20 57 68 65 6e 20 64 65 63 6f 64 69 6e 67 2c | When decoding,| 521s 000039d0 20 61 20 70 61 63 6b 65 74 26 23 33 39 3b 73 20 | a packet's | 521s 000039e0 64 61 74 61 20 69 73 0a 62 72 6f 6b 65 6e 20 75 |data is.broken u| 521s 000039f0 70 20 69 6e 74 6f 20 61 20 6e 75 6d 62 65 72 20 |p into a number | 521s 00003a00 6f 66 20 6c 61 79 65 72 73 2e 20 20 54 68 65 20 |of layers. The | 521s 00003a10 63 61 6c 6c 65 72 20 6d 61 79 20 63 61 6c 6c 20 |caller may call | 521s 00003a20 4c 61 79 65 72 54 79 70 65 28 29 20 74 6f 0a 66 |LayerType() to.f| 521s 00003a30 69 67 75 72 65 20 6f 75 74 20 77 68 69 63 68 20 |igure out which | 521s 00003a40 74 79 70 65 20 6f 66 20 6c 61 79 65 72 20 68 65 |type of layer he| 521s 00003a50 26 23 33 39 3b 73 20 72 65 63 65 69 76 65 64 20 |'s received | 521s 00003a60 66 72 6f 6d 20 74 68 65 20 70 61 63 6b 65 74 2e |from the packet.| 521s 00003a70 20 20 4f 70 74 69 6f 6e 61 6c 6c 79 2c 0a 68 65 | Optionally,.he| 521s 00003a80 20 6d 61 79 20 74 68 65 6e 20 75 73 65 20 61 20 | may then use a | 521s 00003a90 74 79 70 65 20 61 73 73 65 72 74 69 6f 6e 20 74 |type assertion t| 521s 00003aa0 6f 20 67 65 74 20 74 68 65 20 61 63 74 75 61 6c |o get the actual| 521s 00003ab0 20 6c 61 79 65 72 20 74 79 70 65 20 66 6f 72 20 | layer type for | 521s 00003ac0 64 65 65 70 0a 69 6e 73 70 65 63 74 69 6f 6e 20 |deep.inspection | 521s 00003ad0 6f 66 20 74 68 65 20 64 61 74 61 2e 0a 3c 2f 70 |of the data.................| 521s 00003af0 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 |................| 521s 00003b00 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 |..........

ty| 521s 00003b20 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |pe La| 521s 00003b70 79 65 72 43 6c 61 73 73 3c 2f 61 3e 3c 2f 68 32 |yerClass....
type L|
521s         00003b90  61 79 65 72 43 6c 61 73  73 20 69 6e 74 65 72 66  |ayerClass interf|
521s         00003ba0  61 63 65 20 7b 0a 20 20  20 20 3c 73 70 61 6e 20  |ace {.    |
521s         00003bc0  2f 2f 20 43 6f 6e 74 61  69 6e 73 20 72 65 74 75  |// Contains retu|
521s         00003bd0  72 6e 73 20 74 72 75 65  20 69 66 20 74 68 65 20  |rns true if the |
521s         00003be0  67 69 76 65 6e 20 6c 61  79 65 72 20 74 79 70 65  |given layer type|
521s         00003bf0  20 73 68 6f 75 6c 64 20  62 65 20 63 6f 6e 73 69  | should be consi|
521s         00003c00  64 65 72 65 64 20 70 61  72 74 3c 2f 73 70 61 6e  |dered part.    // o|
521s         00003c30  66 20 74 68 69 73 20 6c  61 79 65 72 20 63 6c 61  |f this layer cla|
521s         00003c40  73 73 2e 3c 2f 73 70 61  6e 3e 0a 20 20 20 20 43  |ss..    C|
521s         00003c50  6f 6e 74 61 69 6e 73 28  4c 61 79 65 72 54 79 70  |ontains(LayerTyp|
521s         00003c60  65 29 20 62 6f 6f 6c 0a  7d 3c 2f 70 72 65 3e 0a  |e) bool.}
.| 521s 00003c70 09 09 09 3c 70 3e 0a 4c 61 79 65 72 43 6c 61 73 |...

.LayerClas| 521s 00003c80 73 20 69 73 20 61 20 73 65 74 20 6f 66 20 4c 61 |s is a set of La| 521s 00003c90 79 65 72 54 79 70 65 73 2c 20 75 73 65 64 20 66 |yerTypes, used f| 521s 00003ca0 6f 72 20 67 72 61 62 62 69 6e 67 20 6f 6e 65 20 |or grabbing one | 521s 00003cb0 6f 66 20 61 20 6e 75 6d 62 65 72 20 6f 66 0a 64 |of a number of.d| 521s 00003cc0 69 66 66 65 72 65 6e 74 20 74 79 70 65 73 20 66 |ifferent types f| 521s 00003cd0 72 6f 6d 20 61 20 70 61 63 6b 65 74 2e 0a 3c 2f |rom a packet................| 521s 00003cf0 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00003d00 09 3c 68 33 20 69 64 3d 22 4e 65 77 4c 61 79 65 |.

func NewLa| 521s 00003d70 79 65 72 43 6c 61 73 73 3c 2f 61 3e 3c 2f 68 33 |yerClass.....
func |
521s         00003d90  4e 65 77 4c 61 79 65 72  43 6c 61 73 73 28 74 79  |NewLayerClass(ty|
521s         00003da0  70 65 73 20 5b 5d 4c 61  79 65 72 54 79 70 65 29  |pes []LayerType)|
521s         00003db0  20 4c 61 79 65 72 43 6c  61 73 73 3c 2f 70 72 65  | LayerClass.....

.NewLay| 521s 00003dd0 65 72 43 6c 61 73 73 20 63 72 65 61 74 65 73 20 |erClass creates | 521s 00003de0 61 20 4c 61 79 65 72 43 6c 61 73 73 2c 20 61 74 |a LayerClass, at| 521s 00003df0 74 65 6d 70 74 69 6e 67 20 74 6f 20 62 65 20 73 |tempting to be s| 521s 00003e00 6d 61 72 74 20 61 62 6f 75 74 20 77 68 69 63 68 |mart about which| 521s 00003e10 20 74 79 70 65 0a 69 74 20 63 72 65 61 74 65 73 | type.it creates| 521s 00003e20 20 62 61 73 65 64 20 6f 6e 20 77 68 69 63 68 20 | based on which | 521s 00003e30 74 79 70 65 73 20 61 72 65 20 70 61 73 73 65 64 |types are passed| 521s 00003e40 20 69 6e 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a | in..

.......| 521s 00003e50 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a |................| 521s 00003e60 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 4c |.......

ty| 521s 00003e80 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |pe LayerClassMap

....
|
521s         00003ef0  74 79 70 65 20 4c 61 79  65 72 43 6c 61 73 73 4d  |type LayerClassM|
521s         00003f00  61 70 20 6d 61 70 5b 4c  61 79 65 72 54 79 70 65  |ap map[LayerType|
521s         00003f10  5d 62 6f 6f 6c 3c 2f 70  72 65 3e 0a 09 09 09 3c  |]bool
....<| 521s 00003f20 70 3e 0a 4c 61 79 65 72 43 6c 61 73 73 4d 61 70 |p>.LayerClassMap| 521s 00003f30 20 69 6d 70 6c 65 6d 65 6e 74 73 20 61 20 4c 61 | implements a La| 521s 00003f40 79 65 72 43 6c 61 73 73 20 77 69 74 68 20 61 20 |yerClass with a | 521s 00003f50 6d 61 70 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a |map..

.......| 521s 00003f60 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 |................| 521s 00003f70 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 |........

func NewLayerCla| 521s 00003ff0 73 73 4d 61 70 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 |ssMap

..| 521s 00004000 09 09 09 3c |...<| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..16384..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..16344..] Version=6 TrafficClass=0 FlowLabel=100497 Length=16344 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 01 88 91 3f d8 06 40 00 00 00 00 00 00 00 00 |`...?..@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[..16312..] SrcPort=8080(http-alt) DstPort=58799 Seq=174438055 Ack=144119882 DataOffset=8 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=8962 Checksum=16352 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505270/96505084 0x05c08db605c08cfc)] Padding=[]} 521s 00000000 1f 90 e5 af 0a 65 b6 a7 08 97 18 4a 80 10 23 02 |.....e.....J..#.| 521s 00000010 3f e0 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |?...............| 521s --- Layer 4 --- 521s Payload 16312 byte(s) 521s 00000000 3e 56 61 72 69 61 62 6c 65 73 3c 2f 68 32 3e 0a |>Variables

.| 521s 00000010 09 09 09 0a 09 09 09 09 3c 70 72 65 3e 76 61 72 |........
var|
521s         00000020  20 56 61 6c 69 64 4d 41  43 50 72 65 66 69 78 4d  | ValidMACPrefixM|
521s         00000030  61 70 20 3d 20 76 61 6c  69 64 4d 41 43 50 72 65  |ap = validMACPre|
521s         00000040  66 69 78 4d 61 70 3c 2f  70 72 65 3e 0a 09 09 09  |fixMap
....| 521s 00000050 09 3c 70 3e 0a 56 61 6c 69 64 4d 41 43 50 72 65 |.

.ValidMACPre| 521s 00000060 66 69 78 4d 61 70 20 6d 61 70 73 20 61 20 76 61 |fixMap maps a va| 521s 00000070 6c 69 64 20 4d 41 43 20 61 64 64 72 65 73 73 20 |lid MAC address | 521s 00000080 70 72 65 66 69 78 20 74 6f 20 74 68 65 20 6e 61 |prefix to the na| 521s 00000090 6d 65 20 6f 66 20 74 68 65 0a 6f 72 67 61 6e 69 |me of the.organi| 521s 000000a0 7a 61 74 69 6f 6e 20 74 68 61 74 20 6f 77 6e 73 |zation that owns| 521s 000000b0 20 74 68 65 20 72 69 67 68 74 73 20 74 6f 20 75 | the rights to u| 521s 000000c0 73 65 20 69 74 2e 20 20 57 65 20 6d 61 70 20 69 |se it. We map i| 521s 000000d0 74 20 74 6f 20 61 20 68 69 64 64 65 6e 0a 76 61 |t to a hidden.va| 521s 000000e0 72 69 61 62 6c 65 20 73 6f 20 69 74 20 77 6f 6e |riable so it won| 521s 000000f0 26 23 33 39 3b 74 20 73 68 6f 77 20 75 70 20 69 |'t show up i| 521s 00000100 6e 20 67 6f 64 6f 63 2c 20 73 69 6e 63 65 20 69 |n godoc, since i| 521s 00000110 74 26 23 33 39 3b 73 20 61 20 76 65 72 79 20 6c |t's a very l| 521s 00000120 61 72 67 65 20 6d 61 70 2e 0a 3c 2f 70 3e 0a 0a |arge map..

..| 521s 00000130 09 09 09 0a 09 09 0a 09 09 0a 09 09 0a 09 09 09 |................| 521s 00000140 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 |........

type A| 521s 000001b0 70 70 6c 69 63 61 74 69 6f 6e 4c 61 79 65 72 3c |pplicationLayer<| 521s 000001c0 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type Applicatio| 521s 000001e0 6e 4c 61 79 65 72 20 69 6e 74 65 72 66 61 63 65 |nLayer interface| 521s 000001f0 20 7b 0a 20 20 20 20 4c 61 79 65 72 0a 20 20 20 | {. Layer. | 521s 00000200 20 50 61 79 6c 6f 61 64 28 29 20 5b 5d 62 79 74 | Payload() []byt| 521s 00000210 65 0a 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c 70 3e |e.}....

| 521s 00000220 0a 41 70 70 6c 69 63 61 74 69 6f 6e 4c 61 79 65 |.ApplicationLaye| 521s 00000230 72 20 69 73 20 74 68 65 20 70 61 63 6b 65 74 20 |r is the packet | 521s 00000240 6c 61 79 65 72 20 63 6f 72 72 65 73 70 6f 6e 64 |layer correspond| 521s 00000250 69 6e 67 20 74 6f 20 74 68 65 20 54 43 50 2f 49 |ing to the TCP/I| 521s 00000260 50 20 6c 61 79 65 72 20 34 20 28 4f 53 49 0a 6c |P layer 4 (OSI.l| 521s 00000270 61 79 65 72 20 37 29 2c 20 61 6c 73 6f 20 6b 6e |ayer 7), also kn| 521s 00000280 6f 77 6e 20 61 73 20 74 68 65 20 70 61 63 6b 65 |own as the packe| 521s 00000290 74 20 70 61 79 6c 6f 61 64 2e 0a 3c 2f 70 3e 0a |t payload..

.| 521s 000002a0 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 000002b0 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 |................| 521s 000002c0 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 |........

typ| 521s 000002e0 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e Capture| 521s 00000330 49 6e 66 6f 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 |Info

...| 521s 00000340 09 3c 70 72 65 3e 74 79 70 65 20 43 61 70 74 75 |.
type Captu|
521s         00000350  72 65 49 6e 66 6f 20 73  74 72 75 63 74 20 7b 0a  |reInfo struct {.|
521s         00000360  20 20 20 20 3c 73 70 61  6e 20 63 6c 61 73 73 3d  |    // Pop|
521s         00000380  75 6c 61 74 65 64 20 69  73 20 73 65 74 20 74 6f  |ulated is set to|
521s         00000390  20 74 72 75 65 20 69 66  20 74 68 65 20 72 65 73  | true if the res|
521s         000003a0  74 20 6f 66 20 74 68 65  20 43 61 70 74 75 72 65  |t of the Capture|
521s         000003b0  49 6e 66 6f 20 68 61 73  20 62 65 65 6e 20 70 6f  |Info has been po|
521s         000003c0  70 75 6c 61 74 65 64 3c  2f 73 70 61 6e 3e 0a 20  |pulated. |
521s         000003d0  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // with|
521s         000003f0  20 61 63 74 75 61 6c 20  69 6e 66 6f 72 6d 61 74  | actual informat|
521s         00000400  69 6f 6e 2e 20 20 49 66  20 50 6f 70 75 6c 61 74  |ion.  If Populat|
521s         00000410  65 64 20 69 73 20 66 61  6c 73 65 2c 20 74 68 65  |ed is false, the|
521s         00000420  72 65 26 23 33 39 3b 73  20 6e 6f 20 70 6f 69 6e  |re's no poin|
521s         00000430  74 20 69 6e 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |t in.    |
521s         00000440  3c 73 70 61 6e 20 63 6c  61 73 73 3d 22 63 6f 6d  |// reading|
521s         00000460  20 61 6e 79 20 6f 66 20  74 68 65 20 6f 74 68 65  | any of the othe|
521s         00000470  72 20 66 69 65 6c 64 73  2e 3c 2f 73 70 61 6e 3e  |r fields.|
521s         00000480  0a 20 20 20 20 50 6f 70  75 6c 61 74 65 64 20 20  |.    Populated  |
521s         00000490  20 20 20 20 20 20 20 20  20 20 20 62 6f 6f 6c 0a  |           bool.|
521s         000004a0  20 20 20 20 54 69 6d 65  73 74 61 6d 70 20 20 20  |    Timestamp   |
521s         000004b0  20 20 20 20 20 20 20 20  20 20 74 69 6d 65 2e 54  |          time.T|
521s         000004c0  69 6d 65 0a 20 20 20 20  43 61 70 74 75 72 65 4c  |ime.    CaptureL|
521s         000004d0  65 6e 67 74 68 2c 20 4c  65 6e 67 74 68 20 69 6e  |ength, Length in|
521s         000004e0  74 0a 7d 3c 2f 70 72 65  3e 0a 09 09 09 3c 70 3e  |t.}
....

| 521s 000004f0 0a 43 61 70 74 75 72 65 49 6e 66 6f 20 63 6f 6e |.CaptureInfo con| 521s 00000500 74 61 69 6e 73 20 63 61 70 74 75 72 65 20 6d 65 |tains capture me| 521s 00000510 74 61 64 61 74 61 20 66 6f 72 20 61 20 70 61 63 |tadata for a pac| 521s 00000520 6b 65 74 2e 20 20 49 66 20 61 20 70 61 63 6b 65 |ket. If a packe| 521s 00000530 74 20 77 61 73 20 63 61 70 74 75 72 65 64 0a 6f |t was captured.o| 521s 00000540 66 66 20 74 68 65 20 77 69 72 65 20 6f 72 20 72 |ff the wire or r| 521s 00000550 65 61 64 20 66 72 6f 6d 20 61 20 70 63 61 70 20 |ead from a pcap | 521s 00000560 66 69 6c 65 20 28 73 65 65 20 74 68 65 20 26 23 |file (see the &#| 521s 00000570 33 39 3b 70 63 61 70 26 23 33 39 3b 20 73 75 62 |39;pcap' sub| 521s 00000580 64 69 72 65 63 74 6f 72 79 29 2c 20 74 68 69 73 |directory), this| 521s 00000590 0a 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 77 69 6c |.information wil| 521s 000005a0 6c 20 62 65 20 61 74 74 61 63 68 65 64 20 74 6f |l be attached to| 521s 000005b0 20 74 68 65 20 70 61 63 6b 65 74 2e 0a 3c 2f 70 | the packet.................| 521s 000005d0 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 |................| 521s 000005e0 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 |..........

type | 521s 00000650 44 65 63 6f 64 65 46 61 69 6c 75 72 65 3c 2f 61 |DecodeFailure

....
t|
521s         00000670  79 70 65 20 44 65 63 6f  64 65 46 61 69 6c 75 72  |ype DecodeFailur|
521s         00000680  65 20 73 74 72 75 63 74  20 7b 0a 20 20 20 20 3c  |e struct {.    <|
521s         00000690  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         000006a0  65 6e 74 22 3e 2f 2f 20  63 6f 6e 74 61 69 6e 73  |ent">// contains|
521s         000006b0  20 66 69 6c 74 65 72 65  64 20 6f 72 20 75 6e 65  | filtered or une|
521s         000006c0  78 70 6f 72 74 65 64 20  66 69 65 6c 64 73 3c 2f  |xported fields.}
...| 521s 000006e0 09 3c 70 3e 0a 44 65 63 6f 64 65 46 61 69 6c 75 |.

.DecodeFailu| 521s 000006f0 72 65 20 69 73 20 61 20 70 61 63 6b 65 74 20 6c |re is a packet l| 521s 00000700 61 79 65 72 20 63 72 65 61 74 65 64 20 69 66 20 |ayer created if | 521s 00000710 64 65 63 6f 64 69 6e 67 20 6f 66 20 74 68 65 20 |decoding of the | 521s 00000720 70 61 63 6b 65 74 20 64 61 74 61 20 66 61 69 6c |packet data fail| 521s 00000730 65 64 0a 66 6f 72 20 73 6f 6d 65 20 72 65 61 73 |ed.for some reas| 521s 00000740 6f 6e 2e 20 20 49 74 20 69 6d 70 6c 65 6d 65 6e |on. It implemen| 521s 00000750 74 73 20 45 72 72 6f 72 4c 61 79 65 72 2e 20 20 |ts ErrorLayer. | 521s 00000760 4c 61 79 65 72 43 6f 6e 74 65 6e 74 73 20 77 69 |LayerContents wi| 521s 00000770 6c 6c 20 62 65 20 74 68 65 20 65 6e 74 69 72 65 |ll be the entire| 521s 00000780 0a 73 65 74 20 6f 66 20 62 79 74 65 73 20 74 68 |.set of bytes th| 521s 00000790 61 74 20 66 61 69 6c 65 64 20 74 6f 20 70 61 72 |at failed to par| 521s 000007a0 73 65 2c 20 61 6e 64 20 45 72 72 6f 72 20 77 69 |se, and Error wi| 521s 000007b0 6c 6c 20 72 65 74 75 72 6e 20 74 68 65 20 72 65 |ll return the re| 521s 000007c0 61 73 6f 6e 20 70 61 72 73 69 6e 67 0a 66 61 69 |ason parsing.fai| 521s 000007d0 6c 65 64 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a |led..

.......| 521s 000007e0 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a |................| 521s 000007f0 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 |.............func (| 521s 00000820 2a 44 65 63 6f 64 65 46 61 69 6c 75 72 65 29 20 |*DecodeFailure) | 521s 00000830 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |
Error<| 521s 00000880 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 |/a>.....func (d *Decod| 521s 000008a0 65 46 61 69 6c 75 72 65 29 20 45 72 72 6f 72 28 |eFailure) Error(| 521s 000008b0 29 20 65 72 72 6f 72 3c 2f 70 72 65 3e 0a 09 09 |) error...| 521s 000008c0 09 09 3c 70 3e 0a 45 72 72 6f 72 20 72 65 74 75 |..

.Error retu| 521s 000008d0 72 6e 73 20 74 68 65 20 65 72 72 6f 72 20 65 6e |rns the error en| 521s 000008e0 63 6f 75 6e 74 65 72 65 64 20 64 75 72 69 6e 67 |countered during| 521s 000008f0 20 64 65 63 6f 64 69 6e 67 2e 0a 3c 2f 70 3e 0a | decoding..

.| 521s 00000900 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 |................| 521s 00000910 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 |........

fun| 521s 00000940 63 20 28 2a 44 65 63 6f 64 65 46 61 69 6c 75 72 |c (*DecodeFailur| 521s 00000950 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |e) Lay| 521s 000009a0 65 72 43 6f 6e 74 65 6e 74 73 3c 2f 61 3e 3c 2f |erContents.....
fun|
521s         000009c0  63 20 28 64 20 2a 44 65  63 6f 64 65 46 61 69 6c  |c (d *DecodeFail|
521s         000009d0  75 72 65 29 20 4c 61 79  65 72 43 6f 6e 74 65 6e  |ure) LayerConten|
521s         000009e0  74 73 28 29 20 5b 5d 62  79 74 65 3c 2f 70 72 65  |ts() []byte...............|
521s         00000a00  0a 09 09 09 0a 09 09 09  09 0a 09 09 09 09 3c 68  |..............func (*DecodeF|
521s         00000a40  61 69 6c 75 72 65 29 20  3c 61 20 68 72 65 66 3d  |ailure) LayerPayload

.....func (d *Decode| 521s 00000ac0 46 61 69 6c 75 72 65 29 20 4c 61 79 65 72 50 61 |Failure) LayerPa| 521s 00000ad0 79 6c 6f 61 64 28 29 20 5b 5d 62 79 74 65 3c 2f |yload() []byte............| 521s 00000af0 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00000b00 09 3c 68 33 20 69 64 3d 22 44 65 63 6f 64 65 46 |.

func (*DecodeF| 521s 00000b30 61 69 6c 75 72 65 29 20 3c 61 20 68 72 65 66 3d |ailure) LayerType<| 521s 00000b90 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 75 |/h3>.....
fu|
521s         00000ba0  6e 63 20 28 64 20 2a 44  65 63 6f 64 65 46 61 69  |nc (d *DecodeFai|
521s         00000bb0  6c 75 72 65 29 20 4c 61  79 65 72 54 79 70 65 28  |lure) LayerType(|
521s         00000bc0  29 20 4c 61 79 65 72 54  79 70 65 3c 2f 70 72 65  |) LayerType.....

.LayerT| 521s 00000be0 79 70 65 20 72 65 74 75 72 6e 73 20 4c 61 79 65 |ype returns Laye| 521s 00000bf0 72 54 79 70 65 44 65 63 6f 64 65 46 61 69 6c 75 |rTypeDecodeFailu| 521s 00000c00 72 65 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 |re.

.........| 521s 00000c10 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 |................| 521s 00000c20 3c 68 33 20 69 64 3d 22 44 65 63 6f 64 65 46 61 |

fu| 521s 00000c40 6e 63 20 28 2a 44 65 63 6f 64 65 46 61 69 6c 75 |nc (*DecodeFailu| 521s 00000c50 72 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |re) St| 521s 00000ca0 72 69 6e 67 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 |ring

...| 521s 00000cb0 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 64 20 2a |..
func (d *|
521s         00000cc0  44 65 63 6f 64 65 46 61  69 6c 75 72 65 29 20 53  |DecodeFailure) S|
521s         00000cd0  74 72 69 6e 67 28 29 20  73 74 72 69 6e 67 3c 2f  |tring() string............|
521s         00000cf0  09 09 09 0a 09 09 09 0a  09 09 0a 09 09 09 0a 09  |................|
521s         00000d00  09 09 0a 09 09 09 3c 68  32 20 69 64 3d 22 44 65  |......

type <| 521s 00000d20 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b 67 |a href="/src/pkg| 521s 00000d30 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e |/github.com/gcon| 521s 00000d40 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 2f 64 65 |nell/gopacket/de| 521s 00000d50 63 6f 64 65 2e 67 6f 3f 73 3d 32 31 30 34 3a 32 |code.go?s=2104:2| 521s 00000d60 31 35 33 23 4c 34 36 22 3e 44 65 63 6f 64 65 46 |153#L46">DecodeF| 521s 00000d70 75 6e 63 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 |unc

....| 521s 00000d80 3c 70 72 65 3e 74 79 70 65 20 44 65 63 6f 64 65 |
type Decode|
521s         00000d90  46 75 6e 63 20 66 75 6e  63 28 5b 5d 62 79 74 65  |Func func([]byte|
521s         00000da0  2c 20 50 61 63 6b 65 74  42 75 69 6c 64 65 72 29  |, PacketBuilder)|
521s         00000db0  20 65 72 72 6f 72 3c 2f  70 72 65 3e 0a 09 09 09  | error
....| 521s 00000dc0 3c 70 3e 0a 44 65 63 6f 64 65 46 75 6e 63 20 77 |

.DecodeFunc w| 521s 00000dd0 72 61 70 73 20 61 20 66 75 6e 63 74 69 6f 6e 20 |raps a function | 521s 00000de0 74 6f 20 6d 61 6b 65 20 69 74 20 61 20 44 65 63 |to make it a Dec| 521s 00000df0 6f 64 65 72 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 |oder..

......| 521s 00000e00 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 00000e10 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 |..............func (D| 521s 00000e40 65 63 6f 64 65 46 75 6e 63 29 20 3c 61 20 68 72 |ecodeFunc) Decode<| 521s 00000ea0 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 75 |/h3>.....
fu|
521s         00000eb0  6e 63 20 28 64 20 44 65  63 6f 64 65 46 75 6e 63  |nc (d DecodeFunc|
521s         00000ec0  29 20 44 65 63 6f 64 65  28 64 61 74 61 20 5b 5d  |) Decode(data []|
521s         00000ed0  62 79 74 65 2c 20 70 20  50 61 63 6b 65 74 42 75  |byte, p PacketBu|
521s         00000ee0  69 6c 64 65 72 29 20 65  72 72 6f 72 3c 2f 70 72  |ilder) error..............|
521s         00000f00  09 0a 09 09 09 0a 09 09  0a 09 09 09 0a 09 09 09  |................|
521s         00000f10  0a 09 09 09 3c 68 32 20  69 64 3d 22 44 65 63 6f  |....

type | 521s 00000f30 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |Decod| 521s 00000f80 65 4f 70 74 69 6f 6e 73 3c 2f 61 3e 3c 2f 68 32 |eOptions....
type D|
521s         00000fa0  65 63 6f 64 65 4f 70 74  69 6f 6e 73 20 73 74 72  |ecodeOptions str|
521s         00000fb0  75 63 74 20 7b 0a 20 20  20 20 3c 73 70 61 6e 20  |uct {.    |
521s         00000fd0  2f 2f 20 4c 61 7a 79 20  64 65 63 6f 64 69 6e 67  |// Lazy decoding|
521s         00000fe0  20 64 65 63 6f 64 65 73  20 74 68 65 20 6d 69 6e  | decodes the min|
521s         00000ff0  69 6d 75 6d 20 6e 75 6d  62 65 72 20 6f 66 20 6c  |imum number of l|
521s         00001000  61 79 65 72 73 20 6e 65  65 64 65 64 20 74 6f 20  |ayers needed to |
521s         00001010  72 65 74 75 72 6e 20 64  61 74 61 3c 2f 73 70 61  |return data.    // |
521s         00001040  66 6f 72 20 61 20 70 61  63 6b 65 74 20 61 74 20  |for a packet at |
521s         00001050  65 61 63 68 20 66 75 6e  63 74 69 6f 6e 20 63 61  |each function ca|
521s         00001060  6c 6c 2e 20 20 42 65 20  63 61 72 65 66 75 6c 20  |ll.  Be careful |
521s         00001070  75 73 69 6e 67 20 74 68  69 73 20 77 69 74 68 20  |using this with |
521s         00001080  63 6f 6e 63 75 72 72 65  6e 74 3c 2f 73 70 61 6e  |concurrent.    // p|
521s         000010b0  61 63 6b 65 74 20 70 72  6f 63 65 73 73 6f 72 73  |acket processors|
521s         000010c0  2c 20 61 73 20 65 61 63  68 20 63 61 6c 6c 20 74  |, as each call t|
521s         000010d0  6f 20 70 61 63 6b 65 74  2e 2a 20 63 6f 75 6c 64  |o packet.* could|
521s         000010e0  20 6d 75 74 61 74 65 20  74 68 65 20 70 61 63 6b  | mutate the pack|
521s         000010f0  65 74 2c 20 61 6e 64 3c  2f 73 70 61 6e 3e 0a 20  |et, and. |
521s         00001100  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // two |
521s         00001120  63 6f 6e 63 75 72 72 65  6e 74 20 66 75 6e 63 74  |concurrent funct|
521s         00001130  69 6f 6e 20 63 61 6c 6c  73 20 63 6f 75 6c 64 20  |ion calls could |
521s         00001140  69 6e 74 65 72 61 63 74  20 70 6f 6f 72 6c 79 2e  |interact poorly.|
521s         00001150  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 4c 61 7a 79  |.    Lazy|
521s         00001160  20 62 6f 6f 6c 0a 20 20  20 20 3c 73 70 61 6e 20  | bool.    |
521s         00001180  2f 2f 20 4e 6f 43 6f 70  79 20 64 65 63 6f 64 69  |// NoCopy decodi|
521s         00001190  6e 67 20 64 6f 65 73 6e  26 23 33 39 3b 74 20 63  |ng doesn't c|
521s         000011a0  6f 70 79 20 69 74 73 20  69 6e 70 75 74 20 62 75  |opy its input bu|
521s         000011b0  66 66 65 72 20 69 6e 74  6f 20 73 74 6f 72 61 67  |ffer into storag|
521s         000011c0  65 20 74 68 61 74 26 23  33 39 3b 73 20 6f 77 6e  |e that's own|
521s         000011d0  65 64 20 62 79 3c 2f 73  70 61 6e 3e 0a 20 20 20  |ed by.   |
521s         000011e0  20 3c 73 70 61 6e 20 63  6c 61 73 73 3d 22 63 6f  | // the pa|
521s         00001200  63 6b 65 74 2e 20 20 49  66 20 79 6f 75 20 63 61  |cket.  If you ca|
521s         00001210  6e 20 67 75 61 72 61 6e  74 65 65 20 74 68 61 74  |n guarantee that|
521s         00001220  20 74 68 65 20 62 79 74  65 73 20 75 6e 64 65 72  | the bytes under|
521s         00001230  6c 79 69 6e 67 20 74 68  65 20 73 6c 69 63 65 3c  |lying the slice<|
521s         00001240  2f 73 70 61 6e 3e 0a 20  20 20 20 3c 73 70 61 6e  |/span>.    // passed into |
521s         00001270  4e 65 77 50 61 63 6b 65  74 20 61 72 65 6e 26 23  |NewPacket aren&#|
521s         00001280  33 39 3b 74 20 67 6f 69  6e 67 20 74 6f 20 62 65  |39;t going to be|
521s         00001290  20 6d 6f 64 69 66 69 65  64 2c 20 74 68 69 73 20  | modified, this |
521s         000012a0  63 61 6e 20 62 65 20 66  61 73 74 65 72 2e 20 20  |can be faster.  |
521s         000012b0  49 66 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 3c 73  |If.    // there'|
521s         000012e0  3b 73 20 61 6e 79 20 63  68 61 6e 63 65 20 74 68  |;s any chance th|
521s         000012f0  61 74 20 74 68 6f 73 65  20 62 79 74 65 73 20 57  |at those bytes W|
521s         00001300  49 4c 4c 20 62 65 20 63  68 61 6e 67 65 64 2c 20  |ILL be changed, |
521s         00001310  74 68 69 73 20 77 69 6c  6c 20 69 6e 76 61 6c 69  |this will invali|
521s         00001320  64 61 74 65 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |date.    |
521s         00001330  3c 73 70 61 6e 20 63 6c  61 73 73 3d 22 63 6f 6d  |// your pa|
521s         00001350  63 6b 65 74 73 2e 3c 2f  73 70 61 6e 3e 0a 20 20  |ckets..  |
521s         00001360  20 20 4e 6f 43 6f 70 79  20 62 6f 6f 6c 0a 7d 3c  |  NoCopy bool.}<|
521s         00001370  2f 70 72 65 3e 0a 09 09  09 3c 70 3e 0a 44 65 63  |/pre>....

.Dec| 521s 00001380 6f 64 65 4f 70 74 69 6f 6e 73 20 74 65 6c 6c 73 |odeOptions tells| 521s 00001390 20 67 6f 70 61 63 6b 65 74 20 68 6f 77 20 74 6f | gopacket how to| 521s 000013a0 20 64 65 63 6f 64 65 20 61 20 70 61 63 6b 65 74 | decode a packet| 521s 000013b0 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 |..

..........| 521s 000013c0 09 0a 09 09 09 09 3c 70 72 65 3e 76 61 72 20 44 |......
var D|
521s         000013d0  65 66 61 75 6c 74 20 44  65 63 6f 64 65 4f 70 74  |efault DecodeOpt|
521s         000013e0  69 6f 6e 73 20 3d 20 44  65 63 6f 64 65 4f 70 74  |ions = DecodeOpt|
521s         000013f0  69 6f 6e 73 7b 7d 3c 2f  70 72 65 3e 0a 09 09 09  |ions{}
....| 521s 00001400 09 3c 70 3e 0a 44 65 66 61 75 6c 74 20 64 65 63 |.

.Default dec| 521s 00001410 6f 64 69 6e 67 20 70 72 6f 76 69 64 65 73 20 74 |oding provides t| 521s 00001420 68 65 20 73 61 66 65 73 74 20 28 62 75 74 20 73 |he safest (but s| 521s 00001430 6c 6f 77 65 73 74 29 20 6d 65 74 68 6f 64 20 66 |lowest) method f| 521s 00001440 6f 72 20 64 65 63 6f 64 69 6e 67 0a 70 61 63 6b |or decoding.pack| 521s 00001450 65 74 73 2e 20 20 49 74 20 65 61 67 65 72 6c 79 |ets. It eagerly| 521s 00001460 20 70 72 6f 63 65 73 73 65 73 20 61 6c 6c 20 6c | processes all l| 521s 00001470 61 79 65 72 73 20 28 73 6f 20 69 74 26 23 33 39 |ayers (so it'| 521s 00001480 3b 73 20 63 6f 6e 63 75 72 72 65 6e 63 79 2d 73 |;s concurrency-s| 521s 00001490 61 66 65 29 20 61 6e 64 20 69 74 0a 63 6f 70 69 |afe) and it.copi| 521s 000014a0 65 73 20 69 74 73 20 69 6e 70 75 74 20 62 75 66 |es its input buf| 521s 000014b0 66 65 72 20 75 70 6f 6e 20 63 72 65 61 74 69 6f |fer upon creatio| 521s 000014c0 6e 20 6f 66 20 74 68 65 20 70 61 63 6b 65 74 20 |n of the packet | 521s 000014d0 28 73 6f 20 74 68 65 20 70 61 63 6b 65 74 20 72 |(so the packet r| 521s 000014e0 65 6d 61 69 6e 73 0a 76 61 6c 69 64 20 69 66 20 |emains.valid if | 521s 000014f0 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 73 |the underlying s| 521s 00001500 6c 69 63 65 20 69 73 20 6d 6f 64 69 66 69 65 64 |lice is modified| 521s 00001510 2e 20 20 42 6f 74 68 20 6f 66 20 74 68 65 73 65 |. Both of these| 521s 00001520 20 74 61 6b 65 20 74 69 6d 65 2c 0a 74 68 6f 75 | take time,.thou| 521s 00001530 67 68 2c 20 73 6f 20 62 65 77 61 72 65 2e 20 20 |gh, so beware. | 521s 00001540 49 66 20 79 6f 75 20 63 61 6e 20 67 75 61 72 61 |If you can guara| 521s 00001550 6e 74 65 65 20 74 68 61 74 20 74 68 65 20 70 61 |ntee that the pa| 521s 00001560 63 6b 65 74 20 77 69 6c 6c 20 6f 6e 6c 79 20 62 |cket will only b| 521s 00001570 65 20 75 73 65 64 0a 62 79 20 6f 6e 65 20 67 6f |e used.by one go| 521s 00001580 72 6f 75 74 69 6e 65 20 61 74 20 61 20 74 69 6d |routine at a tim| 521s 00001590 65 2c 20 73 65 74 20 4c 61 7a 79 20 64 65 63 6f |e, set Lazy deco| 521s 000015a0 64 69 6e 67 2e 20 20 49 66 20 79 6f 75 20 63 61 |ding. If you ca| 521s 000015b0 6e 20 67 75 61 72 61 6e 74 65 65 20 74 68 61 74 |n guarantee that| 521s 000015c0 0a 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 |.the underlying | 521s 000015d0 73 6c 69 63 65 20 77 6f 6e 26 23 33 39 3b 74 20 |slice won't | 521s 000015e0 63 68 61 6e 67 65 2c 20 73 65 74 20 4e 6f 43 6f |change, set NoCo| 521s 000015f0 70 79 20 64 65 63 6f 64 69 6e 67 2e 0a 3c 2f 70 |py decoding............

|
521s         00001610  76 61 72 20 4c 61 7a 79  20 44 65 63 6f 64 65 4f  |var Lazy DecodeO|
521s         00001620  70 74 69 6f 6e 73 20 3d  20 44 65 63 6f 64 65 4f  |ptions = DecodeO|
521s         00001630  70 74 69 6f 6e 73 7b 4c  61 7a 79 3a 20 74 72 75  |ptions{Lazy: tru|
521s         00001640  65 7d 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |e}
.....

| 521s 00001650 0a 4c 61 7a 79 20 69 73 20 61 20 44 65 63 6f 64 |.Lazy is a Decod| 521s 00001660 65 4f 70 74 69 6f 6e 73 20 77 69 74 68 20 6a 75 |eOptions with ju| 521s 00001670 73 74 20 4c 61 7a 79 20 73 65 74 2e 0a 3c 2f 70 |st Lazy set............

|
521s         00001690  76 61 72 20 4e 6f 43 6f  70 79 20 44 65 63 6f 64  |var NoCopy Decod|
521s         000016a0  65 4f 70 74 69 6f 6e 73  20 3d 20 44 65 63 6f 64  |eOptions = Decod|
521s         000016b0  65 4f 70 74 69 6f 6e 73  7b 4e 6f 43 6f 70 79 3a  |eOptions{NoCopy:|
521s         000016c0  20 74 72 75 65 7d 3c 2f  70 72 65 3e 0a 09 09 09  | true}
....| 521s 000016d0 09 3c 70 3e 0a 4e 6f 43 6f 70 79 20 69 73 20 61 |.

.NoCopy is a| 521s 000016e0 20 44 65 63 6f 64 65 4f 70 74 69 6f 6e 73 20 77 | DecodeOptions w| 521s 000016f0 69 74 68 20 6a 75 73 74 20 4e 6f 43 6f 70 79 20 |ith just NoCopy | 521s 00001700 73 65 74 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 0a 0a |set..

.......| 521s 00001710 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 |................| 521s 00001720 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 |............

typ| 521s 00001740 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e Deco| 521s 00001790 64 65 72 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 |der

....| 521s 000017a0 3c 70 72 65 3e 74 79 70 65 20 44 65 63 6f 64 65 |
type Decode|
521s         000017b0  72 20 69 6e 74 65 72 66  61 63 65 20 7b 0a 20 20  |r interface {.  |
521s         000017c0  20 20 3c 73 70 61 6e 20  63 6c 61 73 73 3d 22 63  |  // Decod|
521s         000017e0  65 20 64 65 63 6f 64 65  73 20 74 68 65 20 62 79  |e decodes the by|
521s         000017f0  74 65 73 20 6f 66 20 61  20 70 61 63 6b 65 74 2c  |tes of a packet,|
521s         00001800  20 73 65 6e 64 69 6e 67  20 64 65 63 6f 64 65 64  | sending decoded|
521s         00001810  20 76 61 6c 75 65 73 20  61 6e 64 20 6f 74 68 65  | values and othe|
521s         00001820  72 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 3c 73 70  |r.    // informatio|
521s         00001850  6e 20 74 6f 20 50 61 63  6b 65 74 42 75 69 6c 64  |n to PacketBuild|
521s         00001860  65 72 2c 20 61 6e 64 20  72 65 74 75 72 6e 69 6e  |er, and returnin|
521s         00001870  67 20 61 6e 20 65 72 72  6f 72 20 69 66 20 75 6e  |g an error if un|
521s         00001880  73 75 63 63 65 73 73 66  75 6c 2e 20 20 53 65 65  |successful.  See|
521s         00001890  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // the PacketB|
521s         000018c0  75 69 6c 64 65 72 20 64  6f 63 75 6d 65 6e 74 61  |uilder documenta|
521s         000018d0  74 69 6f 6e 20 66 6f 72  20 6d 6f 72 65 20 64 65  |tion for more de|
521s         000018e0  74 61 69 6c 73 2e 3c 2f  73 70 61 6e 3e 0a 20 20  |tails..  |
521s         000018f0  20 20 44 65 63 6f 64 65  28 5b 5d 62 79 74 65 2c  |  Decode([]byte,|
521s         00001900  20 50 61 63 6b 65 74 42  75 69 6c 64 65 72 29 20  | PacketBuilder) |
521s         00001910  65 72 72 6f 72 0a 7d 3c  2f 70 72 65 3e 0a 09 09  |error.}
...| 521s 00001920 09 3c 70 3e 0a 44 65 63 6f 64 65 72 20 69 73 20 |.

.Decoder is | 521s 00001930 61 6e 20 69 6e 74 65 72 66 61 63 65 20 66 6f 72 |an interface for| 521s 00001940 20 6c 6f 67 69 63 20 74 6f 20 64 65 63 6f 64 65 | logic to decode| 521s 00001950 20 61 20 70 61 63 6b 65 74 20 6c 61 79 65 72 2e | a packet layer.| 521s 00001960 20 20 55 73 65 72 73 20 6d 61 79 0a 69 6d 70 6c | Users may.impl| 521s 00001970 65 6d 65 6e 74 20 61 20 44 65 63 6f 64 65 72 20 |ement a Decoder | 521s 00001980 74 6f 20 68 61 6e 64 6c 65 20 74 68 65 69 72 20 |to handle their | 521s 00001990 6f 77 6e 20 73 74 72 61 6e 67 65 20 70 61 63 6b |own strange pack| 521s 000019a0 65 74 20 74 79 70 65 73 2c 20 6f 72 20 6d 61 79 |et types, or may| 521s 000019b0 20 75 73 65 20 6f 6e 65 0a 6f 66 20 74 68 65 20 | use one.of the | 521s 000019c0 6d 61 6e 79 20 64 65 63 6f 64 65 72 73 20 61 76 |many decoders av| 521s 000019d0 61 69 6c 61 62 6c 65 20 69 6e 20 74 68 65 20 26 |ailable in the &| 521s 000019e0 23 33 39 3b 6c 61 79 65 72 73 26 23 33 39 3b 20 |#39;layers' | 521s 000019f0 73 75 62 70 61 63 6b 61 67 65 20 74 6f 20 64 65 |subpackage to de| 521s 00001a00 63 6f 64 65 20 74 68 69 6e 67 73 0a 66 6f 72 20 |code things.for | 521s 00001a10 74 68 65 6d 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 |them..

......| 521s 00001a20 0a 0a 09 09 09 0a 09 09 09 09 3c 70 72 65 3e 76 |..........
v|
521s         00001a30  61 72 20 44 65 63 6f 64  65 50 61 79 6c 6f 61 64  |ar DecodePayload|
521s         00001a40  20 44 65 63 6f 64 65 72  20 3d 20 44 65 63 6f 64  | Decoder = Decod|
521s         00001a50  65 46 75 6e 63 28 64 65  63 6f 64 65 50 61 79 6c  |eFunc(decodePayl|
521s         00001a60  6f 61 64 29 3c 2f 70 72  65 3e 0a 09 09 09 09 3c  |oad)
.....<| 521s 00001a70 70 3e 0a 44 65 63 6f 64 65 50 61 79 6c 6f 61 64 |p>.DecodePayload| 521s 00001a80 20 69 73 20 61 20 44 65 63 6f 64 65 72 20 74 68 | is a Decoder th| 521s 00001a90 61 74 20 72 65 74 75 72 6e 73 20 61 20 50 61 79 |at returns a Pay| 521s 00001aa0 6c 6f 61 64 20 6c 61 79 65 72 20 63 6f 6e 74 61 |load layer conta| 521s 00001ab0 69 6e 69 6e 67 20 61 6c 6c 0a 72 65 6d 61 69 6e |ining all.remain| 521s 00001ac0 69 6e 67 20 62 79 74 65 73 2e 0a 3c 2f 70 3e 0a |ing bytes..

.| 521s 00001ad0 0a 09 09 09 0a 09 09 09 09 3c 70 72 65 3e 76 61 |.........
va|
521s         00001ae0  72 20 44 65 63 6f 64 65  55 6e 6b 6e 6f 77 6e 20  |r DecodeUnknown |
521s         00001af0  44 65 63 6f 64 65 72 20  3d 20 44 65 63 6f 64 65  |Decoder = Decode|
521s         00001b00  46 75 6e 63 28 64 65 63  6f 64 65 55 6e 6b 6e 6f  |Func(decodeUnkno|
521s         00001b10  77 6e 29 3c 2f 70 72 65  3e 0a 09 09 09 09 3c 70  |wn)
......DecodeUnknown | 521s 00001b30 69 73 20 61 20 44 65 63 6f 64 65 72 20 74 68 61 |is a Decoder tha| 521s 00001b40 74 20 72 65 74 75 72 6e 73 20 61 20 44 65 63 6f |t returns a Deco| 521s 00001b50 64 65 46 61 69 6c 75 72 65 20 6c 61 79 65 72 20 |deFailure layer | 521s 00001b60 63 6f 6e 74 61 69 6e 69 6e 67 20 61 6c 6c 0a 72 |containing all.r| 521s 00001b70 65 6d 61 69 6e 69 6e 67 20 62 79 74 65 73 2c 20 |emaining bytes, | 521s 00001b80 75 73 65 66 75 6c 20 69 66 20 79 6f 75 20 72 75 |useful if you ru| 521s 00001b90 6e 20 75 70 20 61 67 61 69 6e 73 74 20 61 20 6c |n up against a l| 521s 00001ba0 61 79 65 72 20 74 68 61 74 20 79 6f 75 26 23 33 |ayer that you| 521s 00001bb0 39 3b 72 65 20 75 6e 61 62 6c 65 20 74 6f 0a 64 |9;re unable to.d| 521s 00001bc0 65 63 6f 64 65 20 79 65 74 2e 0a 3c 2f 70 3e 0a |ecode yet..

.| 521s 00001bd0 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a |................| 521s 00001be0 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 |................| 521s 00001bf0 09 09 3c 68 32 20 69 64 3d 22 45 6e 64 70 6f 69 |..

type E| 521s 00001c50 6e 64 70 6f 69 6e 74 3c 2f 61 3e 3c 2f 68 32 3e |ndpoint

| 521s 00001c60 0a 09 09 09 3c 70 72 65 3e 74 79 70 65 20 45 6e |....
type En|
521s         00001c70  64 70 6f 69 6e 74 20 73  74 72 75 63 74 20 7b 0a  |dpoint struct {.|
521s         00001c80  20 20 20 20 3c 73 70 61  6e 20 63 6c 61 73 73 3d  |    // con|
521s         00001ca0  74 61 69 6e 73 20 66 69  6c 74 65 72 65 64 20 6f  |tains filtered o|
521s         00001cb0  72 20 75 6e 65 78 70 6f  72 74 65 64 20 66 69 65  |r unexported fie|
521s         00001cc0  6c 64 73 3c 2f 73 70 61  6e 3e 0a 7d 3c 2f 70 72  |lds.}....

.Endpoi| 521s 00001ce0 6e 74 20 69 73 20 74 68 65 20 73 65 74 20 6f 66 |nt is the set of| 521s 00001cf0 20 62 79 74 65 73 20 75 73 65 64 20 74 6f 20 61 | bytes used to a| 521s 00001d00 64 64 72 65 73 73 20 70 61 63 6b 65 74 73 20 61 |ddress packets a| 521s 00001d10 74 20 76 61 72 69 6f 75 73 20 6c 61 79 65 72 73 |t various layers| 521s 00001d20 2e 0a 53 65 65 20 4c 69 6e 6b 4c 61 79 65 72 2c |..See LinkLayer,| 521s 00001d30 20 4e 65 74 77 6f 72 6b 4c 61 79 65 72 2c 20 61 | NetworkLayer, a| 521s 00001d40 6e 64 20 54 72 61 6e 73 70 6f 72 74 4c 61 79 65 |nd TransportLaye| 521s 00001d50 72 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 73 |r specifications| 521s 00001d60 2e 0a 45 6e 64 70 6f 69 6e 74 73 20 61 72 65 20 |..Endpoints are | 521s 00001d70 75 73 61 62 6c 65 20 61 73 20 6d 61 70 20 6b 65 |usable as map ke| 521s 00001d80 79 73 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a |ys..

........| 521s 00001d90 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 |................| 521s 00001da0 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 4e |.......

func| 521s 00001dc0 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 | NewEnd| 521s 00001e10 70 6f 69 6e 74 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 |point

..| 521s 00001e20 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 4e 65 77 |...
func New|
521s         00001e30  45 6e 64 70 6f 69 6e 74  28 74 79 70 20 45 6e 64  |Endpoint(typ End|
521s         00001e40  70 6f 69 6e 74 54 79 70  65 2c 20 72 61 77 20 5b  |pointType, raw [|
521s         00001e50  5d 62 79 74 65 29 20 45  6e 64 70 6f 69 6e 74 3c  |]byte) Endpoint<|
521s         00001e60  2f 70 72 65 3e 0a 09 09  09 09 3c 70 3e 0a 4e 65  |/pre>.....

.Ne| 521s 00001e70 77 45 6e 64 70 6f 69 6e 74 20 63 72 65 61 74 65 |wEndpoint create| 521s 00001e80 73 20 61 20 6e 65 77 20 45 6e 64 70 6f 69 6e 74 |s a new Endpoint| 521s 00001e90 20 6f 62 6a 65 63 74 2e 0a 3c 2f 70 3e 0a 0a 09 | object..

...| 521s 00001ea0 09 09 09 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 |................| 521s 00001eb0 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 45 6e |......

func (Endpo| 521s 00001ee0 69 6e 74 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 |int) Endp| 521s 00001f30 6f 69 6e 74 54 79 70 65 3c 2f 61 3e 3c 2f 68 33 |ointType.....
func |
521s         00001f50  28 65 20 45 6e 64 70 6f  69 6e 74 29 20 45 6e 64  |(e Endpoint) End|
521s         00001f60  70 6f 69 6e 74 54 79 70  65 28 29 20 45 6e 64 70  |pointType() Endp|
521s         00001f70  6f 69 6e 74 54 79 70 65  3c 2f 70 72 65 3e 0a 09  |ointType
..| 521s 00001f80 09 09 09 3c 70 3e 0a 45 6e 64 70 6f 69 6e 74 54 |...

.EndpointT| 521s 00001f90 79 70 65 20 72 65 74 75 72 6e 73 20 74 68 65 20 |ype returns the | 521s 00001fa0 65 6e 64 70 6f 69 6e 74 20 74 79 70 65 20 61 73 |endpoint type as| 521s 00001fb0 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 |sociated with th| 521s 00001fc0 69 73 20 65 6e 64 70 6f 69 6e 74 2e 0a 3c 2f 70 |is endpoint.................| 521s 00001fe0 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

func (Endpo| 521s 00002010 69 6e 74 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 |int) Le| 521s 00002060 73 73 54 68 61 6e 3c 2f 61 3e 3c 2f 68 33 3e 0a |ssThan

.| 521s 00002070 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 61 |....
func (a|
521s         00002080  20 45 6e 64 70 6f 69 6e  74 29 20 4c 65 73 73 54  | Endpoint) LessT|
521s         00002090  68 61 6e 28 62 20 45 6e  64 70 6f 69 6e 74 29 20  |han(b Endpoint) |
521s         000020a0  62 6f 6f 6c 3c 2f 70 72  65 3e 0a 09 09 09 09 3c  |bool
.....<| 521s 000020b0 70 3e 0a 4c 65 73 73 54 68 61 6e 20 70 72 6f 76 |p>.LessThan prov| 521s 000020c0 69 64 65 73 20 61 20 73 74 61 62 6c 65 20 6f 72 |ides a stable or| 521s 000020d0 64 65 72 69 6e 67 20 66 6f 72 20 61 6c 6c 20 65 |dering for all e| 521s 000020e0 6e 64 70 6f 69 6e 74 73 2e 20 20 49 74 20 73 6f |ndpoints. It so| 521s 000020f0 72 74 73 20 66 69 72 73 74 20 62 61 73 65 64 0a |rts first based.| 521s 00002100 6f 6e 20 74 68 65 20 45 6e 64 70 6f 69 6e 74 54 |on the EndpointT| 521s 00002110 79 70 65 20 6f 66 20 61 6e 20 65 6e 64 70 6f 69 |ype of an endpoi| 521s 00002120 6e 74 2c 20 74 68 65 6e 20 62 61 73 65 64 20 6f |nt, then based o| 521s 00002130 6e 20 74 68 65 20 72 61 77 20 62 79 74 65 73 20 |n the raw bytes | 521s 00002140 6f 66 20 74 68 61 74 20 65 6e 64 70 6f 69 6e 74 |of that endpoint| 521s 00002150 2e 0a 46 6f 72 20 73 6f 6d 65 20 65 6e 64 70 6f |..For some endpo| 521s 00002160 69 6e 74 73 2c 20 74 68 65 20 61 63 74 75 61 6c |ints, the actual| 521s 00002170 20 63 6f 6d 70 61 72 69 73 6f 6e 20 6d 61 79 20 | comparison may | 521s 00002180 6e 6f 74 20 6d 61 6b 65 20 73 65 6e 73 65 2c 20 |not make sense, | 521s 00002190 68 6f 77 65 76 65 72 20 74 68 69 73 0a 6f 72 64 |however this.ord| 521s 000021a0 65 72 69 6e 67 20 64 6f 65 73 20 70 72 6f 76 69 |ering does provi| 521s 000021b0 64 65 20 75 73 65 66 75 6c 20 69 6e 66 6f 72 6d |de useful inform| 521s 000021c0 61 74 69 6f 6e 20 66 6f 72 20 6d 6f 73 74 20 45 |ation for most E| 521s 000021d0 6e 64 70 6f 69 6e 74 20 74 79 70 65 73 2e 0a 3c |ndpoint types..<| 521s 000021e0 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 09 0a 09 |/p>.............| 521s 000021f0 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 |............

func (Endpoint| 521s 00002220 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |) Raw| 521s 00002270 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 |

.....
f|
521s         00002280  75 6e 63 20 28 65 20 45  6e 64 70 6f 69 6e 74 29  |unc (e Endpoint)|
521s         00002290  20 52 61 77 28 29 20 5b  5d 62 79 74 65 3c 2f 70  | Raw() []byte.....

.Raw | 521s 000022b0 72 65 74 75 72 6e 73 20 74 68 65 20 72 61 77 20 |returns the raw | 521s 000022c0 62 79 74 65 73 20 6f 66 20 74 68 69 73 20 65 6e |bytes of this en| 521s 000022d0 64 70 6f 69 6e 74 2e 20 20 54 68 65 73 65 20 61 |dpoint. These a| 521s 000022e0 72 65 6e 26 23 33 39 3b 74 20 68 75 6d 61 6e 2d |ren't human-| 521s 000022f0 72 65 61 64 61 62 6c 65 0a 6d 6f 73 74 20 6f 66 |readable.most of| 521s 00002300 20 74 68 65 20 74 69 6d 65 2c 20 62 75 74 20 74 | the time, but t| 521s 00002310 68 65 79 20 61 72 65 20 66 61 73 74 65 72 20 74 |hey are faster t| 521s 00002320 68 61 6e 20 63 61 6c 6c 69 6e 67 20 53 74 72 69 |han calling Stri| 521s 00002330 6e 67 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 |ng..

........| 521s 00002340 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002350 09 3c 68 33 20 69 64 3d 22 45 6e 64 70 6f 69 6e |.

func (| 521s 00002370 45 6e 64 70 6f 69 6e 74 29 20 3c 61 20 68 72 65 |Endpoint) String.....
func|
521s         000023e0  20 28 65 20 45 6e 64 70  6f 69 6e 74 29 20 53 74  | (e Endpoint) St|
521s         000023f0  72 69 6e 67 28 29 20 73  74 72 69 6e 67 3c 2f 70  |ring() string.............|
521s         00002410  09 09 0a 09 09 09 0a 09  09 0a 09 09 09 0a 09 09  |................|
521s         00002420  09 0a 09 09 09 3c 68 32  20 69 64 3d 22 45 6e 64  |.....

type | 521s 00002440 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |Endpoin| 521s 00002490 74 54 79 70 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 |tType

..| 521s 000024a0 09 09 3c 70 72 65 3e 74 79 70 65 20 45 6e 64 70 |..
type Endp|
521s         000024b0  6f 69 6e 74 54 79 70 65  20 69 6e 74 36 34 3c 2f  |ointType int64....

.Endp| 521s 000024d0 6f 69 6e 74 54 79 70 65 20 69 73 20 74 68 65 20 |ointType is the | 521s 000024e0 74 79 70 65 20 6f 66 20 61 20 67 6f 70 61 63 6b |type of a gopack| 521s 000024f0 65 74 20 45 6e 64 70 6f 69 6e 74 2e 20 20 54 68 |et Endpoint. Th| 521s 00002500 69 73 20 74 79 70 65 20 64 65 74 65 72 6d 69 6e |is type determin| 521s 00002510 65 73 20 68 6f 77 0a 74 68 65 20 62 79 74 65 73 |es how.the bytes| 521s 00002520 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 20 65 | stored in the e| 521s 00002530 6e 64 70 6f 69 6e 74 20 73 68 6f 75 6c 64 20 62 |ndpoint should b| 521s 00002540 65 20 69 6e 74 65 72 70 72 65 74 65 64 2e 0a 3c |e interpreted..<| 521s 00002550 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a |/p>.............| 521s 00002560 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 00002570 09 09 3c 68 33 20 69 64 3d 22 52 65 67 69 73 74 |..

| 521s 00002590 66 75 6e 63 20 3c 61 20 68 72 65 66 3d 22 2f 73 |func Re| 521s 000025e0 67 69 73 74 65 72 45 6e 64 70 6f 69 6e 74 54 79 |gisterEndpointTy| 521s 000025f0 70 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 |pe

.....| 521s 00002600 3c 70 72 65 3e 66 75 6e 63 20 52 65 67 69 73 74 |
func Regist|
521s         00002610  65 72 45 6e 64 70 6f 69  6e 74 54 79 70 65 28 6e  |erEndpointType(n|
521s         00002620  75 6d 20 69 6e 74 2c 20  6d 65 74 61 20 45 6e 64  |um int, meta End|
521s         00002630  70 6f 69 6e 74 54 79 70  65 4d 65 74 61 64 61 74  |pointTypeMetadat|
521s         00002640  61 29 20 45 6e 64 70 6f  69 6e 74 54 79 70 65 3c  |a) EndpointType<|
521s         00002650  2f 70 72 65 3e 0a 09 09  09 09 3c 70 3e 0a 52 65  |/pre>.....

.Re| 521s 00002660 67 69 73 74 65 72 45 6e 64 70 6f 69 6e 74 54 79 |gisterEndpointTy| 521s 00002670 70 65 20 63 72 65 61 74 65 73 20 61 20 6e 65 77 |pe creates a new| 521s 00002680 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 20 61 6e | EndpointType an| 521s 00002690 64 20 72 65 67 69 73 74 65 72 73 20 69 74 20 67 |d registers it g| 521s 000026a0 6c 6f 62 61 6c 6c 79 2e 0a 49 74 20 4d 55 53 54 |lobally..It MUST| 521s 000026b0 20 62 65 20 70 61 73 73 65 64 20 61 20 75 6e 69 | be passed a uni| 521s 000026c0 71 75 65 20 6e 75 6d 62 65 72 2c 20 6f 72 20 69 |que number, or i| 521s 000026d0 74 20 77 69 6c 6c 20 70 61 6e 69 63 2e 20 20 4e |t will panic. N| 521s 000026e0 75 6d 62 65 72 73 20 30 2d 39 39 39 20 61 72 65 |umbers 0-999 are| 521s 000026f0 0a 72 65 73 65 72 76 65 64 20 66 6f 72 20 67 6f |.reserved for go| 521s 00002700 70 61 63 6b 65 74 26 23 33 39 3b 73 20 75 73 65 |packet's use| 521s 00002710 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 |..

..........| 521s 00002720 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 00002730 68 33 20 69 64 3d 22 45 6e 64 70 6f 69 6e 74 54 |h3 id="EndpointT| 521s 00002740 79 70 65 2e 53 74 72 69 6e 67 22 3e 66 75 6e 63 |ype.String">func| 521s 00002750 20 28 45 6e 64 70 6f 69 6e 74 54 79 70 65 29 20 | (EndpointType) | 521s 00002760 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |String<| 521s 000027b0 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 |/a>

.....func (e Endpoi| 521s 000027d0 6e 74 54 79 70 65 29 20 53 74 72 69 6e 67 28 29 |ntType) String()| 521s 000027e0 20 73 74 72 69 6e 67 3c 2f 70 72 65 3e 0a 09 09 | string
...| 521s 000027f0 09 09 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00002800 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c |...............<| 521s 00002810 68 32 20 69 64 3d 22 45 6e 64 70 6f 69 6e 74 54 |h2 id="EndpointT| 521s 00002820 79 70 65 4d 65 74 61 64 61 74 61 22 3e 74 79 70 |ypeMetadata">typ| 521s 00002830 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e Endpo| 521s 00002880 69 6e 74 54 79 70 65 4d 65 74 61 64 61 74 61 3c |intTypeMetadata<| 521s 00002890 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type EndpointTy| 521s 000028b0 70 65 4d 65 74 61 64 61 74 61 20 73 74 72 75 63 |peMetadata struc| 521s 000028c0 74 20 7b 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c |t {. //| 521s 000028e0 20 4e 61 6d 65 20 69 73 20 74 68 65 20 73 74 72 | Name is the str| 521s 000028f0 69 6e 67 20 72 65 74 75 72 6e 65 64 20 62 79 20 |ing returned by | 521s 00002900 61 6e 20 45 6e 64 70 6f 69 6e 74 54 79 70 65 26 |an EndpointType&| 521s 00002910 23 33 39 3b 73 20 53 74 72 69 6e 67 20 66 75 6e |#39;s String fun| 521s 00002920 63 74 69 6f 6e 2e 3c 2f 73 70 61 6e 3e 0a 20 20 |ction.. | 521s 00002930 20 20 4e 61 6d 65 20 73 74 72 69 6e 67 0a 20 20 | Name string. | 521s 00002940 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // Forma| 521s 00002960 74 74 65 72 20 69 73 20 63 61 6c 6c 65 64 20 66 |tter is called f| 521s 00002970 72 6f 6d 20 61 6e 20 45 6e 64 70 6f 69 6e 74 26 |rom an Endpoint&| 521s 00002980 23 33 39 3b 73 20 53 74 72 69 6e 67 20 66 75 6e |#39;s String fun| 521s 00002990 63 74 69 6f 6e 20 74 6f 20 66 6f 72 6d 61 74 20 |ction to format | 521s 000029a0 74 68 65 20 72 61 77 3c 2f 73 70 61 6e 3e 0a 20 |the raw. | 521s 000029b0 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 | // byte| 521s 000029d0 73 20 69 6e 20 61 6e 20 45 6e 64 70 6f 69 6e 74 |s in an Endpoint| 521s 000029e0 20 69 6e 74 6f 20 61 20 68 75 6d 61 6e 2d 72 65 | into a human-re| 521s 000029f0 61 64 61 62 6c 65 20 73 74 72 69 6e 67 2e 3c 2f |adable string.. Format| 521s 00002a10 74 65 72 20 66 75 6e 63 28 5b 5d 62 79 74 65 29 |ter func([]byte)| 521s 00002a20 20 73 74 72 69 6e 67 0a 7d 3c 2f 70 72 65 3e 0a | string.}
.| 521s 00002a30 09 09 09 3c 70 3e 0a 45 6e 64 70 6f 69 6e 74 54 |...

.EndpointT| 521s 00002a40 79 70 65 4d 65 74 61 64 61 74 61 20 69 73 20 75 |ypeMetadata is u| 521s 00002a50 73 65 64 20 74 6f 20 72 65 67 69 73 74 65 72 20 |sed to register | 521s 00002a60 61 20 6e 65 77 20 65 6e 64 70 6f 69 6e 74 20 74 |a new endpoint t| 521s 00002a70 79 70 65 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a |ype..

.......| 521s 00002a80 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a |................| 521s 00002a90 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 |................| 521s 00002aa0 09 09 3c 68 32 20 69 64 3d 22 45 72 72 6f 72 4c |..

type ErrorLayer

....
t|
521s         00002b20  79 70 65 20 45 72 72 6f  72 4c 61 79 65 72 20 69  |ype ErrorLayer i|
521s         00002b30  6e 74 65 72 66 61 63 65  20 7b 0a 20 20 20 20 4c  |nterface {.    L|
521s         00002b40  61 79 65 72 0a 20 20 20  20 45 72 72 6f 72 28 29  |ayer.    Error()|
521s         00002b50  20 65 72 72 6f 72 0a 7d  3c 2f 70 72 65 3e 0a 09  | error.}
..| 521s 00002b60 09 09 3c 70 3e 0a 45 72 72 6f 72 4c 61 79 65 72 |..

.ErrorLayer| 521s 00002b70 20 69 73 20 61 20 70 61 63 6b 65 74 20 6c 61 79 | is a packet lay| 521s 00002b80 65 72 20 63 72 65 61 74 65 64 20 77 68 65 6e 20 |er created when | 521s 00002b90 64 65 63 6f 64 69 6e 67 20 6f 66 20 74 68 65 20 |decoding of the | 521s 00002ba0 70 61 63 6b 65 74 20 68 61 73 20 66 61 69 6c 65 |packet has faile| 521s 00002bb0 64 2e 0a 49 74 73 20 70 61 79 6c 6f 61 64 20 69 |d..Its payload i| 521s 00002bc0 73 20 61 6c 6c 20 74 68 65 20 62 79 74 65 73 20 |s all the bytes | 521s 00002bd0 74 68 61 74 20 77 65 20 77 65 72 65 20 75 6e 61 |that we were una| 521s 00002be0 62 6c 65 20 74 6f 20 64 65 63 6f 64 65 2c 20 61 |ble to decode, a| 521s 00002bf0 6e 64 20 74 68 65 20 72 65 74 75 72 6e 65 64 0a |nd the returned.| 521s 00002c00 65 72 72 6f 72 20 64 65 74 61 69 6c 73 20 77 68 |error details wh| 521s 00002c10 79 20 74 68 65 20 64 65 63 6f 64 69 6e 67 20 66 |y the decoding f| 521s 00002c20 61 69 6c 65 64 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 |ailed..

.....| 521s 00002c30 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 |................| 521s 00002c40 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00002c50 0a 09 09 09 3c 68 32 20 69 64 3d 22 46 6c 6f 77 |....

type | 521s 00002cb0 46 6c 6f 77 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 |Flow

...| 521s 00002cc0 09 3c 70 72 65 3e 74 79 70 65 20 46 6c 6f 77 20 |.
type Flow |
521s         00002cd0  73 74 72 75 63 74 20 7b  0a 20 20 20 20 3c 73 70  |struct {.    // contains f|
521s         00002d00  69 6c 74 65 72 65 64 20  6f 72 20 75 6e 65 78 70  |iltered or unexp|
521s         00002d10  6f 72 74 65 64 20 66 69  65 6c 64 73 3c 2f 73 70  |orted fields.}
....<| 521s 00002d30 70 3e 0a 46 6c 6f 77 20 72 65 70 72 65 73 65 6e |p>.Flow represen| 521s 00002d40 74 73 20 74 68 65 20 64 69 72 65 63 74 69 6f 6e |ts the direction| 521s 00002d50 20 6f 66 20 74 72 61 66 66 69 63 20 66 6f 72 20 | of traffic for | 521s 00002d60 61 20 70 61 63 6b 65 74 20 6c 61 79 65 72 2c 20 |a packet layer, | 521s 00002d70 61 73 20 61 20 73 6f 75 72 63 65 20 61 6e 64 20 |as a source and | 521s 00002d80 64 65 73 74 69 6e 61 74 69 6f 6e 20 45 6e 64 70 |destination Endp| 521s 00002d90 6f 69 6e 74 2e 0a 46 6c 6f 77 73 20 61 72 65 20 |oint..Flows are | 521s 00002da0 75 73 61 62 6c 65 20 61 73 20 6d 61 70 20 6b 65 |usable as map ke| 521s 00002db0 79 73 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a |ys..

........| 521s 00002dc0 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 |................| 521s 00002dd0 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 46 |.......

func | 521s 00002e40 46 6c 6f 77 46 72 6f 6d 45 6e 64 70 6f 69 6e 74 |FlowFromEndpoint| 521s 00002e50 73 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c |s

.....<| 521s 00002e60 70 72 65 3e 66 75 6e 63 20 46 6c 6f 77 46 72 6f |pre>func FlowFro| 521s 00002e70 6d 45 6e 64 70 6f 69 6e 74 73 28 73 72 63 2c 20 |mEndpoints(src, | 521s 00002e80 64 73 74 20 45 6e 64 70 6f 69 6e 74 29 20 28 5f |dst Endpoint) (_| 521s 00002e90 20 46 6c 6f 77 2c 20 65 72 72 20 65 72 72 6f 72 | Flow, err error| 521s 00002ea0 29 3c 2f 70 72 65 3e 0a 09 09 09 09 3c 70 3e 0a |)
.....

.| 521s 00002eb0 46 6c 6f 77 46 72 6f 6d 45 6e 64 70 6f 69 6e 74 |FlowFromEndpoint| 521s 00002ec0 73 20 63 72 65 61 74 65 73 20 61 20 6e 65 77 20 |s creates a new | 521s 00002ed0 66 6c 6f 77 20 62 79 20 70 61 73 74 69 6e 67 20 |flow by pasting | 521s 00002ee0 74 6f 67 65 74 68 65 72 20 74 77 6f 20 65 6e 64 |together two end| 521s 00002ef0 70 6f 69 6e 74 73 2e 0a 54 68 65 20 65 6e 64 70 |points..The endp| 521s 00002f00 6f 69 6e 74 73 20 6d 75 73 74 20 68 61 76 65 20 |oints must have | 521s 00002f10 74 68 65 20 73 61 6d 65 20 45 6e 64 70 6f 69 6e |the same Endpoin| 521s 00002f20 74 54 79 70 65 2c 20 6f 72 20 74 68 69 73 20 66 |tType, or this f| 521s 00002f30 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 72 65 74 |unction will ret| 521s 00002f40 75 72 6e 0a 61 6e 20 65 72 72 6f 72 2e 0a 3c 2f |urn.an error................| 521s 00002f60 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 4e 65 |......

func NewFlow

.....
|
521s         00002fe0  66 75 6e 63 20 4e 65 77  46 6c 6f 77 28 74 20 45  |func NewFlow(t E|
521s         00002ff0  6e 64 70 6f 69 6e 74 54  79 70 65 2c 20 73 72 63  |ndpointType, src|
521s         00003000  2c 20 64 73 74 20 5b 5d  62 79 74 65 29 20 46 6c  |, dst []byte) Fl|
521s         00003010  6f 77 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |ow
.....

| 521s 00003020 0a 4e 65 77 46 6c 6f 77 20 63 72 65 61 74 65 73 |.NewFlow creates| 521s 00003030 20 61 20 6e 65 77 20 66 6c 6f 77 2e 0a 3c 2f 70 | a new flow.................| 521s 00003050 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

func| 521s 00003070 20 28 46 6c 6f 77 29 20 3c 61 20 68 72 65 66 3d | (Flow) Dst

..| 521s 000030d0 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 66 20 |...
func (f |
521s         000030e0  46 6c 6f 77 29 20 44 73  74 28 29 20 28 64 73 74  |Flow) Dst() (dst|
521s         000030f0  20 45 6e 64 70 6f 69 6e  74 29 3c 2f 70 72 65 3e  | Endpoint)
| 521s 00003100 0a 09 09 09 09 3c 70 3e 0a 44 73 74 20 72 65 74 |.....

.Dst ret| 521s 00003110 75 72 6e 73 20 74 68 65 20 64 65 73 74 69 6e 61 |urns the destina| 521s 00003120 74 69 6f 6e 20 45 6e 64 70 6f 69 6e 74 20 66 6f |tion Endpoint fo| 521s 00003130 72 20 74 68 69 73 20 66 6c 6f 77 2e 0a 3c 2f 70 |r this flow.................| 521s 00003150 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

func (Flow)| 521s 00003180 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 | Endpoi| 521s 000031d0 6e 74 54 79 70 65 3c 2f 61 3e 3c 2f 68 33 3e 0a |ntType

.| 521s 000031e0 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 66 |....
func (f|
521s         000031f0  20 46 6c 6f 77 29 20 45  6e 64 70 6f 69 6e 74 54  | Flow) EndpointT|
521s         00003200  79 70 65 28 29 20 45 6e  64 70 6f 69 6e 74 54 79  |ype() EndpointTy|
521s         00003210  70 65 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |pe
.....

| 521s 00003220 0a 45 6e 64 70 6f 69 6e 74 54 79 70 65 20 72 65 |.EndpointType re| 521s 00003230 74 75 72 6e 73 20 74 68 65 20 45 6e 64 70 6f 69 |turns the Endpoi| 521s 00003240 6e 74 54 79 70 65 20 66 6f 72 20 74 68 69 73 20 |ntType for this | 521s 00003250 46 6c 6f 77 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 |Flow..

......| 521s 00003260 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00003270 09 09 09 3c 68 33 20 69 64 3d 22 46 6c 6f 77 2e |...

func | 521s 00003290 28 46 6c 6f 77 29 20 3c 61 20 68 72 65 66 3d 22 |(Flow) Endpoints.....
fun|
521s         00003300  63 20 28 66 20 46 6c 6f  77 29 20 45 6e 64 70 6f  |c (f Flow) Endpo|
521s         00003310  69 6e 74 73 28 29 20 28  73 72 63 2c 20 64 73 74  |ints() (src, dst|
521s         00003320  20 45 6e 64 70 6f 69 6e  74 29 3c 2f 70 72 65 3e  | Endpoint)
| 521s 00003330 0a 09 09 09 09 3c 70 3e 0a 45 6e 64 70 6f 69 6e |.....

.Endpoin| 521s 00003340 74 73 20 72 65 74 75 72 6e 73 20 74 68 65 20 74 |ts returns the t| 521s 00003350 77 6f 20 45 6e 64 70 6f 69 6e 74 73 20 66 6f 72 |wo Endpoints for| 521s 00003360 20 74 68 69 73 20 66 6c 6f 77 2e 0a 3c 2f 70 3e | this flow..

| 521s 00003370 0a 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a |................| 521s 00003380 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d |.........

f| 521s 000033a0 75 6e 63 20 28 46 6c 6f 77 29 20 3c 61 20 68 72 |unc (Flow) Reverse| 521s 00003400 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 |

.....
f|
521s         00003410  75 6e 63 20 28 66 20 46  6c 6f 77 29 20 52 65 76  |unc (f Flow) Rev|
521s         00003420  65 72 73 65 28 29 20 46  6c 6f 77 3c 2f 70 72 65  |erse() Flow.....

.Revers| 521s 00003440 65 20 72 65 74 75 72 6e 73 20 61 20 6e 65 77 20 |e returns a new | 521s 00003450 66 6c 6f 77 20 77 69 74 68 20 65 6e 64 70 6f 69 |flow with endpoi| 521s 00003460 6e 74 73 20 72 65 76 65 72 73 65 64 2e 0a 3c 2f |nts reversed................| 521s 00003480 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 |...........

fun| 521s 000034a0 63 20 28 46 6c 6f 77 29 20 3c 61 20 68 72 65 66 |c (Flow) Src

.| 521s 00003500 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 66 |....
func (f|
521s         00003510  20 46 6c 6f 77 29 20 53  72 63 28 29 20 28 73 72  | Flow) Src() (sr|
521s         00003520  63 20 45 6e 64 70 6f 69  6e 74 29 3c 2f 70 72 65  |c Endpoint).....

.Src re| 521s 00003540 74 75 72 6e 73 20 74 68 65 20 73 6f 75 72 63 65 |turns the source| 521s 00003550 20 45 6e 64 70 6f 69 6e 74 20 66 6f 72 20 74 68 | Endpoint for th| 521s 00003560 69 73 20 66 6c 6f 77 2e 0a 3c 2f 70 3e 0a 0a 09 |is flow..

...| 521s 00003570 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00003580 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 46 6c |......

func | 521s 000035a0 28 46 6c 6f 77 29 20 3c 61 20 68 72 65 66 3d 22 |(Flow) | 521s 000035f0 53 74 72 69 6e 67 3c 2f 61 3e 3c 2f 68 33 3e 0a |String

.| 521s 00003600 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 66 |....
func (f|
521s         00003610  20 46 6c 6f 77 29 20 53  74 72 69 6e 67 28 29 20  | Flow) String() |
521s         00003620  73 74 72 69 6e 67 3c 2f  70 72 65 3e 0a 09 09 09  |string
....| 521s 00003630 09 3c 70 3e 0a 53 74 72 69 6e 67 20 72 65 74 75 |.

.String retu| 521s 00003640 72 6e 73 20 61 20 68 75 6d 61 6e 2d 72 65 61 64 |rns a human-read| 521s 00003650 61 62 6c 65 20 72 65 70 72 65 73 65 6e 74 61 74 |able representat| 521s 00003660 69 6f 6e 20 6f 66 20 74 68 69 73 20 66 6c 6f 77 |ion of this flow| 521s 00003670 2c 20 69 6e 20 74 68 65 20 66 6f 72 6d 0a 26 23 |, in the form.&#| 521s 00003680 33 34 3b 53 72 63 2d 26 67 74 3b 44 73 74 26 23 |34;Src->Dst&#| 521s 00003690 33 34 3b 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 |34;.

........| 521s 000036a0 09 09 09 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 |................| 521s 000036b0 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 4c 61 |......

type L| 521s 00003710 61 79 65 72 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 |ayer

...| 521s 00003720 09 3c 70 72 65 3e 74 79 70 65 20 4c 61 79 65 72 |.
type Layer|
521s         00003730  20 69 6e 74 65 72 66 61  63 65 20 7b 0a 20 20 20  | interface {.   |
521s         00003740  20 66 6d 74 2e 53 74 72  69 6e 67 65 72 0a 20 20  | fmt.Stringer.  |
521s         00003750  20 20 3c 73 70 61 6e 20  63 6c 61 73 73 3d 22 63  |  // Layer|
521s         00003770  54 79 70 65 20 69 73 20  74 68 65 20 67 6f 70 61  |Type is the gopa|
521s         00003780  63 6b 65 74 20 74 79 70  65 20 66 6f 72 20 74 68  |cket type for th|
521s         00003790  69 73 20 6c 61 79 65 72  2e 3c 2f 73 70 61 6e 3e  |is layer.|
521s         000037a0  0a 20 20 20 20 4c 61 79  65 72 54 79 70 65 28 29  |.    LayerType()|
521s         000037b0  20 4c 61 79 65 72 54 79  70 65 0a 20 20 20 20 3c  | LayerType.    <|
521s         000037c0  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         000037d0  65 6e 74 22 3e 2f 2f 20  4c 61 79 65 72 43 6f 6e  |ent">// LayerCon|
521s         000037e0  74 65 6e 74 73 20 72 65  74 75 72 6e 73 20 74 68  |tents returns th|
521s         000037f0  65 20 73 65 74 20 6f 66  20 62 79 74 65 73 20 74  |e set of bytes t|
521s         00003800  68 61 74 20 6d 61 6b 65  20 75 70 20 74 68 69 73  |hat make up this|
521s         00003810  20 6c 61 79 65 72 2e 3c  2f 73 70 61 6e 3e 0a 20  | layer.. |
521s         00003820  20 20 20 4c 61 79 65 72  43 6f 6e 74 65 6e 74 73  |   LayerContents|
521s         00003830  28 29 20 5b 5d 62 79 74  65 0a 20 20 20 20 3c 73  |() []byte.    // LayerPayl|
521s         00003860  6f 61 64 20 72 65 74 75  72 6e 73 20 74 68 65 20  |oad returns the |
521s         00003870  73 65 74 20 6f 66 20 62  79 74 65 73 20 63 6f 6e  |set of bytes con|
521s         00003880  74 61 69 6e 65 64 20 77  69 74 68 69 6e 20 74 68  |tained within th|
521s         00003890  69 73 20 6c 61 79 65 72  2c 20 6e 6f 74 3c 2f 73  |is layer, not.    /|
521s         000038c0  2f 20 69 6e 63 6c 75 64  69 6e 67 20 74 68 65 20  |/ including the |
521s         000038d0  6c 61 79 65 72 20 69 74  73 65 6c 66 2e 3c 2f 73  |layer itself..    LayerPa|
521s         000038f0  79 6c 6f 61 64 28 29 20  5b 5d 62 79 74 65 0a 7d  |yload() []byte.}|
521s         00003900  3c 2f 70 72 65 3e 0a 09  09 09 3c 70 3e 0a 4c 61  |
....

.La| 521s 00003910 79 65 72 20 72 65 70 72 65 73 65 6e 74 73 20 61 |yer represents a| 521s 00003920 20 73 69 6e 67 6c 65 20 64 65 63 6f 64 65 64 20 | single decoded | 521s 00003930 70 61 63 6b 65 74 20 6c 61 79 65 72 20 28 75 73 |packet layer (us| 521s 00003940 69 6e 67 20 65 69 74 68 65 72 20 74 68 65 0a 4f |ing either the.O| 521s 00003950 53 49 20 6f 72 20 54 43 50 2f 49 50 20 64 65 66 |SI or TCP/IP def| 521s 00003960 69 6e 69 74 69 6f 6e 20 6f 66 20 61 20 6c 61 79 |inition of a lay| 521s 00003970 65 72 29 2e 20 20 57 68 65 6e 20 64 65 63 6f 64 |er). When decod| 521s 00003980 69 6e 67 2c 20 61 20 70 61 63 6b 65 74 26 23 33 |ing, a packet| 521s 00003990 39 3b 73 20 64 61 74 61 20 69 73 0a 62 72 6f 6b |9;s data is.brok| 521s 000039a0 65 6e 20 75 70 20 69 6e 74 6f 20 61 20 6e 75 6d |en up into a num| 521s 000039b0 62 65 72 20 6f 66 20 6c 61 79 65 72 73 2e 20 20 |ber of layers. | 521s 000039c0 54 68 65 20 63 61 6c 6c 65 72 20 6d 61 79 20 63 |The caller may c| 521s 000039d0 61 6c 6c 20 4c 61 79 65 72 54 79 70 65 28 29 20 |all LayerType() | 521s 000039e0 74 6f 0a 66 69 67 75 72 65 20 6f 75 74 20 77 68 |to.figure out wh| 521s 000039f0 69 63 68 20 74 79 70 65 20 6f 66 20 6c 61 79 65 |ich type of laye| 521s 00003a00 72 20 68 65 26 23 33 39 3b 73 20 72 65 63 65 69 |r he's recei| 521s 00003a10 76 65 64 20 66 72 6f 6d 20 74 68 65 20 70 61 63 |ved from the pac| 521s 00003a20 6b 65 74 2e 20 20 4f 70 74 69 6f 6e 61 6c 6c 79 |ket. Optionally| 521s 00003a30 2c 0a 68 65 20 6d 61 79 20 74 68 65 6e 20 75 73 |,.he may then us| 521s 00003a40 65 20 61 20 74 79 70 65 20 61 73 73 65 72 74 69 |e a type asserti| 521s 00003a50 6f 6e 20 74 6f 20 67 65 74 20 74 68 65 20 61 63 |on to get the ac| 521s 00003a60 74 75 61 6c 20 6c 61 79 65 72 20 74 79 70 65 20 |tual layer type | 521s 00003a70 66 6f 72 20 64 65 65 70 0a 69 6e 73 70 65 63 74 |for deep.inspect| 521s 00003a80 69 6f 6e 20 6f 66 20 74 68 65 20 64 61 74 61 2e |ion of the data.| 521s 00003a90 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 |.

...........| 521s 00003aa0 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 00003ab0 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 |..............type LayerClass| 521s 00003b30 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 |

....
ty|
521s         00003b40  70 65 20 4c 61 79 65 72  43 6c 61 73 73 20 69 6e  |pe LayerClass in|
521s         00003b50  74 65 72 66 61 63 65 20  7b 0a 20 20 20 20 3c 73  |terface {.    // Contains |
521s         00003b80  72 65 74 75 72 6e 73 20  74 72 75 65 20 69 66 20  |returns true if |
521s         00003b90  74 68 65 20 67 69 76 65  6e 20 6c 61 79 65 72 20  |the given layer |
521s         00003ba0  74 79 70 65 20 73 68 6f  75 6c 64 20 62 65 20 63  |type should be c|
521s         00003bb0  6f 6e 73 69 64 65 72 65  64 20 70 61 72 74 3c 2f  |onsidered part.    |
521s         00003be0  2f 2f 20 6f 66 20 74 68  69 73 20 6c 61 79 65 72  |// of this layer|
521s         00003bf0  20 63 6c 61 73 73 2e 3c  2f 73 70 61 6e 3e 0a 20  | class.. |
521s         00003c00  20 20 20 43 6f 6e 74 61  69 6e 73 28 4c 61 79 65  |   Contains(Laye|
521s         00003c10  72 54 79 70 65 29 20 62  6f 6f 6c 0a 7d 3c 2f 70  |rType) bool.}....

.Layer| 521s 00003c30 43 6c 61 73 73 20 69 73 20 61 20 73 65 74 20 6f |Class is a set o| 521s 00003c40 66 20 4c 61 79 65 72 54 79 70 65 73 2c 20 75 73 |f LayerTypes, us| 521s 00003c50 65 64 20 66 6f 72 20 67 72 61 62 62 69 6e 67 20 |ed for grabbing | 521s 00003c60 6f 6e 65 20 6f 66 20 61 20 6e 75 6d 62 65 72 20 |one of a number | 521s 00003c70 6f 66 0a 64 69 66 66 65 72 65 6e 74 20 74 79 70 |of.different typ| 521s 00003c80 65 73 20 66 72 6f 6d 20 61 20 70 61 63 6b 65 74 |es from a packet| 521s 00003c90 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 |..

..........| 521s 00003ca0 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 |................| 521s 00003cb0 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 4e 65 77 |.....

func| 521s 00003cd0 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 | N| 521s 00003d20 65 77 4c 61 79 65 72 43 6c 61 73 73 3c 2f 61 3e |ewLayerClass| 521s 00003d30 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 |

.....
f|
521s         00003d40  75 6e 63 20 4e 65 77 4c  61 79 65 72 43 6c 61 73  |unc NewLayerClas|
521s         00003d50  73 28 74 79 70 65 73 20  5b 5d 4c 61 79 65 72 54  |s(types []LayerT|
521s         00003d60  79 70 65 29 20 4c 61 79  65 72 43 6c 61 73 73 3c  |ype) LayerClass<|
521s         00003d70  2f 70 72 65 3e 0a 09 09  09 09 3c 70 3e 0a 4e 65  |/pre>.....

.Ne| 521s 00003d80 77 4c 61 79 65 72 43 6c 61 73 73 20 63 72 65 61 |wLayerClass crea| 521s 00003d90 74 65 73 20 61 20 4c 61 79 65 72 43 6c 61 73 73 |tes a LayerClass| 521s 00003da0 2c 20 61 74 74 65 6d 70 74 69 6e 67 20 74 6f 20 |, attempting to | 521s 00003db0 62 65 20 73 6d 61 72 74 20 61 62 6f 75 74 20 77 |be smart about w| 521s 00003dc0 68 69 63 68 20 74 79 70 65 0a 69 74 20 63 72 65 |hich type.it cre| 521s 00003dd0 61 74 65 73 20 62 61 73 65 64 20 6f 6e 20 77 68 |ates based on wh| 521s 00003de0 69 63 68 20 74 79 70 65 73 20 61 72 65 20 70 61 |ich types are pa| 521s 00003df0 73 73 65 64 20 69 6e 2e 0a 3c 2f 70 3e 0a 0a 09 |ssed in..

...| 521s 00003e00 09 09 09 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a |................| 521s 00003e10 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 |...........

type LayerClassM| 521s 00003e90 61 70 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c |ap

....<| 521s 00003ea0 70 72 65 3e 74 79 70 65 20 4c 61 79 65 72 43 6c |pre>type LayerCl| 521s 00003eb0 61 73 73 4d 61 70 20 6d 61 70 5b 4c 61 79 65 72 |assMap map[Layer| 521s 00003ec0 54 79 70 65 5d 62 6f 6f 6c 3c 2f 70 72 65 3e 0a |Type]bool
.| 521s 00003ed0 09 09 09 3c 70 3e 0a 4c 61 79 65 72 43 6c 61 73 |...

.LayerClas| 521s 00003ee0 73 4d 61 70 20 69 6d 70 6c 65 6d 65 6e 74 73 20 |sMap implements | 521s 00003ef0 61 20 4c 61 79 65 72 43 6c 61 73 73 20 77 69 74 |a LayerClass wit| 521s 00003f00 68 20 61 20 6d 61 70 2e 0a 3c 2f 70 3e 0a 0a 0a |h a map..

...| 521s 00003f10 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 |................| 521s 00003f20 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 |............

func NewLaye| 521s 00003fa0 72 43 6c 61 73 73 4d 61 70 3c 2f 61 3e 3c 2f 68 |rClassMap.....<| 521s 521s pcap_test.go:110: -- FULL PACKET DATA (16388 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 01 88 91 3f d8 06 40 00 00 00 00 |....`...?..@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 521s 00000030 0a 65 f6 5f 08 97 18 4a 80 10 23 02 3f e0 00 00 |.e._...J..#.?...| 521s 00000040 01 01 08 0a 05 c0 8d b6 05 c0 8c fc 70 72 65 3e |............pre>| 521s 00000050 66 75 6e 63 20 4e 65 77 4c 61 79 65 72 43 6c 61 |func NewLayerCla| 521s 00000060 73 73 4d 61 70 28 74 79 70 65 73 20 5b 5d 4c 61 |ssMap(types []La| 521s 00000070 79 65 72 54 79 70 65 29 20 4c 61 79 65 72 43 6c |yerType) LayerCl| 521s 00000080 61 73 73 4d 61 70 3c 2f 70 72 65 3e 0a 09 09 09 |assMap

....| 521s 00000090 09 3c 70 3e 0a 4e 65 77 4c 61 79 65 72 43 6c 61 |.

.NewLayerCla| 521s 000000a0 73 73 4d 61 70 20 63 72 65 61 74 65 73 20 61 20 |ssMap creates a | 521s 000000b0 4c 61 79 65 72 43 6c 61 73 73 4d 61 70 20 61 6e |LayerClassMap an| 521s 000000c0 64 20 73 65 74 73 20 6d 61 70 5b 74 5d 20 74 6f |d sets map[t] to| 521s 000000d0 20 74 72 75 65 20 66 6f 72 20 65 61 63 68 0a 74 | true for each.t| 521s 000000e0 79 70 65 20 69 6e 20 74 79 70 65 73 2e 0a 3c 2f |ype in types................| 521s 00000100 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 |...........

func | 521s 00000130 28 4c 61 79 65 72 43 6c 61 73 73 4d 61 70 29 20 |(LayerClassMap) | 521s 00000140 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |Co| 521s 00000190 6e 74 61 69 6e 73 3c 2f 61 3e 3c 2f 68 33 3e 0a |ntains

.| 521s 000001a0 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 6d |....
func (m|
521s         000001b0  20 4c 61 79 65 72 43 6c  61 73 73 4d 61 70 29 20  | LayerClassMap) |
521s         000001c0  43 6f 6e 74 61 69 6e 73  28 74 20 4c 61 79 65 72  |Contains(t Layer|
521s         000001d0  54 79 70 65 29 20 62 6f  6f 6c 3c 2f 70 72 65 3e  |Type) bool
| 521s 000001e0 0a 09 09 09 09 3c 70 3e 0a 43 6f 6e 74 61 69 6e |.....

.Contain| 521s 000001f0 73 20 72 65 74 75 72 6e 73 20 74 72 75 65 20 69 |s returns true i| 521s 00000200 66 20 74 68 65 20 67 69 76 65 6e 20 6c 61 79 65 |f the given laye| 521s 00000210 72 20 74 79 70 65 20 73 68 6f 75 6c 64 20 62 65 |r type should be| 521s 00000220 20 63 6f 6e 73 69 64 65 72 65 64 20 70 61 72 74 | considered part| 521s 00000230 0a 6f 66 20 74 68 69 73 20 6c 61 79 65 72 20 63 |.of this layer c| 521s 00000240 6c 61 73 73 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 |lass..

......| 521s 00000250 0a 09 09 09 09 0a 09 09 09 0a 09 09 0a 09 09 09 |................| 521s 00000260 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 |........

type LayerClassSlice| 521s 000002e0 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 |

....type LayerClas| 521s 00000300 73 53 6c 69 63 65 20 5b 5d 62 6f 6f 6c 3c 2f 70 |sSlice []bool
....

.Layer| 521s 00000320 43 6c 61 73 73 53 6c 69 63 65 20 69 6d 70 6c 65 |ClassSlice imple| 521s 00000330 6d 65 6e 74 73 20 61 20 4c 61 79 65 72 43 6c 61 |ments a LayerCla| 521s 00000340 73 73 20 77 69 74 68 20 61 20 73 6c 69 63 65 2e |ss with a slice.| 521s 00000350 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 |.

...........| 521s 00000360 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a |................| 521s 00000370 09 09 09 09 3c 68 33 20 69 64 3d 22 4e 65 77 4c |....

| 521s 00000390 66 75 6e 63 20 3c 61 20 68 72 65 66 3d 22 2f 73 |func NewLayerClassSl| 521s 000003f0 69 63 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 |ice

....| 521s 00000400 09 3c 70 72 65 3e 66 75 6e 63 20 4e 65 77 4c 61 |.
func NewLa|
521s         00000410  79 65 72 43 6c 61 73 73  53 6c 69 63 65 28 74 79  |yerClassSlice(ty|
521s         00000420  70 65 73 20 5b 5d 4c 61  79 65 72 54 79 70 65 29  |pes []LayerType)|
521s         00000430  20 4c 61 79 65 72 43 6c  61 73 73 53 6c 69 63 65  | LayerClassSlice|
521s         00000440  3c 2f 70 72 65 3e 0a 09  09 09 09 3c 70 3e 0a 4e  |
.....

.N| 521s 00000450 65 77 4c 61 79 65 72 43 6c 61 73 73 53 6c 69 63 |ewLayerClassSlic| 521s 00000460 65 20 63 72 65 61 74 65 73 20 61 20 6e 65 77 20 |e creates a new | 521s 00000470 4c 61 79 65 72 43 6c 61 73 73 53 6c 69 63 65 20 |LayerClassSlice | 521s 00000480 62 79 20 63 72 65 61 74 69 6e 67 20 61 20 73 6c |by creating a sl| 521s 00000490 69 63 65 20 6f 66 0a 73 69 7a 65 20 6d 61 78 28 |ice of.size max(| 521s 000004a0 74 79 70 65 73 29 20 61 6e 64 20 73 65 74 74 69 |types) and setti| 521s 000004b0 6e 67 20 73 6c 69 63 65 5b 74 5d 20 74 6f 20 74 |ng slice[t] to t| 521s 000004c0 72 75 65 20 66 6f 72 20 65 61 63 68 20 74 79 70 |rue for each typ| 521s 000004d0 65 20 74 2e 20 20 4e 6f 74 65 2c 20 69 66 0a 79 |e t. Note, if.y| 521s 000004e0 6f 75 20 69 6d 70 6c 65 6d 65 6e 74 20 79 6f 75 |ou implement you| 521s 000004f0 72 20 6f 77 6e 20 4c 61 79 65 72 54 79 70 65 20 |r own LayerType | 521s 00000500 61 6e 64 20 67 69 76 65 20 69 74 20 61 20 68 69 |and give it a hi| 521s 00000510 67 68 20 76 61 6c 75 65 2c 20 74 68 69 73 20 57 |gh value, this W| 521s 00000520 49 4c 4c 20 63 72 65 61 74 65 0a 61 20 76 65 72 |ILL create.a ver| 521s 00000530 79 20 6c 61 72 67 65 20 73 6c 69 63 65 2e 0a 3c |y large slice..<| 521s 00000540 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 0a 0a 09 |/p>.............| 521s 00000550 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 |............

fu| 521s 00000580 6e 63 20 28 4c 61 79 65 72 43 6c 61 73 73 53 6c |nc (LayerClassSl| 521s 00000590 69 63 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 |ice) | 521s 000005e0 43 6f 6e 74 61 69 6e 73 3c 2f 61 3e 3c 2f 68 33 |Contains.....
func |
521s         00000600  28 73 20 4c 61 79 65 72  43 6c 61 73 73 53 6c 69  |(s LayerClassSli|
521s         00000610  63 65 29 20 43 6f 6e 74  61 69 6e 73 28 74 20 4c  |ce) Contains(t L|
521s         00000620  61 79 65 72 54 79 70 65  29 20 62 6f 6f 6c 3c 2f  |ayerType) bool.....

.Con| 521s 00000640 74 61 69 6e 73 20 72 65 74 75 72 6e 73 20 74 72 |tains returns tr| 521s 00000650 75 65 20 69 66 20 74 68 65 20 67 69 76 65 6e 20 |ue if the given | 521s 00000660 6c 61 79 65 72 20 74 79 70 65 20 73 68 6f 75 6c |layer type shoul| 521s 00000670 64 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 |d be considered | 521s 00000680 70 61 72 74 0a 6f 66 20 74 68 69 73 20 6c 61 79 |part.of this lay| 521s 00000690 65 72 20 63 6c 61 73 73 2e 0a 3c 2f 70 3e 0a 0a |er class..

..| 521s 000006a0 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 000006b0 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 |............

t| 521s 000006d0 79 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |ype La| 521s 00000720 79 65 72 54 79 70 65 3c 2f 61 3e 3c 2f 68 32 3e |yerType

| 521s 00000730 0a 09 09 09 3c 70 72 65 3e 74 79 70 65 20 4c 61 |....
type La|
521s         00000740  79 65 72 54 79 70 65 20  69 6e 74 36 34 3c 2f 70  |yerType int64....

.Layer| 521s 00000760 54 79 70 65 20 69 73 20 61 20 75 6e 69 71 75 65 |Type is a unique| 521s 00000770 20 69 64 65 6e 74 69 66 69 65 72 20 66 6f 72 20 | identifier for | 521s 00000780 65 61 63 68 20 74 79 70 65 20 6f 66 20 6c 61 79 |each type of lay| 521s 00000790 65 72 2e 20 20 54 68 69 73 20 65 6e 75 6d 65 72 |er. This enumer| 521s 000007a0 61 74 69 6f 6e 0a 64 6f 65 73 20 6e 6f 74 20 6d |ation.does not m| 521s 000007b0 61 74 63 68 20 77 69 74 68 20 61 6e 79 20 65 78 |atch with any ex| 521s 000007c0 74 65 72 6e 61 6c 6c 79 20 61 76 61 69 6c 61 62 |ternally availab| 521s 000007d0 6c 65 20 6e 75 6d 62 65 72 69 6e 67 20 73 63 68 |le numbering sch| 521s 000007e0 65 6d 65 2e 2e 2e 20 69 74 26 23 33 39 3b 73 20 |eme... it's | 521s 000007f0 73 6f 6c 65 6c 79 0a 75 73 61 62 6c 65 2f 75 73 |solely.usable/us| 521s 00000800 65 66 75 6c 20 77 69 74 68 69 6e 20 74 68 69 73 |eful within this| 521s 00000810 20 6c 69 62 72 61 72 79 20 61 73 20 61 20 6d 65 | library as a me| 521s 00000820 61 6e 73 20 66 6f 72 20 72 65 71 75 65 73 74 69 |ans for requesti| 521s 00000830 6e 67 20 6c 61 79 65 72 20 74 79 70 65 73 0a 28 |ng layer types.(| 521s 00000840 73 65 65 20 50 61 63 6b 65 74 2e 4c 61 79 65 72 |see Packet.Layer| 521s 00000850 29 20 61 6e 64 20 64 65 74 65 72 6d 69 6e 69 6e |) and determinin| 521s 00000860 67 20 77 68 69 63 68 20 74 79 70 65 73 20 6f 66 |g which types of| 521s 00000870 20 6c 61 79 65 72 73 20 68 61 76 65 20 62 65 65 | layers have bee| 521s 00000880 6e 20 64 65 63 6f 64 65 64 2e 0a 3c 2f 70 3e 0a |n decoded..

.| 521s 00000890 3c 70 3e 0a 4e 65 77 20 4c 61 79 65 72 54 79 70 |

.New LayerTyp| 521s 000008a0 65 73 20 6d 61 79 20 62 65 20 63 72 65 61 74 65 |es may be create| 521s 000008b0 64 20 62 79 20 63 61 6c 6c 69 6e 67 20 67 6f 70 |d by calling gop| 521s 000008c0 61 63 6b 65 74 2e 52 65 67 69 73 74 65 72 4c 61 |acket.RegisterLa| 521s 000008d0 79 65 72 54 79 70 65 2e 0a 3c 2f 70 3e 0a 0a 0a |yerType..

...| 521s 000008e0 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 3c 70 72 |.............var LayerTypeD| 521s 00000900 65 63 6f 64 65 46 61 69 6c 75 72 65 20 4c 61 79 |ecodeFailure Lay| 521s 00000910 65 72 54 79 70 65 20 3d 20 52 65 67 69 73 74 65 |erType = Registe| 521s 00000920 72 4c 61 79 65 72 54 79 70 65 28 30 2c 20 4c 61 |rLayerType(0, La| 521s 00000930 79 65 72 54 79 70 65 4d 65 74 61 64 61 74 61 7b |yerTypeMetadata{| 521s 00000940 26 23 33 34 3b 44 65 63 6f 64 65 20 46 61 69 6c |"Decode Fail| 521s 00000950 75 72 65 26 23 33 34 3b 2c 20 44 65 63 6f 64 65 |ure", Decode| 521s 00000960 55 6e 6b 6e 6f 77 6e 7d 29 3c 2f 70 72 65 3e 0a |Unknown})
.| 521s 00000970 09 09 09 09 3c 70 3e 0a 4c 61 79 65 72 54 79 70 |....

.LayerTyp| 521s 00000980 65 44 65 63 6f 64 65 46 61 69 6c 75 72 65 20 69 |eDecodeFailure i| 521s 00000990 73 20 74 68 65 20 6c 61 79 65 72 20 74 79 70 65 |s the layer type| 521s 000009a0 20 66 6f 72 20 74 68 65 20 64 65 66 61 75 6c 74 | for the default| 521s 000009b0 20 65 72 72 6f 72 20 6c 61 79 65 72 2e 0a 3c 2f | error layer............var LayerTypePa| 521s 000009e0 79 6c 6f 61 64 20 4c 61 79 65 72 54 79 70 65 20 |yload LayerType | 521s 000009f0 3d 20 52 65 67 69 73 74 65 72 4c 61 79 65 72 54 |= RegisterLayerT| 521s 00000a00 79 70 65 28 31 2c 20 4c 61 79 65 72 54 79 70 65 |ype(1, LayerType| 521s 00000a10 4d 65 74 61 64 61 74 61 7b 26 23 33 34 3b 50 61 |Metadata{"Pa| 521s 00000a20 79 6c 6f 61 64 26 23 33 34 3b 2c 20 44 65 63 6f |yload", Deco| 521s 00000a30 64 65 50 61 79 6c 6f 61 64 7d 29 3c 2f 70 72 65 |dePayload}).....

.LayerT| 521s 00000a50 79 70 65 50 61 79 6c 6f 61 64 20 69 73 20 74 68 |ypePayload is th| 521s 00000a60 65 20 6c 61 79 65 72 20 74 79 70 65 20 66 6f 72 |e layer type for| 521s 00000a70 20 61 20 70 61 79 6c 6f 61 64 20 74 68 61 74 20 | a payload that | 521s 00000a80 77 65 20 64 6f 6e 26 23 33 39 3b 74 20 74 72 79 |we don't try| 521s 00000a90 20 74 6f 20 64 65 63 6f 64 65 0a 62 75 74 20 74 | to decode.but t| 521s 00000aa0 72 65 61 74 20 61 73 20 61 20 73 75 63 63 65 73 |reat as a succes| 521s 00000ab0 73 2c 20 49 45 3a 20 61 6e 20 61 70 70 6c 69 63 |s, IE: an applic| 521s 00000ac0 61 74 69 6f 6e 2d 6c 65 76 65 6c 20 70 61 79 6c |ation-level payl| 521s 00000ad0 6f 61 64 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 0a 0a |oad..

.......| 521s 00000ae0 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 |................| 521s 00000af0 09 09 3c 68 33 20 69 64 3d 22 52 65 67 69 73 74 |..

fun| 521s 00000b10 63 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |c R| 521s 00000b60 65 67 69 73 74 65 72 4c 61 79 65 72 54 79 70 65 |egisterLayerType| 521s 00000b70 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 |

.....func Register| 521s 00000b90 4c 61 79 65 72 54 79 70 65 28 6e 75 6d 20 69 6e |LayerType(num in| 521s 00000ba0 74 2c 20 6d 65 74 61 20 4c 61 79 65 72 54 79 70 |t, meta LayerTyp| 521s 00000bb0 65 4d 65 74 61 64 61 74 61 29 20 4c 61 79 65 72 |eMetadata) Layer| 521s 00000bc0 54 79 70 65 3c 2f 70 72 65 3e 0a 09 09 09 09 3c |Type
.....<| 521s 00000bd0 70 3e 0a 52 65 67 69 73 74 65 72 4c 61 79 65 72 |p>.RegisterLayer| 521s 00000be0 54 79 70 65 20 63 72 65 61 74 65 73 20 61 20 6e |Type creates a n| 521s 00000bf0 65 77 20 6c 61 79 65 72 20 74 79 70 65 20 61 6e |ew layer type an| 521s 00000c00 64 20 72 65 67 69 73 74 65 72 73 20 69 74 20 67 |d registers it g| 521s 00000c10 6c 6f 62 61 6c 6c 79 2e 0a 54 68 65 20 6e 75 6d |lobally..The num| 521s 00000c20 62 65 72 20 70 61 73 73 65 64 20 69 6e 20 6d 75 |ber passed in mu| 521s 00000c30 73 74 20 62 65 20 75 6e 69 71 75 65 2c 20 6f 72 |st be unique, or| 521s 00000c40 20 61 20 72 75 6e 74 69 6d 65 20 70 61 6e 69 63 | a runtime panic| 521s 00000c50 20 77 69 6c 6c 20 6f 63 63 75 72 2e 20 20 4e 75 | will occur. Nu| 521s 00000c60 6d 62 65 72 73 0a 30 2d 39 39 39 20 61 72 65 20 |mbers.0-999 are | 521s 00000c70 72 65 73 65 72 76 65 64 20 66 6f 72 20 74 68 65 |reserved for the| 521s 00000c80 20 67 6f 70 61 63 6b 65 74 20 6c 69 62 72 61 72 | gopacket librar| 521s 00000c90 79 2e 20 20 4e 75 6d 62 65 72 73 20 31 30 30 30 |y. Numbers 1000| 521s 00000ca0 2d 31 39 39 39 20 73 68 6f 75 6c 64 20 62 65 0a |-1999 should be.| 521s 00000cb0 75 73 65 64 20 66 6f 72 20 63 6f 6d 6d 6f 6e 20 |used for common | 521s 00000cc0 61 70 70 6c 69 63 61 74 69 6f 6e 2d 73 70 65 63 |application-spec| 521s 00000cd0 69 66 69 63 20 74 79 70 65 73 2c 20 61 6e 64 20 |ific types, and | 521s 00000ce0 61 72 65 20 76 65 72 79 20 66 61 73 74 2e 20 20 |are very fast. | 521s 00000cf0 41 6e 79 20 6f 74 68 65 72 0a 6e 75 6d 62 65 72 |Any other.number| 521s 00000d00 20 28 6e 65 67 61 74 69 76 65 20 6f 72 20 26 67 | (negative or &g| 521s 00000d10 74 3b 3d 20 32 30 30 30 29 20 6d 61 79 20 62 65 |t;= 2000) may be| 521s 00000d20 20 75 73 65 64 20 66 6f 72 20 75 6e 63 6f 6d 6d | used for uncomm| 521s 00000d30 6f 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 2d 73 |on application-s| 521s 00000d40 70 65 63 69 66 69 63 0a 74 79 70 65 73 2c 20 61 |pecific.types, a| 521s 00000d50 6e 64 20 61 72 65 20 73 6f 6d 65 77 68 61 74 20 |nd are somewhat | 521s 00000d60 73 6c 6f 77 65 72 20 28 74 68 65 79 20 72 65 71 |slower (they req| 521s 00000d70 75 69 72 65 20 61 20 6d 61 70 20 6c 6f 6f 6b 75 |uire a map looku| 521s 00000d80 70 20 6f 76 65 72 20 61 6e 20 61 72 72 61 79 0a |p over an array.| 521s 00000d90 69 6e 64 65 78 29 2e 0a 3c 2f 70 3e 0a 0a 09 09 |index)..

....| 521s 00000da0 09 09 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 |................| 521s 00000db0 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 4c 61 79 |.....

f| 521s 00000dd0 75 6e 63 20 28 4c 61 79 65 72 54 79 70 65 29 20 |unc (LayerType) | 521s 00000de0 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |Dec| 521s 00000e30 6f 64 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 |ode

....| 521s 00000e40 09 3c 70 72 65 3e 66 75 6e 63 20 28 74 20 4c 61 |.
func (t La|
521s         00000e50  79 65 72 54 79 70 65 29  20 44 65 63 6f 64 65 28  |yerType) Decode(|
521s         00000e60  64 61 74 61 20 5b 5d 62  79 74 65 2c 20 63 20 50  |data []byte, c P|
521s         00000e70  61 63 6b 65 74 42 75 69  6c 64 65 72 29 20 65 72  |acketBuilder) er|
521s         00000e80  72 6f 72 3c 2f 70 72 65  3e 0a 09 09 09 09 3c 70  |ror
......Decode decodes| 521s 00000ea0 20 74 68 65 20 67 69 76 65 6e 20 64 61 74 61 20 | the given data | 521s 00000eb0 75 73 69 6e 67 20 74 68 65 20 64 65 63 6f 64 65 |using the decode| 521s 00000ec0 72 20 72 65 67 69 73 74 65 72 65 64 20 77 69 74 |r registered wit| 521s 00000ed0 68 20 74 68 65 20 6c 61 79 65 72 0a 74 79 70 65 |h the layer.type| 521s 00000ee0 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 |..

..........| 521s 00000ef0 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 00000f00 68 33 20 69 64 3d 22 4c 61 79 65 72 54 79 70 65 |h3 id="LayerType| 521s 00000f10 2e 53 74 72 69 6e 67 22 3e 66 75 6e 63 20 28 4c |.String">func (L| 521s 00000f20 61 79 65 72 54 79 70 65 29 20 3c 61 20 68 72 65 |ayerType) String.....
|
521s         00000f90  66 75 6e 63 20 28 74 20  4c 61 79 65 72 54 79 70  |func (t LayerTyp|
521s         00000fa0  65 29 20 53 74 72 69 6e  67 28 29 20 28 73 20 73  |e) String() (s s|
521s         00000fb0  74 72 69 6e 67 29 3c 2f  70 72 65 3e 0a 09 09 09  |tring)
....| 521s 00000fc0 09 3c 70 3e 0a 53 74 72 69 6e 67 20 72 65 74 75 |.

.String retu| 521s 00000fd0 72 6e 73 20 74 68 65 20 73 74 72 69 6e 67 20 61 |rns the string a| 521s 00000fe0 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 |ssociated with t| 521s 00000ff0 68 69 73 20 6c 61 79 65 72 20 74 79 70 65 2e 0a |his layer type..| 521s 00001000 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 09 0a |

............| 521s 00001010 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 |................| 521s 00001020 09 09 3c 68 32 20 69 64 3d 22 4c 61 79 65 72 54 |..

typ| 521s 00001040 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e Laye| 521s 00001090 72 54 79 70 65 4d 65 74 61 64 61 74 61 3c 2f 61 |rTypeMetadata

....
t|
521s         000010b0  79 70 65 20 4c 61 79 65  72 54 79 70 65 4d 65 74  |ype LayerTypeMet|
521s         000010c0  61 64 61 74 61 20 73 74  72 75 63 74 20 7b 0a 20  |adata struct {. |
521s         000010d0  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // Name|
521s         000010f0  20 69 73 20 74 68 65 20  73 74 72 69 6e 67 20 72  | is the string r|
521s         00001100  65 74 75 72 6e 65 64 20  62 79 20 65 61 63 68 20  |eturned by each |
521s         00001110  6c 61 79 65 72 20 74 79  70 65 26 23 33 39 3b 73  |layer type's|
521s         00001120  20 53 74 72 69 6e 67 20  6d 65 74 68 6f 64 2e 3c  | String method.<|
521s         00001130  2f 73 70 61 6e 3e 0a 20  20 20 20 4e 61 6d 65 20  |/span>.    Name |
521s         00001140  73 74 72 69 6e 67 0a 20  20 20 20 3c 73 70 61 6e  |string.    // Decoder is t|
521s         00001170  68 65 20 64 65 63 6f 64  65 72 20 74 6f 20 75 73  |he decoder to us|
521s         00001180  65 20 77 68 65 6e 20 74  68 65 20 6c 61 79 65 72  |e when the layer|
521s         00001190  20 74 79 70 65 20 69 73  20 70 61 73 73 65 64 20  | type is passed |
521s         000011a0  69 6e 20 61 73 20 61 3c  2f 73 70 61 6e 3e 0a 20  |in as a. |
521s         000011b0  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // Deco|
521s         000011d0  64 65 72 2e 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |der..    |
521s         000011e0  44 65 63 6f 64 65 72 20  44 65 63 6f 64 65 72 0a  |Decoder Decoder.|
521s         000011f0  7d 3c 2f 70 72 65 3e 0a  09 09 09 3c 70 3e 0a 4c  |}
....

.L| 521s 00001200 61 79 65 72 54 79 70 65 4d 65 74 61 64 61 74 61 |ayerTypeMetadata| 521s 00001210 20 63 6f 6e 74 61 69 6e 73 20 6d 65 74 61 64 61 | contains metada| 521s 00001220 74 61 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 |ta associated wi| 521s 00001230 74 68 20 65 61 63 68 20 4c 61 79 65 72 54 79 70 |th each LayerTyp| 521s 00001240 65 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 |e..

.........| 521s 00001250 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 |................| 521s 00001260 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00001270 3c 68 32 20 69 64 3d 22 4c 69 6e 6b 4c 61 79 65 |

type | 521s 000012d0 4c 69 6e 6b 4c 61 79 65 72 3c 2f 61 3e 3c 2f 68 |LinkLayer....
type |
521s         000012f0  4c 69 6e 6b 4c 61 79 65  72 20 69 6e 74 65 72 66  |LinkLayer interf|
521s         00001300  61 63 65 20 7b 0a 20 20  20 20 4c 61 79 65 72 0a  |ace {.    Layer.|
521s         00001310  20 20 20 20 4c 69 6e 6b  46 6c 6f 77 28 29 20 46  |    LinkFlow() F|
521s         00001320  6c 6f 77 0a 7d 3c 2f 70  72 65 3e 0a 09 09 09 3c  |low.}
....<| 521s 00001330 70 3e 0a 4c 69 6e 6b 4c 61 79 65 72 20 69 73 20 |p>.LinkLayer is | 521s 00001340 74 68 65 20 70 61 63 6b 65 74 20 6c 61 79 65 72 |the packet layer| 521s 00001350 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 | corresponding t| 521s 00001360 6f 20 54 43 50 2f 49 50 20 6c 61 79 65 72 20 31 |o TCP/IP layer 1| 521s 00001370 20 28 4f 53 49 20 6c 61 79 65 72 20 32 29 0a 3c | (OSI layer 2).<| 521s 00001380 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a |/p>.............| 521s 00001390 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 |................| 521s 000013a0 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 |............

type N| 521s 00001410 65 74 77 6f 72 6b 4c 61 79 65 72 3c 2f 61 3e 3c |etworkLayer<| 521s 00001420 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         00001430  65 20 4e 65 74 77 6f 72  6b 4c 61 79 65 72 20 69  |e NetworkLayer i|
521s         00001440  6e 74 65 72 66 61 63 65  20 7b 0a 20 20 20 20 4c  |nterface {.    L|
521s         00001450  61 79 65 72 0a 20 20 20  20 4e 65 74 77 6f 72 6b  |ayer.    Network|
521s         00001460  46 6c 6f 77 28 29 20 46  6c 6f 77 0a 7d 3c 2f 70  |Flow() Flow.}....

.Netwo| 521s 00001480 72 6b 4c 61 79 65 72 20 69 73 20 74 68 65 20 70 |rkLayer is the p| 521s 00001490 61 63 6b 65 74 20 6c 61 79 65 72 20 63 6f 72 72 |acket layer corr| 521s 000014a0 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 54 43 50 |esponding to TCP| 521s 000014b0 2f 49 50 20 6c 61 79 65 72 20 32 20 28 4f 53 49 |/IP layer 2 (OSI| 521s 000014c0 0a 6c 61 79 65 72 20 33 29 0a 3c 2f 70 3e 0a 0a |.layer 3).

..| 521s 000014d0 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a |................| 521s 000014e0 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a |................| 521s 000014f0 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 50 |.......

type Packet<| 521s 00001560 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         00001570  65 20 50 61 63 6b 65 74  20 69 6e 74 65 72 66 61  |e Packet interfa|
521s         00001580  63 65 20 7b 0a 20 20 20  20 66 6d 74 2e 53 74 72  |ce {.    fmt.Str|
521s         00001590  69 6e 67 65 72 0a 20 20  20 20 3c 73 70 61 6e 20  |inger.    |
521s         000015b0  2f 2f 20 44 61 74 61 20  72 65 74 75 72 6e 73 20  |// Data returns |
521s         000015c0  61 6c 6c 20 64 61 74 61  20 61 73 73 6f 63 69 61  |all data associa|
521s         000015d0  74 65 64 20 77 69 74 68  20 74 68 69 73 20 70 61  |ted with this pa|
521s         000015e0  63 6b 65 74 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |cket.    |
521s         000015f0  44 61 74 61 28 29 20 5b  5d 62 79 74 65 0a 20 20  |Data() []byte.  |
521s         00001600  20 20 3c 73 70 61 6e 20  63 6c 61 73 73 3d 22 63  |  // Layer|
521s         00001620  73 20 72 65 74 75 72 6e  73 20 61 6c 6c 20 6c 61  |s returns all la|
521s         00001630  79 65 72 73 20 69 6e 20  74 68 69 73 20 70 61 63  |yers in this pac|
521s         00001640  6b 65 74 2c 20 63 6f 6d  70 75 74 69 6e 67 20 74  |ket, computing t|
521s         00001650  68 65 6d 20 61 73 20 6e  65 63 65 73 73 61 72 79  |hem as necessary|
521s         00001660  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 4c 61 79 65  |.    Laye|
521s         00001670  72 73 28 29 20 5b 5d 4c  61 79 65 72 0a 20 20 20  |rs() []Layer.   |
521s         00001680  20 3c 73 70 61 6e 20 63  6c 61 73 73 3d 22 63 6f  | // Layer |
521s         000016a0  72 65 74 75 72 6e 73 20  74 68 65 20 66 69 72 73  |returns the firs|
521s         000016b0  74 20 6c 61 79 65 72 20  69 6e 20 74 68 69 73 20  |t layer in this |
521s         000016c0  70 61 63 6b 65 74 20 6f  66 20 74 68 65 20 67 69  |packet of the gi|
521s         000016d0  76 65 6e 20 74 79 70 65  2c 20 6f 72 20 6e 69 6c  |ven type, or nil|
521s         000016e0  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 4c 61 79 65  |.    Laye|
521s         000016f0  72 28 4c 61 79 65 72 54  79 70 65 29 20 4c 61 79  |r(LayerType) Lay|
521s         00001700  65 72 0a 20 20 20 20 3c  73 70 61 6e 20 63 6c 61  |er.    // |
521s         00001720  4c 61 79 65 72 43 6c 61  73 73 20 72 65 74 75 72  |LayerClass retur|
521s         00001730  6e 73 20 74 68 65 20 66  69 72 73 74 20 6c 61 79  |ns the first lay|
521s         00001740  65 72 20 69 6e 20 74 68  69 73 20 70 61 63 6b 65  |er in this packe|
521s         00001750  74 20 6f 66 20 74 68 65  20 67 69 76 65 6e 20 63  |t of the given c|
521s         00001760  6c 61 73 73 2c 3c 2f 73  70 61 6e 3e 0a 20 20 20  |lass,.   |
521s         00001770  20 3c 73 70 61 6e 20 63  6c 61 73 73 3d 22 63 6f  | // or nil|
521s         00001790  2e 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 4c 61 79  |..    Lay|
521s         000017a0  65 72 43 6c 61 73 73 28  4c 61 79 65 72 43 6c 61  |erClass(LayerCla|
521s         000017b0  73 73 29 20 4c 61 79 65  72 0a 20 20 20 20 3c 73  |ss) Layer.    // CaptureIn|
521s         000017e0  66 6f 20 72 65 74 75 72  6e 73 20 74 68 65 20 63  |fo returns the c|
521s         000017f0  61 70 75 74 75 72 65 20  69 6e 66 6f 72 6d 61 74  |aputure informat|
521s         00001800  69 6f 6e 20 66 6f 72 20  74 68 69 73 20 70 61 63  |ion for this pac|
521s         00001810  6b 65 74 2e 20 20 54 68  69 73 20 72 65 74 75 72  |ket.  This retur|
521s         00001820  6e 73 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 3c 73  |ns.    // a pointer|
521s         00001850  20 74 6f 20 74 68 65 20  70 61 63 6b 65 74 26 23  | to the packet&#|
521s         00001860  33 39 3b 73 20 73 74 72  75 63 74 2c 20 73 6f 20  |39;s struct, so |
521s         00001870  69 74 20 63 61 6e 20 62  65 20 75 73 65 64 20 62  |it can be used b|
521s         00001880  6f 74 68 20 66 6f 72 20  72 65 61 64 69 6e 67 20  |oth for reading |
521s         00001890  61 6e 64 3c 2f 73 70 61  6e 3e 0a 20 20 20 20 3c  |and.    <|
521s         000018a0  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         000018b0  65 6e 74 22 3e 2f 2f 20  77 72 69 74 69 6e 67 20  |ent">// writing |
521s         000018c0  74 68 65 20 69 6e 66 6f  72 6d 61 74 69 6f 6e 2e  |the information.|
521s         000018d0  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 43 61 70 74  |.    Capt|
521s         000018e0  75 72 65 49 6e 66 6f 28  29 20 2a 43 61 70 74 75  |ureInfo() *Captu|
521s         000018f0  72 65 49 6e 66 6f 0a 0a  20 20 20 20 3c 73 70 61  |reInfo..    // LinkLayer r|
521s         00001920  65 74 75 72 6e 73 20 74  68 65 20 66 69 72 73 74  |eturns the first|
521s         00001930  20 6c 69 6e 6b 20 6c 61  79 65 72 20 69 6e 20 74  | link layer in t|
521s         00001940  68 65 20 70 61 63 6b 65  74 3c 2f 73 70 61 6e 3e  |he packet|
521s         00001950  0a 20 20 20 20 4c 69 6e  6b 4c 61 79 65 72 28 29  |.    LinkLayer()|
521s         00001960  20 4c 69 6e 6b 4c 61 79  65 72 0a 20 20 20 20 3c  | LinkLayer.    <|
521s         00001970  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         00001980  65 6e 74 22 3e 2f 2f 20  4e 65 74 77 6f 72 6b 4c  |ent">// NetworkL|
521s         00001990  61 79 65 72 20 72 65 74  75 72 6e 73 20 74 68 65  |ayer returns the|
521s         000019a0  20 66 69 72 73 74 20 6e  65 74 77 6f 72 6b 20 6c  | first network l|
521s         000019b0  61 79 65 72 20 69 6e 20  74 68 65 20 70 61 63 6b  |ayer in the pack|
521s         000019c0  65 74 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 4e 65  |et.    Ne|
521s         000019d0  74 77 6f 72 6b 4c 61 79  65 72 28 29 20 4e 65 74  |tworkLayer() Net|
521s         000019e0  77 6f 72 6b 4c 61 79 65  72 0a 20 20 20 20 3c 73  |workLayer.    // Transport|
521s         00001a10  4c 61 79 65 72 20 72 65  74 75 72 6e 73 20 74 68  |Layer returns th|
521s         00001a20  65 20 66 69 72 73 74 20  74 72 61 6e 73 70 6f 72  |e first transpor|
521s         00001a30  74 20 6c 61 79 65 72 20  69 6e 20 74 68 65 20 70  |t layer in the p|
521s         00001a40  61 63 6b 65 74 3c 2f 73  70 61 6e 3e 0a 20 20 20  |acket.   |
521s         00001a50  20 54 72 61 6e 73 70 6f  72 74 4c 61 79 65 72 28  | TransportLayer(|
521s         00001a60  29 20 54 72 61 6e 73 70  6f 72 74 4c 61 79 65 72  |) TransportLayer|
521s         00001a70  0a 20 20 20 20 3c 73 70  61 6e 20 63 6c 61 73 73  |.    // Ap|
521s         00001a90  70 6c 69 63 61 74 69 6f  6e 4c 61 79 65 72 20 72  |plicationLayer r|
521s         00001aa0  65 74 75 72 6e 73 20 74  68 65 20 66 69 72 73 74  |eturns the first|
521s         00001ab0  20 61 70 70 6c 69 63 61  74 69 6f 6e 20 6c 61 79  | application lay|
521s         00001ac0  65 72 20 69 6e 20 74 68  65 20 70 61 63 6b 65 74  |er in the packet|
521s         00001ad0  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 41 70 70 6c  |.    Appl|
521s         00001ae0  69 63 61 74 69 6f 6e 4c  61 79 65 72 28 29 20 41  |icationLayer() A|
521s         00001af0  70 70 6c 69 63 61 74 69  6f 6e 4c 61 79 65 72 0a  |pplicationLayer.|
521s         00001b00  20 20 20 20 3c 73 70 61  6e 20 63 6c 61 73 73 3d  |    // Err|
521s         00001b20  6f 72 4c 61 79 65 72 20  69 73 20 70 61 72 74 69  |orLayer is parti|
521s         00001b30  63 75 6c 61 72 6c 79 20  75 73 65 66 75 6c 2c 20  |cularly useful, |
521s         00001b40  73 69 6e 63 65 20 69 74  20 72 65 74 75 72 6e 73  |since it returns|
521s         00001b50  20 6e 69 6c 20 69 66 20  74 68 65 20 70 61 63 6b  | nil if the pack|
521s         00001b60  65 74 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 3c 73  |et.    // was fully|
521s         00001b90  20 64 65 63 6f 64 65 64  20 73 75 63 63 65 73 73  | decoded success|
521s         00001ba0  66 75 6c 6c 79 2c 20 61  6e 64 20 6e 6f 6e 2d 6e  |fully, and non-n|
521s         00001bb0  69 6c 20 69 66 20 61 6e  20 65 72 72 6f 72 20 77  |il if an error w|
521s         00001bc0  61 73 20 65 6e 63 6f 75  6e 74 65 72 65 64 3c 2f  |as encountered.    |
521s         00001bf0  2f 2f 20 69 6e 20 64 65  63 6f 64 69 6e 67 20 61  |// in decoding a|
521s         00001c00  6e 64 20 74 68 65 20 70  61 63 6b 65 74 20 77 61  |nd the packet wa|
521s         00001c10  73 20 6f 6e 6c 79 20 70  61 72 74 69 61 6c 6c 79  |s only partially|
521s         00001c20  20 64 65 63 6f 64 65 64  2e 20 20 54 68 75 73 2c  | decoded.  Thus,|
521s         00001c30  20 69 74 73 20 6f 75 74  70 75 74 3c 2f 73 70 61  | its output.    // |
521s         00001c60  63 61 6e 20 62 65 20 75  73 65 64 20 74 6f 20 64  |can be used to d|
521s         00001c70  65 74 65 72 6d 69 6e 65  20 69 66 20 74 68 65 20  |etermine if the |
521s         00001c80  65 6e 74 69 72 65 20 70  61 63 6b 65 74 20 77 61  |entire packet wa|
521s         00001c90  73 20 61 62 6c 65 20 74  6f 20 62 65 20 64 65 63  |s able to be dec|
521s         00001ca0  6f 64 65 64 2e 3c 2f 73  70 61 6e 3e 0a 20 20 20  |oded..   |
521s         00001cb0  20 45 72 72 6f 72 4c 61  79 65 72 28 29 20 45 72  | ErrorLayer() Er|
521s         00001cc0  72 6f 72 4c 61 79 65 72  0a 7d 3c 2f 70 72 65 3e  |rorLayer.}
| 521s 00001cd0 0a 09 09 09 3c 70 3e 0a 50 61 63 6b 65 74 20 69 |....

.Packet i| 521s 00001ce0 73 20 74 68 65 20 70 72 69 6d 61 72 79 20 6f 62 |s the primary ob| 521s 00001cf0 6a 65 63 74 20 75 73 65 64 20 62 79 20 67 6f 70 |ject used by gop| 521s 00001d00 61 63 6b 65 74 2e 20 20 50 61 63 6b 65 74 73 20 |acket. Packets | 521s 00001d10 61 72 65 20 63 72 65 61 74 65 64 20 62 79 20 61 |are created by a| 521s 00001d20 0a 44 65 63 6f 64 65 72 26 23 33 39 3b 73 20 44 |.Decoder's D| 521s 00001d30 65 63 6f 64 65 20 63 61 6c 6c 2e 20 20 41 20 70 |ecode call. A p| 521s 00001d40 61 63 6b 65 74 20 69 73 20 6d 61 64 65 20 75 70 |acket is made up| 521s 00001d50 20 6f 66 20 61 20 73 65 74 20 6f 66 20 44 61 74 | of a set of Dat| 521s 00001d60 61 2c 20 77 68 69 63 68 0a 69 73 20 62 72 6f 6b |a, which.is brok| 521s 00001d70 65 6e 20 69 6e 74 6f 20 61 20 6e 75 6d 62 65 72 |en into a number| 521s 00001d80 20 6f 66 20 4c 61 79 65 72 73 20 61 73 20 69 74 | of Layers as it| 521s 00001d90 20 69 73 20 64 65 63 6f 64 65 64 2e 0a 3c 2f 70 | is decoded.................| 521s 00001db0 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 |................| 521s 00001dc0 3c 68 33 20 69 64 3d 22 4e 65 77 50 61 63 6b 65 |

func NewPacket

.....
|
521s         00001e40  66 75 6e 63 20 4e 65 77  50 61 63 6b 65 74 28 64  |func NewPacket(d|
521s         00001e50  61 74 61 20 5b 5d 62 79  74 65 2c 20 66 69 72 73  |ata []byte, firs|
521s         00001e60  74 4c 61 79 65 72 44 65  63 6f 64 65 72 20 44 65  |tLayerDecoder De|
521s         00001e70  63 6f 64 65 72 2c 20 6f  70 74 69 6f 6e 73 20 44  |coder, options D|
521s         00001e80  65 63 6f 64 65 4f 70 74  69 6f 6e 73 29 20 50 61  |ecodeOptions) Pa|
521s         00001e90  63 6b 65 74 3c 2f 70 72  65 3e 0a 09 09 09 09 3c  |cket
.....<| 521s 00001ea0 70 3e 0a 4e 65 77 50 61 63 6b 65 74 20 63 72 65 |p>.NewPacket cre| 521s 00001eb0 61 74 65 73 20 61 20 6e 65 77 20 50 61 63 6b 65 |ates a new Packe| 521s 00001ec0 74 20 6f 62 6a 65 63 74 20 66 72 6f 6d 20 61 20 |t object from a | 521s 00001ed0 73 65 74 20 6f 66 20 62 79 74 65 73 2e 20 20 54 |set of bytes. T| 521s 00001ee0 68 65 0a 66 69 72 73 74 4c 61 79 65 72 44 65 63 |he.firstLayerDec| 521s 00001ef0 6f 64 65 72 20 74 65 6c 6c 73 20 69 74 20 68 6f |oder tells it ho| 521s 00001f00 77 20 74 6f 20 69 6e 74 65 72 70 72 65 74 20 74 |w to interpret t| 521s 00001f10 68 65 20 66 69 72 73 74 20 6c 61 79 65 72 20 66 |he first layer f| 521s 00001f20 72 6f 6d 20 74 68 65 20 62 79 74 65 73 2c 0a 66 |rom the bytes,.f| 521s 00001f30 75 74 75 72 65 20 6c 61 79 65 72 73 20 77 69 6c |uture layers wil| 521s 00001f40 6c 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 66 |l be generated f| 521s 00001f50 72 6f 6d 20 74 68 61 74 20 66 69 72 73 74 20 6c |rom that first l| 521s 00001f60 61 79 65 72 20 61 75 74 6f 6d 61 74 69 63 61 6c |ayer automatical| 521s 00001f70 6c 79 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 |ly..

........| 521s 00001f80 09 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 |................| 521s 00001f90 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 50 61 |......

typ| 521s 00001fb0 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e Packe| 521s 00002000 74 42 75 69 6c 64 65 72 3c 2f 61 3e 3c 2f 68 32 |tBuilder....
type P|
521s         00002020  61 63 6b 65 74 42 75 69  6c 64 65 72 20 69 6e 74  |acketBuilder int|
521s         00002030  65 72 66 61 63 65 20 7b  0a 20 20 20 20 3c 73 70  |erface {.    // AddLayer s|
521s         00002060  68 6f 75 6c 64 20 62 65  20 63 61 6c 6c 65 64 20  |hould be called |
521s         00002070  62 79 20 61 20 64 65 63  6f 64 65 72 20 69 6d 6d  |by a decoder imm|
521s         00002080  65 64 69 61 74 65 6c 79  20 75 70 6f 6e 20 73 75  |ediately upon su|
521s         00002090  63 63 65 73 73 66 75 6c  3c 2f 73 70 61 6e 3e 0a  |ccessful.|
521s         000020a0  20 20 20 20 3c 73 70 61  6e 20 63 6c 61 73 73 3d  |    // dec|
521s         000020c0  6f 64 69 6e 67 20 6f 66  20 61 20 6c 61 79 65 72  |oding of a layer|
521s         000020d0  2e 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 41 64 64  |..    Add|
521s         000020e0  4c 61 79 65 72 28 6c 20  4c 61 79 65 72 29 0a 20  |Layer(l Layer). |
521s         000020f0  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // The |
521s         00002110  66 6f 6c 6c 6f 77 69 6e  67 20 66 75 6e 63 74 69  |following functi|
521s         00002120  6f 6e 73 20 73 65 74 20  74 68 65 20 76 61 72 69  |ons set the vari|
521s         00002130  6f 75 73 20 73 70 65 63  69 66 69 63 20 6c 61 79  |ous specific lay|
521s         00002140  65 72 73 20 69 6e 20 74  68 65 20 66 69 6e 61 6c  |ers in the final|
521s         00002150  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // packet.  No|
521s         00002180  74 65 20 74 68 61 74 20  69 66 20 6d 61 6e 79 20  |te that if many |
521s         00002190  6c 61 79 65 72 73 20 63  61 6c 6c 20 53 65 74 58  |layers call SetX|
521s         000021a0  2c 20 74 68 65 20 66 69  72 73 74 20 63 61 6c 6c  |, the first call|
521s         000021b0  20 69 73 20 6b 65 70 74  20 61 6e 64 20 61 6c 6c  | is kept and all|
521s         000021c0  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // other calls|
521s         000021f0  20 61 72 65 20 69 67 6e  6f 72 65 64 2e 3c 2f 73  | are ignored..    SetLink|
521s         00002210  4c 61 79 65 72 28 4c 69  6e 6b 4c 61 79 65 72 29  |Layer(LinkLayer)|
521s         00002220  0a 20 20 20 20 53 65 74  4e 65 74 77 6f 72 6b 4c  |.    SetNetworkL|
521s         00002230  61 79 65 72 28 4e 65 74  77 6f 72 6b 4c 61 79 65  |ayer(NetworkLaye|
521s         00002240  72 29 0a 20 20 20 20 53  65 74 54 72 61 6e 73 70  |r).    SetTransp|
521s         00002250  6f 72 74 4c 61 79 65 72  28 54 72 61 6e 73 70 6f  |ortLayer(Transpo|
521s         00002260  72 74 4c 61 79 65 72 29  0a 20 20 20 20 53 65 74  |rtLayer).    Set|
521s         00002270  41 70 70 6c 69 63 61 74  69 6f 6e 4c 61 79 65 72  |ApplicationLayer|
521s         00002280  28 41 70 70 6c 69 63 61  74 69 6f 6e 4c 61 79 65  |(ApplicationLaye|
521s         00002290  72 29 0a 20 20 20 20 53  65 74 45 72 72 6f 72 4c  |r).    SetErrorL|
521s         000022a0  61 79 65 72 28 45 72 72  6f 72 4c 61 79 65 72 29  |ayer(ErrorLayer)|
521s         000022b0  0a 20 20 20 20 3c 73 70  61 6e 20 63 6c 61 73 73  |.    // Ne|
521s         000022d0  78 74 44 65 63 6f 64 65  72 20 73 68 6f 75 6c 64  |xtDecoder should|
521s         000022e0  20 62 65 20 63 61 6c 6c  65 64 20 62 79 20 61 20  | be called by a |
521s         000022f0  64 65 63 6f 64 65 72 20  77 68 65 6e 20 74 68 65  |decoder when the|
521s         00002300  79 26 23 33 39 3b 72 65  20 64 6f 6e 65 20 64 65  |y're done de|
521s         00002310  63 6f 64 69 6e 67 20 61  3c 2f 73 70 61 6e 3e 0a  |coding a.|
521s         00002320  20 20 20 20 3c 73 70 61  6e 20 63 6c 61 73 73 3d  |    // pac|
521s         00002340  6b 65 74 20 6c 61 79 65  72 20 62 75 74 20 6e 6f  |ket layer but no|
521s         00002350  74 20 64 6f 6e 65 20 77  69 74 68 20 64 65 63 6f  |t done with deco|
521s         00002360  64 69 6e 67 20 74 68 65  20 65 6e 74 69 72 65 20  |ding the entire |
521s         00002370  70 61 63 6b 65 74 2e 20  20 54 68 65 20 6e 65 78  |packet.  The nex|
521s         00002380  74 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 3c 73 70  |t.    // decoder wi|
521s         000023b0  6c 6c 20 62 65 20 63 61  6c 6c 65 64 20 74 6f 20  |ll be called to |
521s         000023c0  64 65 63 6f 64 65 20 74  68 65 20 6c 61 73 74 20  |decode the last |
521s         000023d0  41 64 64 4c 61 79 65 72  26 23 33 39 3b 73 20 4c  |AddLayer's L|
521s         000023e0  61 79 65 72 50 61 79 6c  6f 61 64 2e 3c 2f 73 70  |ayerPayload..    //|
521s         00002410  20 42 65 63 61 75 73 65  20 6f 66 20 74 68 69 73  | Because of this|
521s         00002420  2c 20 4e 65 78 74 44 65  63 6f 64 65 72 20 6d 75  |, NextDecoder mu|
521s         00002430  73 74 20 6f 6e 6c 79 20  62 65 20 63 61 6c 6c 65  |st only be calle|
521s         00002440  64 20 6f 6e 63 65 20 61  6c 6c 20 6f 74 68 65 72  |d once all other|
521s         00002450  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // PacketBuild|
521s         00002480  65 72 20 63 61 6c 6c 73  20 68 61 76 65 20 62 65  |er calls have be|
521s         00002490  65 6e 20 6d 61 64 65 2e  20 20 53 65 74 2a 4c 61  |en made.  Set*La|
521s         000024a0  79 65 72 20 61 6e 64 20  41 64 64 4c 61 79 65 72  |yer and AddLayer|
521s         000024b0  20 63 61 6c 6c 73 20 61  66 74 65 72 3c 2f 73 70  | calls after.    //|
521s         000024e0  20 4e 65 78 74 44 65 63  6f 64 65 72 20 63 61 6c  | NextDecoder cal|
521s         000024f0  6c 73 20 77 69 6c 6c 20  62 65 68 61 76 65 20 69  |ls will behave i|
521s         00002500  6e 63 6f 72 72 65 63 74  6c 79 2e 3c 2f 73 70 61  |ncorrectly..    NextDecod|
521s         00002520  65 72 28 6e 65 78 74 20  44 65 63 6f 64 65 72 29  |er(next Decoder)|
521s         00002530  20 65 72 72 6f 72 0a 7d  3c 2f 70 72 65 3e 0a 09  | error.}
..| 521s 00002540 09 09 3c 70 3e 0a 50 61 63 6b 65 74 42 75 69 6c |..

.PacketBuil| 521s 00002550 64 65 72 20 69 73 20 75 73 65 64 20 62 79 20 6c |der is used by l| 521s 00002560 61 79 65 72 20 64 65 63 6f 64 65 72 73 20 74 6f |ayer decoders to| 521s 00002570 20 73 74 6f 72 65 20 74 68 65 20 6c 61 79 65 72 | store the layer| 521s 00002580 73 20 74 68 65 79 26 23 33 39 3b 76 65 20 64 65 |s they've de| 521s 00002590 63 6f 64 65 64 2c 0a 61 6e 64 20 74 6f 20 64 65 |coded,.and to de| 521s 000025a0 66 65 72 20 66 75 74 75 72 65 20 64 65 63 6f 64 |fer future decod| 521s 000025b0 69 6e 67 20 76 69 61 20 4e 65 78 74 44 65 63 6f |ing via NextDeco| 521s 000025c0 64 65 72 2e 0a 54 79 70 69 63 61 6c 6c 79 2c 20 |der..Typically, | 521s 000025d0 74 68 65 20 70 61 74 74 65 72 6e 20 66 6f 72 20 |the pattern for | 521s 000025e0 75 73 65 20 69 73 3a 0a 3c 2f 70 3e 0a 3c 70 72 |use is:.

.func (m *myDec| 521s 00002600 6f 64 65 72 29 20 44 65 63 6f 64 65 28 64 61 74 |oder) Decode(dat| 521s 00002610 61 20 5b 5d 62 79 74 65 2c 20 70 20 50 61 63 6b |a []byte, p Pack| 521s 00002620 65 74 42 75 69 6c 64 65 72 29 20 65 72 72 6f 72 |etBuilder) error| 521s 00002630 20 7b 0a 20 20 69 66 20 6d 79 4c 61 79 65 72 2c | {. if myLayer,| 521s 00002640 20 65 72 72 20 3a 3d 20 6d 79 44 65 63 6f 64 69 | err := myDecodi| 521s 00002650 6e 67 4c 6f 67 69 63 28 64 61 74 61 29 3b 20 65 |ngLogic(data); e| 521s 00002660 72 72 20 21 3d 20 6e 69 6c 20 7b 0a 20 20 20 20 |rr != nil {. | 521s 00002670 72 65 74 75 72 6e 20 65 72 72 0a 20 20 7d 20 65 |return err. } e| 521s 00002680 6c 73 65 20 7b 0a 20 20 20 20 70 2e 41 64 64 4c |lse {. p.AddL| 521s 00002690 61 79 65 72 28 6d 79 4c 61 79 65 72 29 0a 20 20 |ayer(myLayer). | 521s 000026a0 7d 0a 20 20 2f 2f 20 6d 61 79 62 65 20 64 6f 20 |}. // maybe do | 521s 000026b0 74 68 69 73 2c 20 69 66 20 6d 79 4c 61 79 65 72 |this, if myLayer| 521s 000026c0 20 69 73 20 61 20 4c 69 6e 6b 4c 61 79 65 72 0a | is a LinkLayer.| 521s 000026d0 20 20 70 2e 53 65 74 4c 69 6e 6b 4c 61 79 65 72 | p.SetLinkLayer| 521s 000026e0 28 6d 79 4c 61 79 65 72 29 0a 20 20 72 65 74 75 |(myLayer). retu| 521s 000026f0 72 6e 20 70 2e 4e 65 78 74 44 65 63 6f 64 65 72 |rn p.NextDecoder| 521s 00002700 28 6e 65 78 74 44 65 63 6f 64 65 72 29 0a 7d 0a |(nextDecoder).}.| 521s 00002710 3c 2f 70 72 65 3e 0a 0a 0a 09 09 09 0a 0a 09 09 |

..........| 521s 00002720 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 |................| 521s 00002730 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c |...............<| 521s 00002740 68 32 20 69 64 3d 22 50 61 63 6b 65 74 44 61 74 |h2 id="PacketDat| 521s 00002750 61 53 6f 75 72 63 65 22 3e 74 79 70 65 20 3c 61 |aSource">type Packe| 521s 000027b0 74 44 61 74 61 53 6f 75 72 63 65 3c 2f 61 3e 3c |tDataSource<| 521s 000027c0 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         000027d0  65 20 50 61 63 6b 65 74  44 61 74 61 53 6f 75 72  |e PacketDataSour|
521s         000027e0  63 65 20 69 6e 74 65 72  66 61 63 65 20 7b 0a 20  |ce interface {. |
521s         000027f0  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   // Read|
521s         00002810  50 61 63 6b 65 74 44 61  74 61 20 72 65 74 75 72  |PacketData retur|
521s         00002820  6e 73 20 74 68 65 20 6e  65 78 74 20 70 61 63 6b  |ns the next pack|
521s         00002830  65 74 20 61 76 61 69 6c  61 62 6c 65 20 66 72 6f  |et available fro|
521s         00002840  6d 20 74 68 69 73 20 64  61 74 61 20 73 6f 75 72  |m this data sour|
521s         00002850  63 65 2e 3c 2f 73 70 61  6e 3e 0a 20 20 20 20 3c  |ce..    <|
521s         00002860  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         00002870  65 6e 74 22 3e 2f 2f 20  49 74 20 72 65 74 75 72  |ent">// It retur|
521s         00002880  6e 73 3a 3c 2f 73 70 61  6e 3e 0a 20 20 20 20 3c  |ns:.    <|
521s         00002890  73 70 61 6e 20 63 6c 61  73 73 3d 22 63 6f 6d 6d  |span class="comm|
521s         000028a0  65 6e 74 22 3e 2f 2f 20  20 64 61 74 61 3a 20 20  |ent">//  data:  |
521s         000028b0  54 68 65 20 62 79 74 65  73 20 6f 66 20 61 6e 20  |The bytes of an |
521s         000028c0  69 6e 64 69 76 69 64 75  61 6c 20 70 61 63 6b 65  |individual packe|
521s         000028d0  74 2e 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 3c 73  |t..    //  ci:  Met|
521s         00002900  61 64 61 74 61 20 61 62  6f 75 74 20 74 68 65 20  |adata about the |
521s         00002910  63 61 70 74 75 72 65 3c  2f 73 70 61 6e 3e 0a 20  |capture. |
521s         00002920  20 20 20 3c 73 70 61 6e  20 63 6c 61 73 73 3d 22  |   //  err|
521s         00002940  3a 20 20 41 6e 20 65 72  72 6f 72 20 65 6e 63 6f  |:  An error enco|
521s         00002950  75 6e 74 65 72 65 64 20  77 68 69 6c 65 20 72 65  |untered while re|
521s         00002960  61 64 69 6e 67 20 70 61  63 6b 65 74 20 64 61 74  |ading packet dat|
521s         00002970  61 2e 20 20 49 66 20 65  72 72 20 21 3d 20 6e 69  |a.  If err != ni|
521s         00002980  6c 2c 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 3c 73  |l,.    //    then d|
521s         000029b0  61 74 61 2f 63 69 20 77  69 6c 6c 20 62 65 20 69  |ata/ci will be i|
521s         000029c0  67 6e 6f 72 65 64 2e 3c  2f 73 70 61 6e 3e 0a 20  |gnored.. |
521s         000029d0  20 20 20 52 65 61 64 50  61 63 6b 65 74 44 61 74  |   ReadPacketDat|
521s         000029e0  61 28 29 20 28 64 61 74  61 20 5b 5d 62 79 74 65  |a() (data []byte|
521s         000029f0  2c 20 63 69 20 43 61 70  74 75 72 65 49 6e 66 6f  |, ci CaptureInfo|
521s         00002a00  2c 20 65 72 72 20 65 72  72 6f 72 29 0a 7d 3c 2f  |, err error).}....

.Pack| 521s 00002a20 65 74 44 61 74 61 53 6f 75 72 63 65 20 69 73 20 |etDataSource is | 521s 00002a30 61 6e 20 69 6e 74 65 72 66 61 63 65 20 66 6f 72 |an interface for| 521s 00002a40 20 73 6f 6d 65 20 73 6f 75 72 63 65 20 6f 66 20 | some source of | 521s 00002a50 70 61 63 6b 65 74 20 64 61 74 61 2e 20 20 55 73 |packet data. Us| 521s 00002a60 65 72 73 20 6d 61 79 0a 63 72 65 61 74 65 20 74 |ers may.create t| 521s 00002a70 68 65 69 72 20 6f 77 6e 20 69 6d 70 6c 65 6d 65 |heir own impleme| 521s 00002a80 6e 74 61 74 69 6f 6e 73 2c 20 6f 72 20 75 73 65 |ntations, or use| 521s 00002a90 20 74 68 65 20 65 78 69 73 74 69 6e 67 20 69 6d | the existing im| 521s 00002aa0 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 69 6e |plementations in| 521s 00002ab0 0a 67 6f 70 61 63 6b 65 74 2f 70 63 61 70 20 28 |.gopacket/pcap (| 521s 00002ac0 6c 69 62 70 63 61 70 2c 20 61 6c 6c 6f 77 73 20 |libpcap, allows | 521s 00002ad0 72 65 61 64 69 6e 67 20 66 72 6f 6d 20 6c 69 76 |reading from liv| 521s 00002ae0 65 20 69 6e 74 65 72 66 61 63 65 73 20 6f 72 20 |e interfaces or | 521s 00002af0 66 72 6f 6d 0a 70 63 61 70 20 66 69 6c 65 73 29 |from.pcap files)| 521s 00002b00 20 6f 72 20 67 6f 70 61 63 6b 65 74 2f 70 66 72 | or gopacket/pfr| 521s 00002b10 69 6e 67 20 28 50 46 5f 52 49 4e 47 2c 20 61 6c |ing (PF_RING, al| 521s 00002b20 6c 6f 77 73 20 72 65 61 64 69 6e 67 20 66 72 6f |lows reading fro| 521s 00002b30 6d 20 6c 69 76 65 0a 69 6e 74 65 72 66 61 63 65 |m live.interface| 521s 00002b40 73 29 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a |s)..

........| 521s 00002b50 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 |................| 521s 00002b60 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00002b70 09 3c 68 32 20 69 64 3d 22 50 61 63 6b 65 74 53 |.

type PacketS| 521s 00002be0 6f 75 72 63 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 |ource

..| 521s 00002bf0 09 09 3c 70 72 65 3e 74 79 70 65 20 50 61 63 6b |..
type Pack|
521s         00002c00  65 74 53 6f 75 72 63 65  20 73 74 72 75 63 74 20  |etSource struct |
521s         00002c10  7b 0a 0a 20 20 20 20 3c  73 70 61 6e 20 63 6c 61  |{..    // |
521s         00002c30  44 65 63 6f 64 65 4f 70  74 69 6f 6e 73 20 69 73  |DecodeOptions is|
521s         00002c40  20 74 68 65 20 73 65 74  20 6f 66 20 6f 70 74 69  | the set of opti|
521s         00002c50  6f 6e 73 20 74 6f 20 75  73 65 20 66 6f 72 20 64  |ons to use for d|
521s         00002c60  65 63 6f 64 69 6e 67 20  65 61 63 68 20 70 69 65  |ecoding each pie|
521s         00002c70  63 65 3c 2f 73 70 61 6e  3e 0a 20 20 20 20 3c 73  |ce.    // of packet|
521s         00002ca0  20 64 61 74 61 2e 20 20  54 68 69 73 20 63 61 6e  | data.  This can|
521s         00002cb0  2f 73 68 6f 75 6c 64 20  62 65 20 63 68 61 6e 67  |/should be chang|
521s         00002cc0  65 64 20 62 79 20 74 68  65 20 75 73 65 72 20 74  |ed by the user t|
521s         00002cd0  6f 20 72 65 66 6c 65 63  74 20 74 68 65 3c 2f 73  |o reflect the.    /|
521s         00002d00  2f 20 77 61 79 20 70 61  63 6b 65 74 73 20 73 68  |/ way packets sh|
521s         00002d10  6f 75 6c 64 20 62 65 20  64 65 63 6f 64 65 64 2e  |ould be decoded.|
521s         00002d20  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 44 65 63 6f  |.    Deco|
521s         00002d30  64 65 4f 70 74 69 6f 6e  73 0a 20 20 20 20 3c 73  |deOptions.    // contains |
521s         00002d60  66 69 6c 74 65 72 65 64  20 6f 72 20 75 6e 65 78  |filtered or unex|
521s         00002d70  70 6f 72 74 65 64 20 66  69 65 6c 64 73 3c 2f 73  |ported fields.}
....| 521s 00002d90 3c 70 3e 0a 50 61 63 6b 65 74 53 6f 75 72 63 65 |

.PacketSource| 521s 00002da0 20 72 65 61 64 73 20 69 6e 20 70 61 63 6b 65 74 | reads in packet| 521s 00002db0 73 20 66 72 6f 6d 20 61 20 50 61 63 6b 65 74 44 |s from a PacketD| 521s 00002dc0 61 74 61 53 6f 75 72 63 65 2c 20 64 65 63 6f 64 |ataSource, decod| 521s 00002dd0 65 73 20 74 68 65 6d 2c 20 61 6e 64 0a 72 65 74 |es them, and.ret| 521s 00002de0 75 72 6e 73 20 74 68 65 6d 2e 0a 3c 2f 70 3e 0a |urns them..

.| 521s 00002df0 3c 70 3e 0a 54 68 65 72 65 20 61 72 65 20 63 75 |

.There are cu| 521s 00002e00 72 72 65 6e 74 6c 79 20 74 77 6f 20 64 69 66 66 |rrently two diff| 521s 00002e10 65 72 65 6e 74 20 6d 65 74 68 6f 64 73 20 66 6f |erent methods fo| 521s 00002e20 72 20 72 65 61 64 69 6e 67 20 70 61 63 6b 65 74 |r reading packet| 521s 00002e30 73 20 69 6e 20 74 68 72 6f 75 67 68 0a 61 20 50 |s in through.a P| 521s 00002e40 61 63 6b 65 74 53 6f 75 72 63 65 3a 0a 3c 2f 70 |acketSource:..

Reading| 521s 00002e80 20 57 69 74 68 20 50 61 63 6b 65 74 73 20 46 75 | With Packets Fu| 521s 00002e90 6e 63 74 69 6f 6e 3c 2f 68 33 3e 0a 3c 70 3e 0a |nction

.

.| 521s 00002ea0 54 68 69 73 20 6d 65 74 68 6f 64 20 69 73 20 74 |This method is t| 521s 00002eb0 68 65 20 6d 6f 73 74 20 63 6f 6e 76 65 6e 69 65 |he most convenie| 521s 00002ec0 6e 74 20 61 6e 64 20 65 61 73 69 65 73 74 20 74 |nt and easiest t| 521s 00002ed0 6f 20 63 6f 64 65 2c 20 62 75 74 20 6c 61 63 6b |o code, but lack| 521s 00002ee0 73 0a 66 6c 65 78 69 62 69 6c 69 74 79 2e 20 20 |s.flexibility. | 521s 00002ef0 50 61 63 6b 65 74 73 20 72 65 74 75 72 6e 73 20 |Packets returns | 521s 00002f00 61 20 26 23 33 39 3b 63 68 61 6e 20 50 61 63 6b |a 'chan Pack| 521s 00002f10 65 74 26 23 33 39 3b 2c 20 74 68 65 6e 20 61 73 |et', then as| 521s 00002f20 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 20 77 72 69 |ynchronously wri| 521s 00002f30 74 65 73 0a 70 61 63 6b 65 74 73 20 69 6e 74 6f |tes.packets into| 521s 00002f40 20 74 68 61 74 20 63 68 61 6e 6e 65 6c 2e 20 20 | that channel. | 521s 00002f50 50 61 63 6b 65 74 73 20 75 73 65 73 20 61 20 62 |Packets uses a b| 521s 00002f60 6c 6f 63 6b 69 6e 67 20 63 68 61 6e 6e 65 6c 2c |locking channel,| 521s 00002f70 20 61 6e 64 20 63 6c 6f 73 65 73 0a 69 74 20 69 | and closes.it i| 521s 00002f80 66 20 61 6e 20 69 6f 2e 45 4f 46 20 69 73 20 72 |f an io.EOF is r| 521s 00002f90 65 74 75 72 6e 65 64 20 62 79 20 74 68 65 20 75 |eturned by the u| 521s 00002fa0 6e 64 65 72 6c 79 69 6e 67 20 50 61 63 6b 65 74 |nderlying Packet| 521s 00002fb0 44 61 74 61 53 6f 75 72 63 65 2e 20 20 41 6c 6c |DataSource. All| 521s 00002fc0 20 6f 74 68 65 72 0a 50 61 63 6b 65 74 44 61 74 | other.PacketDat| 521s 00002fd0 61 53 6f 75 72 63 65 20 65 72 72 6f 72 73 20 61 |aSource errors a| 521s 00002fe0 72 65 20 69 67 6e 6f 72 65 64 20 61 6e 64 20 64 |re ignored and d| 521s 00002ff0 69 73 63 61 72 64 65 64 2e 0a 3c 2f 70 3e 0a 3c |iscarded..

.<| 521s 00003000 70 72 65 3e 66 6f 72 20 70 61 63 6b 65 74 20 3a |pre>for packet :| 521s 00003010 3d 20 72 61 6e 67 65 20 70 61 63 6b 65 74 53 6f |= range packetSo| 521s 00003020 75 72 63 65 2e 50 61 63 6b 65 74 73 28 29 20 7b |urce.Packets() {| 521s 00003030 0a 20 20 2e 2e 2e 0a 7d 0a 3c 2f 70 72 65 3e 0a |. ....}.
.| 521s 00003040 3c 68 33 20 69 64 3d 22 52 65 61 64 69 6e 67 5f |

Readin| 521s 00003070 67 20 57 69 74 68 20 4e 65 78 74 50 61 63 6b 65 |g With NextPacke| 521s 00003080 74 20 46 75 6e 63 74 69 6f 6e 3c 2f 68 33 3e 0a |t Function

.| 521s 00003090 3c 70 3e 0a 54 68 69 73 20 6d 65 74 68 6f 64 20 |

.This method | 521s 000030a0 69 73 20 74 68 65 20 6d 6f 73 74 20 66 6c 65 78 |is the most flex| 521s 000030b0 69 62 6c 65 2c 20 61 6e 64 20 65 78 70 6f 73 65 |ible, and expose| 521s 000030c0 73 20 65 72 72 6f 72 73 20 74 68 61 74 20 6d 61 |s errors that ma| 521s 000030d0 79 20 62 65 0a 65 6e 63 6f 75 6e 74 65 72 65 64 |y be.encountered| 521s 000030e0 20 62 79 20 74 68 65 20 75 6e 64 65 72 6c 79 69 | by the underlyi| 521s 000030f0 6e 67 20 50 61 63 6b 65 74 44 61 74 61 53 6f 75 |ng PacketDataSou| 521s 00003100 72 63 65 2e 20 20 49 74 26 23 33 39 3b 73 20 61 |rce. It's a| 521s 00003110 6c 73 6f 20 74 68 65 20 66 61 73 74 65 73 74 0a |lso the fastest.| 521s 00003120 69 6e 20 61 20 74 69 67 68 74 20 6c 6f 6f 70 2c |in a tight loop,| 521s 00003130 20 73 69 6e 63 65 20 69 74 20 64 6f 65 73 6e 26 | since it doesn&| 521s 00003140 23 33 39 3b 74 20 68 61 76 65 20 74 68 65 20 6f |#39;t have the o| 521s 00003150 76 65 72 68 65 61 64 20 6f 66 20 61 20 63 68 61 |verhead of a cha| 521s 00003160 6e 6e 65 6c 0a 72 65 61 64 2f 77 72 69 74 65 2e |nnel.read/write.| 521s 00003170 20 20 48 6f 77 65 76 65 72 2c 20 69 74 20 72 65 | However, it re| 521s 00003180 71 75 69 72 65 73 20 74 68 65 20 75 73 65 72 20 |quires the user | 521s 00003190 74 6f 20 68 61 6e 64 6c 65 20 65 72 72 6f 72 73 |to handle errors| 521s 000031a0 2c 20 6d 6f 73 74 0a 69 6d 70 6f 72 74 61 6e 74 |, most.important| 521s 000031b0 6c 79 20 74 68 65 20 69 6f 2e 45 4f 46 20 65 72 |ly the io.EOF er| 521s 000031c0 72 6f 72 20 69 6e 20 63 61 73 65 73 20 77 68 65 |ror in cases whe| 521s 000031d0 72 65 20 70 61 63 6b 65 74 73 20 61 72 65 20 62 |re packets are b| 521s 000031e0 65 69 6e 67 20 72 65 61 64 20 66 72 6f 6d 0a 61 |eing read from.a| 521s 000031f0 20 66 69 6c 65 2e 0a 3c 2f 70 3e 0a 3c 70 72 65 | file..

.for {. packet,| 521s 00003210 20 65 72 72 20 3a 3d 20 70 61 63 6b 65 74 53 6f | err := packetSo| 521s 00003220 75 72 63 65 2e 4e 65 78 74 50 61 63 6b 65 74 28 |urce.NextPacket(| 521s 00003230 29 20 7b 0a 20 20 69 66 20 65 72 72 20 3d 3d 20 |) {. if err == | 521s 00003240 69 6f 2e 45 4f 46 20 7b 0a 20 20 20 20 62 72 65 |io.EOF {. bre| 521s 00003250 61 6b 0a 20 20 7d 20 65 6c 73 65 20 69 66 20 65 |ak. } else if e| 521s 00003260 72 72 20 21 3d 20 6e 69 6c 20 7b 0a 20 20 20 20 |rr != nil {. | 521s 00003270 6c 6f 67 2e 50 72 69 6e 74 6c 6e 28 26 23 33 34 |log.Println("| 521s 00003280 3b 45 72 72 6f 72 3a 26 23 33 34 3b 2c 20 65 72 |;Error:", er| 521s 00003290 72 29 0a 20 20 20 20 63 6f 6e 74 69 6e 75 65 0a |r). continue.| 521s 000032a0 20 20 7d 0a 20 20 68 61 6e 64 6c 65 50 61 63 6b | }. handlePack| 521s 000032b0 65 74 28 70 61 63 6b 65 74 29 20 20 2f 2f 20 44 |et(packet) // D| 521s 000032c0 6f 20 73 6f 6d 65 74 68 69 6e 67 20 77 69 74 68 |o something with| 521s 000032d0 20 65 61 63 68 20 70 61 63 6b 65 74 2e 0a 7d 0a | each packet..}.| 521s 000032e0 3c 2f 70 72 65 3e 0a 0a 0a 09 09 09 0a 0a 09 09 |..........| 521s 000032f0 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 |................| 521s 00003300 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 4e 65 77 |.....

fu| 521s 00003320 6e 63 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |nc | 521s 00003370 4e 65 77 50 61 63 6b 65 74 53 6f 75 72 63 65 3c |NewPacketSource<| 521s 00003380 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 |/a>

.....func NewPacket| 521s 000033a0 53 6f 75 72 63 65 28 73 6f 75 72 63 65 20 50 61 |Source(source Pa| 521s 000033b0 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 2c 20 |cketDataSource, | 521s 000033c0 64 65 63 6f 64 65 72 20 44 65 63 6f 64 65 72 29 |decoder Decoder)| 521s 000033d0 20 2a 50 61 63 6b 65 74 53 6f 75 72 63 65 3c 2f | *PacketSource.....

.New| 521s 000033f0 50 61 63 6b 65 74 53 6f 75 72 63 65 20 63 72 65 |PacketSource cre| 521s 00003400 61 74 65 73 20 61 20 70 61 63 6b 65 74 20 64 61 |ates a packet da| 521s 00003410 74 61 20 73 6f 75 72 63 65 2e 0a 3c 2f 70 3e 0a |ta source..

.| 521s 00003420 0a 09 09 09 09 0a 09 09 09 0a 0a 09 09 09 0a 09 |................| 521s 00003430 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 |........

func (*| 521s 00003460 50 61 63 6b 65 74 53 6f 75 72 63 65 29 20 3c 61 |PacketSource) NextP| 521s 000034c0 61 63 6b 65 74 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 |acket

..| 521s 000034d0 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 70 20 |...
func (p |
521s         000034e0  2a 50 61 63 6b 65 74 53  6f 75 72 63 65 29 20 4e  |*PacketSource) N|
521s         000034f0  65 78 74 50 61 63 6b 65  74 28 29 20 28 50 61 63  |extPacket() (Pac|
521s         00003500  6b 65 74 2c 20 65 72 72  6f 72 29 3c 2f 70 72 65  |ket, error).....

.NextPa| 521s 00003520 63 6b 65 74 20 72 65 74 75 72 6e 73 20 74 68 65 |cket returns the| 521s 00003530 20 6e 65 78 74 20 64 65 63 6f 64 65 64 20 70 61 | next decoded pa| 521s 00003540 63 6b 65 74 20 66 72 6f 6d 20 74 68 65 20 50 61 |cket from the Pa| 521s 00003550 63 6b 65 74 53 6f 75 72 63 65 2e 20 20 4f 6e 20 |cketSource. On | 521s 00003560 65 72 72 6f 72 2c 0a 69 74 20 72 65 74 75 72 6e |error,.it return| 521s 00003570 73 20 61 20 6e 69 6c 20 70 61 63 6b 65 74 20 61 |s a nil packet a| 521s 00003580 6e 64 20 61 20 6e 6f 6e 2d 6e 69 6c 20 65 72 72 |nd a non-nil err| 521s 00003590 6f 72 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 |or..

........| 521s 000035a0 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 000035b0 09 3c 68 33 20 69 64 3d 22 50 61 63 6b 65 74 53 |.

f| 521s 000035d0 75 6e 63 20 28 2a 50 61 63 6b 65 74 53 6f 75 72 |unc (*PacketSour| 521s 000035e0 63 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |ce) Packets.....
func |
521s         00003650  28 70 20 2a 50 61 63 6b  65 74 53 6f 75 72 63 65  |(p *PacketSource|
521s         00003660  29 20 50 61 63 6b 65 74  73 28 29 20 63 68 61 6e  |) Packets() chan|
521s         00003670  20 50 61 63 6b 65 74 3c  2f 70 72 65 3e 0a 09 09  | Packet
...| 521s 00003680 09 09 3c 70 3e 0a 50 61 63 6b 65 74 73 20 72 65 |..

.Packets re| 521s 00003690 74 75 72 6e 73 20 61 20 62 6c 6f 63 6b 69 6e 67 |turns a blocking| 521s 000036a0 20 63 68 61 6e 6e 65 6c 20 6f 66 20 70 61 63 6b | channel of pack| 521s 000036b0 65 74 73 2c 20 61 6c 6c 6f 77 69 6e 67 20 65 61 |ets, allowing ea| 521s 000036c0 73 79 20 69 74 65 72 61 74 69 6e 67 20 6f 76 65 |sy iterating ove| 521s 000036d0 72 0a 70 61 63 6b 65 74 73 2e 20 20 50 61 63 6b |r.packets. Pack| 521s 000036e0 65 74 73 20 77 69 6c 6c 20 62 65 20 61 73 79 6e |ets will be asyn| 521s 000036f0 63 68 72 6f 6e 6f 75 73 6c 79 20 72 65 61 64 20 |chronously read | 521s 00003700 69 6e 20 66 72 6f 6d 20 74 68 65 20 75 6e 64 65 |in from the unde| 521s 00003710 72 6c 79 69 6e 67 0a 50 61 63 6b 65 74 44 61 74 |rlying.PacketDat| 521s 00003720 61 53 6f 75 72 63 65 20 61 6e 64 20 77 72 69 74 |aSource and writ| 521s 00003730 74 65 6e 20 74 6f 20 74 68 65 20 72 65 74 75 72 |ten to the retur| 521s 00003740 6e 65 64 20 63 68 61 6e 6e 65 6c 2e 20 20 49 66 |ned channel. If| 521s 00003750 20 74 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 0a | the underlying.| 521s 00003760 50 61 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 |PacketDataSource| 521s 00003770 20 72 65 74 75 72 6e 73 20 61 6e 20 69 6f 2e 45 | returns an io.E| 521s 00003780 4f 46 20 65 72 72 6f 72 2c 20 74 68 65 20 63 68 |OF error, the ch| 521s 00003790 61 6e 6e 65 6c 20 77 69 6c 6c 20 62 65 20 63 6c |annel will be cl| 521s 000037a0 6f 73 65 64 2e 0a 49 66 20 61 6e 79 20 6f 74 68 |osed..If any oth| 521s 000037b0 65 72 20 65 72 72 6f 72 20 69 73 20 65 6e 63 6f |er error is enco| 521s 000037c0 75 6e 74 65 72 65 64 2c 20 69 74 20 69 73 20 69 |untered, it is i| 521s 000037d0 67 6e 6f 72 65 64 2e 0a 3c 2f 70 3e 0a 3c 70 72 |gnored..

.for packet := | 521s 000037f0 72 61 6e 67 65 20 70 61 63 6b 65 74 53 6f 75 72 |range packetSour| 521s 00003800 63 65 2e 50 61 63 6b 65 74 73 28 29 20 7b 0a 20 |ce.Packets() {. | 521s 00003810 20 68 61 6e 64 6c 65 50 61 63 6b 65 74 28 70 61 | handlePacket(pa| 521s 00003820 63 6b 65 74 29 20 20 2f 2f 20 44 6f 20 73 6f 6d |cket) // Do som| 521s 00003830 65 74 68 69 6e 67 20 77 69 74 68 20 65 61 63 68 |ething with each| 521s 00003840 20 70 61 63 6b 65 74 2e 0a 7d 0a 3c 2f 70 72 65 | packet..}................| 521s 00003860 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c |...............<| 521s 00003870 68 32 20 69 64 3d 22 50 61 79 6c 6f 61 64 22 3e |h2 id="Payload">| 521s 00003880 74 79 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 |type Pay| 521s 000038d0 6c 6f 61 64 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 |load

...| 521s 000038e0 09 3c 70 72 65 3e 74 79 70 65 20 50 61 79 6c 6f |.
type Paylo|
521s         000038f0  61 64 20 73 74 72 75 63  74 20 7b 0a 20 20 20 20  |ad struct {.    |
521s         00003900  44 61 74 61 20 5b 5d 62  79 74 65 0a 7d 3c 2f 70  |Data []byte.}....

.Paylo| 521s 00003920 61 64 20 69 73 20 61 20 4c 61 79 65 72 20 63 6f |ad is a Layer co| 521s 00003930 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 70 61 79 |ntaining the pay| 521s 00003940 6c 6f 61 64 20 6f 66 20 61 20 70 61 63 6b 65 74 |load of a packet| 521s 00003950 2e 20 20 54 68 65 20 64 65 66 69 6e 69 74 69 6f |. The definitio| 521s 00003960 6e 20 6f 66 0a 77 68 61 74 20 63 6f 6e 73 74 69 |n of.what consti| 521s 00003970 74 75 74 65 73 20 74 68 65 20 70 61 79 6c 6f 61 |tutes the payloa| 521s 00003980 64 20 6f 66 20 61 20 70 61 63 6b 65 74 20 64 65 |d of a packet de| 521s 00003990 70 65 6e 64 73 20 6f 6e 20 70 72 65 76 69 6f 75 |pends on previou| 521s 000039a0 73 20 6c 61 79 65 72 73 3b 20 66 6f 72 0a 54 43 |s layers; for.TC| 521s 000039b0 50 20 61 6e 64 20 55 44 50 2c 20 77 65 20 73 74 |P and UDP, we st| 521s 000039c0 6f 70 20 64 65 63 6f 64 69 6e 67 20 61 62 6f 76 |op decoding abov| 521s 000039d0 65 20 6c 61 79 65 72 20 34 20 61 6e 64 20 72 65 |e layer 4 and re| 521s 000039e0 74 75 72 6e 20 74 68 65 20 72 65 6d 61 69 6e 69 |turn the remaini| 521s 000039f0 6e 67 0a 62 79 74 65 73 20 61 73 20 61 20 50 61 |ng.bytes as a Pa| 521s 00003a00 79 6c 6f 61 64 2e 20 20 50 61 79 6c 6f 61 64 20 |yload. Payload | 521s 00003a10 69 73 20 61 6e 20 41 70 70 6c 69 63 61 74 69 6f |is an Applicatio| 521s 00003a20 6e 4c 61 79 65 72 2e 0a 3c 2f 70 3e 0a 0a 0a 09 |nLayer..

....| 521s 00003a30 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 |................| 521s 00003a40 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 |................| 521s 00003a50 3c 68 33 20 69 64 3d 22 50 61 79 6c 6f 61 64 2e |

f| 521s 00003a70 75 6e 63 20 28 2a 50 61 79 6c 6f 61 64 29 20 3c |unc (*Payload) <| 521s 00003a80 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b 67 |a href="/src/pkg| 521s 00003a90 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e |/github.com/gcon| 521s 00003aa0 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 2f 62 61 |nell/gopacket/ba| 521s 00003ab0 73 65 2e 67 6f 3f 73 3d 31 32 36 35 3a 31 33 30 |se.go?s=1265:130| 521s 00003ac0 35 23 4c 32 37 22 3e 4c 61 79 65 72 43 6f 6e 74 |5#L27">LayerCont| 521s 00003ad0 65 6e 74 73 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 |ents

...| 521s 00003ae0 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 70 20 2a |..
func (p *|
521s         00003af0  50 61 79 6c 6f 61 64 29  20 4c 61 79 65 72 43 6f  |Payload) LayerCo|
521s         00003b00  6e 74 65 6e 74 73 28 29  20 5b 5d 62 79 74 65 3c  |ntents() []byte<|
521s         00003b10  2f 70 72 65 3e 0a 09 09  09 09 0a 09 09 09 09 0a  |/pre>...........|
521s         00003b20  09 09 09 09 0a 09 09 09  0a 09 09 09 09 0a 09 09  |................|
521s         00003b30  09 09 3c 68 33 20 69 64  3d 22 50 61 79 6c 6f 61  |..

| 521s 00003b50 66 75 6e 63 20 28 2a 50 61 79 6c 6f 61 64 29 20 |func (*Payload) | 521s 00003b60 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |LayerPay| 521s 00003bb0 6c 6f 61 64 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 |load

...| 521s 00003bc0 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 70 20 2a |..
func (p *|
521s         00003bd0  50 61 79 6c 6f 61 64 29  20 4c 61 79 65 72 50 61  |Payload) LayerPa|
521s         00003be0  79 6c 6f 61 64 28 29 20  5b 5d 62 79 74 65 3c 2f  |yload() []byte............|
521s         00003c00  09 09 09 0a 09 09 09 0a  09 09 09 09 0a 09 09 09  |................|
521s         00003c10  09 3c 68 33 20 69 64 3d  22 50 61 79 6c 6f 61 64  |.

func| 521s 00003c30 20 28 2a 50 61 79 6c 6f 61 64 29 20 3c 61 20 68 | (*Payload) LayerType

.....
|
521s         00003ca0  66 75 6e 63 20 28 70 20  2a 50 61 79 6c 6f 61 64  |func (p *Payload|
521s         00003cb0  29 20 4c 61 79 65 72 54  79 70 65 28 29 20 4c 61  |) LayerType() La|
521s         00003cc0  79 65 72 54 79 70 65 3c  2f 70 72 65 3e 0a 09 09  |yerType
...| 521s 00003cd0 09 09 3c 70 3e 0a 4c 61 79 65 72 54 79 70 65 20 |..

.LayerType | 521s 00003ce0 72 65 74 75 72 6e 73 20 4c 61 79 65 72 54 79 70 |returns LayerTyp| 521s 00003cf0 65 50 61 79 6c 6f 61 64 0a 3c 2f 70 3e 0a 0a 09 |ePayload.

...| 521s 00003d00 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00003d10 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 50 61 |......

f| 521s 00003d30 75 6e 63 20 28 2a 50 61 79 6c 6f 61 64 29 20 3c |unc (*Payload) <| 521s 00003d40 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b 67 |a href="/src/pkg| 521s 00003d50 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e |/github.com/gcon| 521s 00003d60 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 2f 62 61 |nell/gopacket/ba| 521s 00003d70 73 65 2e 67 6f 3f 73 3d 31 33 38 30 3a 31 34 31 |se.go?s=1380:141| 521s 00003d80 34 23 4c 32 39 22 3e 50 61 79 6c 6f 61 64 3c 2f |4#L29">Payload

.....func (p *Payloa| 521s 00003db0 64 29 20 50 61 79 6c 6f 61 64 28 29 20 5b 5d 62 |d) Payload() []b| 521s 00003dc0 79 74 65 3c 2f 70 72 65 3e 0a 09 09 09 09 0a 09 |yte
.......| 521s 00003dd0 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00003de0 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 50 61 |......

fu| 521s 00003e00 6e 63 20 28 2a 50 61 79 6c 6f 61 64 29 20 3c 61 |nc (*Payload) String| 521s 00003e60 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 |

.....
f|
521s         00003e70  75 6e 63 20 28 70 20 2a  50 61 79 6c 6f 61 64 29  |unc (p *Payload)|
521s         00003e80  20 53 74 72 69 6e 67 28  29 20 73 74 72 69 6e 67  | String() string|
521s         00003e90  3c 2f 70 72 65 3e 0a 09  09 09 09 0a 09 09 09 09  |
..........| 521s 00003ea0 0a 09 09 09 09 0a 09 09 09 0a 09 09 0a 09 09 09 |................| 521s 00003eb0 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 |........

| 521s 00003ed0 74 79 70 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 |type Tra| 521s 00003f20 6e 73 70 6f 72 74 4c 61 79 65 72 3c 2f 61 3e 3c |nsportLayer<| 521s 00003f30 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         00003f40  65 20 54 72 61 6e 73 70  6f 72 74 4c 61 79 65 72  |e TransportLayer|
521s         00003f50  20 69 6e 74 65 72 66 61  63 65 20 7b 0a 20 20 20  | interface {.   |
521s         00003f60  20 4c 61 79 65 72 0a 20  20 20 20 54 72 61 6e 73  | Layer.    Trans|
521s         00003f70  70 6f 72 74 46 6c 6f 77  28 29 20 46 6c 6f 77 0a  |portFlow() Flow.|
521s         00003f80  7d 3c 2f 70 72 65 3e 0a  09 09 09 3c 70 3e 0a 54  |}
....

.T| 521s 00003f90 72 61 6e 73 70 6f 72 74 4c 61 79 65 72 20 69 73 |ransportLayer is| 521s 00003fa0 20 74 68 65 20 70 61 63 6b 65 74 20 6c 61 79 65 | the packet laye| 521s 00003fb0 72 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 |r corresponding | 521s 00003fc0 74 6f 20 74 68 65 20 54 43 50 2f 49 50 20 6c 61 |to the TCP/IP la| 521s 00003fd0 79 65 72 20 33 20 28 4f 53 49 0a 6c 61 79 65 72 |yer 3 (OSI.layer| 521s 00003fe0 20 34 29 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a | 4).

........| 521s 00003ff0 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 |................| 521s 00004000 09 09 0a 09 |....| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..16384..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..16344..] Version=6 TrafficClass=0 FlowLabel=100497 Length=16344 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 01 88 91 3f d8 06 40 00 00 00 00 00 00 00 00 |`...?..@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[..16312..] SrcPort=8080(http-alt) DstPort=58799 Seq=174454367 Ack=144119882 DataOffset=8 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=8962 Checksum=16352 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505270/96505084 0x05c08db605c08cfc)] Padding=[]} 521s 00000000 1f 90 e5 af 0a 65 f6 5f 08 97 18 4a 80 10 23 02 |.....e._...J..#.| 521s 00000010 3f e0 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |?...............| 521s --- Layer 4 --- 521s Payload 16312 byte(s) 521s 00000000 70 72 65 3e 66 75 6e 63 20 4e 65 77 4c 61 79 65 |pre>func NewLaye| 521s 00000010 72 43 6c 61 73 73 4d 61 70 28 74 79 70 65 73 20 |rClassMap(types | 521s 00000020 5b 5d 4c 61 79 65 72 54 79 70 65 29 20 4c 61 79 |[]LayerType) Lay| 521s 00000030 65 72 43 6c 61 73 73 4d 61 70 3c 2f 70 72 65 3e |erClassMap

| 521s 00000040 0a 09 09 09 09 3c 70 3e 0a 4e 65 77 4c 61 79 65 |.....

.NewLaye| 521s 00000050 72 43 6c 61 73 73 4d 61 70 20 63 72 65 61 74 65 |rClassMap create| 521s 00000060 73 20 61 20 4c 61 79 65 72 43 6c 61 73 73 4d 61 |s a LayerClassMa| 521s 00000070 70 20 61 6e 64 20 73 65 74 73 20 6d 61 70 5b 74 |p and sets map[t| 521s 00000080 5d 20 74 6f 20 74 72 75 65 20 66 6f 72 20 65 61 |] to true for ea| 521s 00000090 63 68 0a 74 79 70 65 20 69 6e 20 74 79 70 65 73 |ch.type in types| 521s 000000a0 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 |..

..........| 521s 000000b0 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 3c |...............<| 521s 000000c0 68 33 20 69 64 3d 22 4c 61 79 65 72 43 6c 61 73 |h3 id="LayerClas| 521s 000000d0 73 4d 61 70 2e 43 6f 6e 74 61 69 6e 73 22 3e 66 |sMap.Contains">f| 521s 000000e0 75 6e 63 20 28 4c 61 79 65 72 43 6c 61 73 73 4d |unc (LayerClassM| 521s 000000f0 61 70 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |ap) Contains.....
fun|
521s         00000160  63 20 28 6d 20 4c 61 79  65 72 43 6c 61 73 73 4d  |c (m LayerClassM|
521s         00000170  61 70 29 20 43 6f 6e 74  61 69 6e 73 28 74 20 4c  |ap) Contains(t L|
521s         00000180  61 79 65 72 54 79 70 65  29 20 62 6f 6f 6c 3c 2f  |ayerType) bool.....

.Con| 521s 000001a0 74 61 69 6e 73 20 72 65 74 75 72 6e 73 20 74 72 |tains returns tr| 521s 000001b0 75 65 20 69 66 20 74 68 65 20 67 69 76 65 6e 20 |ue if the given | 521s 000001c0 6c 61 79 65 72 20 74 79 70 65 20 73 68 6f 75 6c |layer type shoul| 521s 000001d0 64 20 62 65 20 63 6f 6e 73 69 64 65 72 65 64 20 |d be considered | 521s 000001e0 70 61 72 74 0a 6f 66 20 74 68 69 73 20 6c 61 79 |part.of this lay| 521s 000001f0 65 72 20 63 6c 61 73 73 2e 0a 3c 2f 70 3e 0a 0a |er class..

..| 521s 00000200 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00000210 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 |............

type LayerClassS| 521s 00000290 6c 69 63 65 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 |lice

...| 521s 000002a0 09 3c 70 72 65 3e 74 79 70 65 20 4c 61 79 65 72 |.
type Layer|
521s         000002b0  43 6c 61 73 73 53 6c 69  63 65 20 5b 5d 62 6f 6f  |ClassSlice []boo|
521s         000002c0  6c 3c 2f 70 72 65 3e 0a  09 09 09 3c 70 3e 0a 4c  |l
....

.L| 521s 000002d0 61 79 65 72 43 6c 61 73 73 53 6c 69 63 65 20 69 |ayerClassSlice i| 521s 000002e0 6d 70 6c 65 6d 65 6e 74 73 20 61 20 4c 61 79 65 |mplements a Laye| 521s 000002f0 72 43 6c 61 73 73 20 77 69 74 68 20 61 20 73 6c |rClass with a sl| 521s 00000300 69 63 65 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a |ice..

.......| 521s 00000310 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 |................| 521s 00000320 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 |........

func NewLayerCla| 521s 000003a0 73 73 53 6c 69 63 65 3c 2f 61 3e 3c 2f 68 33 3e |ssSlice

| 521s 000003b0 0a 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 4e |.....
func N|
521s         000003c0  65 77 4c 61 79 65 72 43  6c 61 73 73 53 6c 69 63  |ewLayerClassSlic|
521s         000003d0  65 28 74 79 70 65 73 20  5b 5d 4c 61 79 65 72 54  |e(types []LayerT|
521s         000003e0  79 70 65 29 20 4c 61 79  65 72 43 6c 61 73 73 53  |ype) LayerClassS|
521s         000003f0  6c 69 63 65 3c 2f 70 72  65 3e 0a 09 09 09 09 3c  |lice
.....<| 521s 00000400 70 3e 0a 4e 65 77 4c 61 79 65 72 43 6c 61 73 73 |p>.NewLayerClass| 521s 00000410 53 6c 69 63 65 20 63 72 65 61 74 65 73 20 61 20 |Slice creates a | 521s 00000420 6e 65 77 20 4c 61 79 65 72 43 6c 61 73 73 53 6c |new LayerClassSl| 521s 00000430 69 63 65 20 62 79 20 63 72 65 61 74 69 6e 67 20 |ice by creating | 521s 00000440 61 20 73 6c 69 63 65 20 6f 66 0a 73 69 7a 65 20 |a slice of.size | 521s 00000450 6d 61 78 28 74 79 70 65 73 29 20 61 6e 64 20 73 |max(types) and s| 521s 00000460 65 74 74 69 6e 67 20 73 6c 69 63 65 5b 74 5d 20 |etting slice[t] | 521s 00000470 74 6f 20 74 72 75 65 20 66 6f 72 20 65 61 63 68 |to true for each| 521s 00000480 20 74 79 70 65 20 74 2e 20 20 4e 6f 74 65 2c 20 | type t. Note, | 521s 00000490 69 66 0a 79 6f 75 20 69 6d 70 6c 65 6d 65 6e 74 |if.you implement| 521s 000004a0 20 79 6f 75 72 20 6f 77 6e 20 4c 61 79 65 72 54 | your own LayerT| 521s 000004b0 79 70 65 20 61 6e 64 20 67 69 76 65 20 69 74 20 |ype and give it | 521s 000004c0 61 20 68 69 67 68 20 76 61 6c 75 65 2c 20 74 68 |a high value, th| 521s 000004d0 69 73 20 57 49 4c 4c 20 63 72 65 61 74 65 0a 61 |is WILL create.a| 521s 000004e0 20 76 65 72 79 20 6c 61 72 67 65 20 73 6c 69 63 | very large slic| 521s 000004f0 65 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 |e..

.........| 521s 00000500 09 0a 0a 09 09 09 0a 09 09 09 09 0a 09 09 09 09 |................| 521s 00000510 3c 68 33 20 69 64 3d 22 4c 61 79 65 72 43 6c 61 |

func (LayerCla| 521s 00000540 73 73 53 6c 69 63 65 29 20 3c 61 20 68 72 65 66 |ssSlice) Contains| 521s 000005a0 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 |

.....
f|
521s         000005b0  75 6e 63 20 28 73 20 4c  61 79 65 72 43 6c 61 73  |unc (s LayerClas|
521s         000005c0  73 53 6c 69 63 65 29 20  43 6f 6e 74 61 69 6e 73  |sSlice) Contains|
521s         000005d0  28 74 20 4c 61 79 65 72  54 79 70 65 29 20 62 6f  |(t LayerType) bo|
521s         000005e0  6f 6c 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |ol
.....

| 521s 000005f0 0a 43 6f 6e 74 61 69 6e 73 20 72 65 74 75 72 6e |.Contains return| 521s 00000600 73 20 74 72 75 65 20 69 66 20 74 68 65 20 67 69 |s true if the gi| 521s 00000610 76 65 6e 20 6c 61 79 65 72 20 74 79 70 65 20 73 |ven layer type s| 521s 00000620 68 6f 75 6c 64 20 62 65 20 63 6f 6e 73 69 64 65 |hould be conside| 521s 00000630 72 65 64 20 70 61 72 74 0a 6f 66 20 74 68 69 73 |red part.of this| 521s 00000640 20 6c 61 79 65 72 20 63 6c 61 73 73 2e 0a 3c 2f | layer class................| 521s 00000660 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00000670 3c 68 32 20 69 64 3d 22 4c 61 79 65 72 54 79 70 |

type LayerType<| 521s 000006e0 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 70 |/h2>....
typ|
521s         000006f0  65 20 4c 61 79 65 72 54  79 70 65 20 69 6e 74 36  |e LayerType int6|
521s         00000700  34 3c 2f 70 72 65 3e 0a  09 09 09 3c 70 3e 0a 4c  |4
....

.L| 521s 00000710 61 79 65 72 54 79 70 65 20 69 73 20 61 20 75 6e |ayerType is a un| 521s 00000720 69 71 75 65 20 69 64 65 6e 74 69 66 69 65 72 20 |ique identifier | 521s 00000730 66 6f 72 20 65 61 63 68 20 74 79 70 65 20 6f 66 |for each type of| 521s 00000740 20 6c 61 79 65 72 2e 20 20 54 68 69 73 20 65 6e | layer. This en| 521s 00000750 75 6d 65 72 61 74 69 6f 6e 0a 64 6f 65 73 20 6e |umeration.does n| 521s 00000760 6f 74 20 6d 61 74 63 68 20 77 69 74 68 20 61 6e |ot match with an| 521s 00000770 79 20 65 78 74 65 72 6e 61 6c 6c 79 20 61 76 61 |y externally ava| 521s 00000780 69 6c 61 62 6c 65 20 6e 75 6d 62 65 72 69 6e 67 |ilable numbering| 521s 00000790 20 73 63 68 65 6d 65 2e 2e 2e 20 69 74 26 23 33 | scheme... it| 521s 000007a0 39 3b 73 20 73 6f 6c 65 6c 79 0a 75 73 61 62 6c |9;s solely.usabl| 521s 000007b0 65 2f 75 73 65 66 75 6c 20 77 69 74 68 69 6e 20 |e/useful within | 521s 000007c0 74 68 69 73 20 6c 69 62 72 61 72 79 20 61 73 20 |this library as | 521s 000007d0 61 20 6d 65 61 6e 73 20 66 6f 72 20 72 65 71 75 |a means for requ| 521s 000007e0 65 73 74 69 6e 67 20 6c 61 79 65 72 20 74 79 70 |esting layer typ| 521s 000007f0 65 73 0a 28 73 65 65 20 50 61 63 6b 65 74 2e 4c |es.(see Packet.L| 521s 00000800 61 79 65 72 29 20 61 6e 64 20 64 65 74 65 72 6d |ayer) and determ| 521s 00000810 69 6e 69 6e 67 20 77 68 69 63 68 20 74 79 70 65 |ining which type| 521s 00000820 73 20 6f 66 20 6c 61 79 65 72 73 20 68 61 76 65 |s of layers have| 521s 00000830 20 62 65 65 6e 20 64 65 63 6f 64 65 64 2e 0a 3c | been decoded..<| 521s 00000840 2f 70 3e 0a 3c 70 3e 0a 4e 65 77 20 4c 61 79 65 |/p>.

.New Laye| 521s 00000850 72 54 79 70 65 73 20 6d 61 79 20 62 65 20 63 72 |rTypes may be cr| 521s 00000860 65 61 74 65 64 20 62 79 20 63 61 6c 6c 69 6e 67 |eated by calling| 521s 00000870 20 67 6f 70 61 63 6b 65 74 2e 52 65 67 69 73 74 | gopacket.Regist| 521s 00000880 65 72 4c 61 79 65 72 54 79 70 65 2e 0a 3c 2f 70 |erLayerType.................| 521s 000008a0 09 3c 70 72 65 3e 76 61 72 20 4c 61 79 65 72 54 |.

var LayerT|
521s         000008b0  79 70 65 44 65 63 6f 64  65 46 61 69 6c 75 72 65  |ypeDecodeFailure|
521s         000008c0  20 4c 61 79 65 72 54 79  70 65 20 3d 20 52 65 67  | LayerType = Reg|
521s         000008d0  69 73 74 65 72 4c 61 79  65 72 54 79 70 65 28 30  |isterLayerType(0|
521s         000008e0  2c 20 4c 61 79 65 72 54  79 70 65 4d 65 74 61 64  |, LayerTypeMetad|
521s         000008f0  61 74 61 7b 26 23 33 34  3b 44 65 63 6f 64 65 20  |ata{"Decode |
521s         00000900  46 61 69 6c 75 72 65 26  23 33 34 3b 2c 20 44 65  |Failure", De|
521s         00000910  63 6f 64 65 55 6e 6b 6e  6f 77 6e 7d 29 3c 2f 70  |codeUnknown}).....

.Laye| 521s 00000930 72 54 79 70 65 44 65 63 6f 64 65 46 61 69 6c 75 |rTypeDecodeFailu| 521s 00000940 72 65 20 69 73 20 74 68 65 20 6c 61 79 65 72 20 |re is the layer | 521s 00000950 74 79 70 65 20 66 6f 72 20 74 68 65 20 64 65 66 |type for the def| 521s 00000960 61 75 6c 74 20 65 72 72 6f 72 20 6c 61 79 65 72 |ault error layer| 521s 00000970 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 0a 09 09 09 09 |..

..........| 521s 00000980 3c 70 72 65 3e 76 61 72 20 4c 61 79 65 72 54 79 |
var LayerTy|
521s         00000990  70 65 50 61 79 6c 6f 61  64 20 4c 61 79 65 72 54  |pePayload LayerT|
521s         000009a0  79 70 65 20 3d 20 52 65  67 69 73 74 65 72 4c 61  |ype = RegisterLa|
521s         000009b0  79 65 72 54 79 70 65 28  31 2c 20 4c 61 79 65 72  |yerType(1, Layer|
521s         000009c0  54 79 70 65 4d 65 74 61  64 61 74 61 7b 26 23 33  |TypeMetadata{|
521s         000009d0  34 3b 50 61 79 6c 6f 61  64 26 23 33 34 3b 2c 20  |4;Payload", |
521s         000009e0  44 65 63 6f 64 65 50 61  79 6c 6f 61 64 7d 29 3c  |DecodePayload})<|
521s         000009f0  2f 70 72 65 3e 0a 09 09  09 09 3c 70 3e 0a 4c 61  |/pre>.....

.La| 521s 00000a00 79 65 72 54 79 70 65 50 61 79 6c 6f 61 64 20 69 |yerTypePayload i| 521s 00000a10 73 20 74 68 65 20 6c 61 79 65 72 20 74 79 70 65 |s the layer type| 521s 00000a20 20 66 6f 72 20 61 20 70 61 79 6c 6f 61 64 20 74 | for a payload t| 521s 00000a30 68 61 74 20 77 65 20 64 6f 6e 26 23 33 39 3b 74 |hat we don't| 521s 00000a40 20 74 72 79 20 74 6f 20 64 65 63 6f 64 65 0a 62 | try to decode.b| 521s 00000a50 75 74 20 74 72 65 61 74 20 61 73 20 61 20 73 75 |ut treat as a su| 521s 00000a60 63 63 65 73 73 2c 20 49 45 3a 20 61 6e 20 61 70 |ccess, IE: an ap| 521s 00000a70 70 6c 69 63 61 74 69 6f 6e 2d 6c 65 76 65 6c 20 |plication-level | 521s 00000a80 70 61 79 6c 6f 61 64 2e 0a 3c 2f 70 3e 0a 0a 09 |payload..

...| 521s 00000a90 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 |................| 521s 00000aa0 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 52 65 |......

func RegisterLayer| 521s 00000b20 54 79 70 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 |Type

...| 521s 00000b30 09 09 3c 70 72 65 3e 66 75 6e 63 20 52 65 67 69 |..
func Regi|
521s         00000b40  73 74 65 72 4c 61 79 65  72 54 79 70 65 28 6e 75  |sterLayerType(nu|
521s         00000b50  6d 20 69 6e 74 2c 20 6d  65 74 61 20 4c 61 79 65  |m int, meta Laye|
521s         00000b60  72 54 79 70 65 4d 65 74  61 64 61 74 61 29 20 4c  |rTypeMetadata) L|
521s         00000b70  61 79 65 72 54 79 70 65  3c 2f 70 72 65 3e 0a 09  |ayerType
..| 521s 00000b80 09 09 09 3c 70 3e 0a 52 65 67 69 73 74 65 72 4c |...

.RegisterL| 521s 00000b90 61 79 65 72 54 79 70 65 20 63 72 65 61 74 65 73 |ayerType creates| 521s 00000ba0 20 61 20 6e 65 77 20 6c 61 79 65 72 20 74 79 70 | a new layer typ| 521s 00000bb0 65 20 61 6e 64 20 72 65 67 69 73 74 65 72 73 20 |e and registers | 521s 00000bc0 69 74 20 67 6c 6f 62 61 6c 6c 79 2e 0a 54 68 65 |it globally..The| 521s 00000bd0 20 6e 75 6d 62 65 72 20 70 61 73 73 65 64 20 69 | number passed i| 521s 00000be0 6e 20 6d 75 73 74 20 62 65 20 75 6e 69 71 75 65 |n must be unique| 521s 00000bf0 2c 20 6f 72 20 61 20 72 75 6e 74 69 6d 65 20 70 |, or a runtime p| 521s 00000c00 61 6e 69 63 20 77 69 6c 6c 20 6f 63 63 75 72 2e |anic will occur.| 521s 00000c10 20 20 4e 75 6d 62 65 72 73 0a 30 2d 39 39 39 20 | Numbers.0-999 | 521s 00000c20 61 72 65 20 72 65 73 65 72 76 65 64 20 66 6f 72 |are reserved for| 521s 00000c30 20 74 68 65 20 67 6f 70 61 63 6b 65 74 20 6c 69 | the gopacket li| 521s 00000c40 62 72 61 72 79 2e 20 20 4e 75 6d 62 65 72 73 20 |brary. Numbers | 521s 00000c50 31 30 30 30 2d 31 39 39 39 20 73 68 6f 75 6c 64 |1000-1999 should| 521s 00000c60 20 62 65 0a 75 73 65 64 20 66 6f 72 20 63 6f 6d | be.used for com| 521s 00000c70 6d 6f 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 2d |mon application-| 521s 00000c80 73 70 65 63 69 66 69 63 20 74 79 70 65 73 2c 20 |specific types, | 521s 00000c90 61 6e 64 20 61 72 65 20 76 65 72 79 20 66 61 73 |and are very fas| 521s 00000ca0 74 2e 20 20 41 6e 79 20 6f 74 68 65 72 0a 6e 75 |t. Any other.nu| 521s 00000cb0 6d 62 65 72 20 28 6e 65 67 61 74 69 76 65 20 6f |mber (negative o| 521s 00000cc0 72 20 26 67 74 3b 3d 20 32 30 30 30 29 20 6d 61 |r >= 2000) ma| 521s 00000cd0 79 20 62 65 20 75 73 65 64 20 66 6f 72 20 75 6e |y be used for un| 521s 00000ce0 63 6f 6d 6d 6f 6e 20 61 70 70 6c 69 63 61 74 69 |common applicati| 521s 00000cf0 6f 6e 2d 73 70 65 63 69 66 69 63 0a 74 79 70 65 |on-specific.type| 521s 00000d00 73 2c 20 61 6e 64 20 61 72 65 20 73 6f 6d 65 77 |s, and are somew| 521s 00000d10 68 61 74 20 73 6c 6f 77 65 72 20 28 74 68 65 79 |hat slower (they| 521s 00000d20 20 72 65 71 75 69 72 65 20 61 20 6d 61 70 20 6c | require a map l| 521s 00000d30 6f 6f 6b 75 70 20 6f 76 65 72 20 61 6e 20 61 72 |ookup over an ar| 521s 00000d40 72 61 79 0a 69 6e 64 65 78 29 2e 0a 3c 2f 70 3e |ray.index)..

| 521s 00000d50 0a 0a 09 09 09 09 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 00000d60 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d |.........

func (LayerTy| 521s 00000d90 70 65 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |pe) Decode

| 521s 00000df0 0a 09 09 09 09 3c 70 72 65 3e 66 75 6e 63 20 28 |.....
func (|
521s         00000e00  74 20 4c 61 79 65 72 54  79 70 65 29 20 44 65 63  |t LayerType) Dec|
521s         00000e10  6f 64 65 28 64 61 74 61  20 5b 5d 62 79 74 65 2c  |ode(data []byte,|
521s         00000e20  20 63 20 50 61 63 6b 65  74 42 75 69 6c 64 65 72  | c PacketBuilder|
521s         00000e30  29 20 65 72 72 6f 72 3c  2f 70 72 65 3e 0a 09 09  |) error
...| 521s 00000e40 09 09 3c 70 3e 0a 44 65 63 6f 64 65 20 64 65 63 |..

.Decode dec| 521s 00000e50 6f 64 65 73 20 74 68 65 20 67 69 76 65 6e 20 64 |odes the given d| 521s 00000e60 61 74 61 20 75 73 69 6e 67 20 74 68 65 20 64 65 |ata using the de| 521s 00000e70 63 6f 64 65 72 20 72 65 67 69 73 74 65 72 65 64 |coder registered| 521s 00000e80 20 77 69 74 68 20 74 68 65 20 6c 61 79 65 72 0a | with the layer.| 521s 00000e90 74 79 70 65 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 |type..

......| 521s 00000ea0 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 0a 09 |................| 521s 00000eb0 09 09 09 3c 68 33 20 69 64 3d 22 4c 61 79 65 72 |...

fun| 521s 00000ed0 63 20 28 4c 61 79 65 72 54 79 70 65 29 20 3c 61 |c (LayerType) Strin| 521s 00000f30 67 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c |g

.....<| 521s 00000f40 70 72 65 3e 66 75 6e 63 20 28 74 20 4c 61 79 65 |pre>func (t Laye| 521s 00000f50 72 54 79 70 65 29 20 53 74 72 69 6e 67 28 29 20 |rType) String() | 521s 00000f60 28 73 20 73 74 72 69 6e 67 29 3c 2f 70 72 65 3e |(s string)
| 521s 00000f70 0a 09 09 09 09 3c 70 3e 0a 53 74 72 69 6e 67 20 |.....

.String | 521s 00000f80 72 65 74 75 72 6e 73 20 74 68 65 20 73 74 72 69 |returns the stri| 521s 00000f90 6e 67 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 |ng associated wi| 521s 00000fa0 74 68 20 74 68 69 73 20 6c 61 79 65 72 20 74 79 |th this layer ty| 521s 00000fb0 70 65 2e 0a 3c 2f 70 3e 0a 0a 09 09 09 09 0a 09 |pe..

........| 521s 00000fc0 09 09 09 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 |................| 521s 00000fd0 09 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 4c 61 |......

type | 521s 00001040 4c 61 79 65 72 54 79 70 65 4d 65 74 61 64 61 74 |LayerTypeMetadat| 521s 00001050 61 3c 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 |a

....type LayerTyp| 521s 00001070 65 4d 65 74 61 64 61 74 61 20 73 74 72 75 63 74 |eMetadata struct| 521s 00001080 20 7b 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c 61 | {. // | 521s 000010a0 4e 61 6d 65 20 69 73 20 74 68 65 20 73 74 72 69 |Name is the stri| 521s 000010b0 6e 67 20 72 65 74 75 72 6e 65 64 20 62 79 20 65 |ng returned by e| 521s 000010c0 61 63 68 20 6c 61 79 65 72 20 74 79 70 65 26 23 |ach layer type&#| 521s 000010d0 33 39 3b 73 20 53 74 72 69 6e 67 20 6d 65 74 68 |39;s String meth| 521s 000010e0 6f 64 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 4e |od.. N| 521s 000010f0 61 6d 65 20 73 74 72 69 6e 67 0a 20 20 20 20 3c |ame string. <| 521s 00001100 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 6f 6d 6d |span class="comm| 521s 00001110 65 6e 74 22 3e 2f 2f 20 44 65 63 6f 64 65 72 20 |ent">// Decoder | 521s 00001120 69 73 20 74 68 65 20 64 65 63 6f 64 65 72 20 74 |is the decoder t| 521s 00001130 6f 20 75 73 65 20 77 68 65 6e 20 74 68 65 20 6c |o use when the l| 521s 00001140 61 79 65 72 20 74 79 70 65 20 69 73 20 70 61 73 |ayer type is pas| 521s 00001150 73 65 64 20 69 6e 20 61 73 20 61 3c 2f 73 70 61 |sed in as a. // | 521s 00001180 44 65 63 6f 64 65 72 2e 3c 2f 73 70 61 6e 3e 0a |Decoder..| 521s 00001190 20 20 20 20 44 65 63 6f 64 65 72 20 44 65 63 6f | Decoder Deco| 521s 000011a0 64 65 72 0a 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c |der.}
....<| 521s 000011b0 70 3e 0a 4c 61 79 65 72 54 79 70 65 4d 65 74 61 |p>.LayerTypeMeta| 521s 000011c0 64 61 74 61 20 63 6f 6e 74 61 69 6e 73 20 6d 65 |data contains me| 521s 000011d0 74 61 64 61 74 61 20 61 73 73 6f 63 69 61 74 65 |tadata associate| 521s 000011e0 64 20 77 69 74 68 20 65 61 63 68 20 4c 61 79 65 |d with each Laye| 521s 000011f0 72 54 79 70 65 2e 0a 3c 2f 70 3e 0a 0a 0a 09 09 |rType..

.....| 521s 00001200 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 |................| 521s 00001210 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00001220 0a 09 09 09 3c 68 32 20 69 64 3d 22 4c 69 6e 6b |....

type LinkLayer

....
t|
521s         000012a0  79 70 65 20 4c 69 6e 6b  4c 61 79 65 72 20 69 6e  |ype LinkLayer in|
521s         000012b0  74 65 72 66 61 63 65 20  7b 0a 20 20 20 20 4c 61  |terface {.    La|
521s         000012c0  79 65 72 0a 20 20 20 20  4c 69 6e 6b 46 6c 6f 77  |yer.    LinkFlow|
521s         000012d0  28 29 20 46 6c 6f 77 0a  7d 3c 2f 70 72 65 3e 0a  |() Flow.}
.| 521s 000012e0 09 09 09 3c 70 3e 0a 4c 69 6e 6b 4c 61 79 65 72 |...

.LinkLayer| 521s 000012f0 20 69 73 20 74 68 65 20 70 61 63 6b 65 74 20 6c | is the packet l| 521s 00001300 61 79 65 72 20 63 6f 72 72 65 73 70 6f 6e 64 69 |ayer correspondi| 521s 00001310 6e 67 20 74 6f 20 54 43 50 2f 49 50 20 6c 61 79 |ng to TCP/IP lay| 521s 00001320 65 72 20 31 20 28 4f 53 49 20 6c 61 79 65 72 20 |er 1 (OSI layer | 521s 00001330 32 29 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 |2).

.........| 521s 00001340 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 |................| 521s 00001350 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00001360 3c 68 32 20 69 64 3d 22 4e 65 74 77 6f 72 6b 4c |

type NetworkLayer<| 521s 000013d0 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type NetworkLay| 521s 000013f0 65 72 20 69 6e 74 65 72 66 61 63 65 20 7b 0a 20 |er interface {. | 521s 00001400 20 20 20 4c 61 79 65 72 0a 20 20 20 20 4e 65 74 | Layer. Net| 521s 00001410 77 6f 72 6b 46 6c 6f 77 28 29 20 46 6c 6f 77 0a |workFlow() Flow.| 521s 00001420 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c 70 3e 0a 4e |}
....

.N| 521s 00001430 65 74 77 6f 72 6b 4c 61 79 65 72 20 69 73 20 74 |etworkLayer is t| 521s 00001440 68 65 20 70 61 63 6b 65 74 20 6c 61 79 65 72 20 |he packet layer | 521s 00001450 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f |corresponding to| 521s 00001460 20 54 43 50 2f 49 50 20 6c 61 79 65 72 20 32 20 | TCP/IP layer 2 | 521s 00001470 28 4f 53 49 0a 6c 61 79 65 72 20 33 29 0a 3c 2f |(OSI.layer 3)...............| 521s 00001490 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a |................| 521s 000014a0 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 |...........

type | 521s 000014c0 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |Packet<| 521s 00001510 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type Packet int| 521s 00001530 65 72 66 61 63 65 20 7b 0a 20 20 20 20 66 6d 74 |erface {. fmt| 521s 00001540 2e 53 74 72 69 6e 67 65 72 0a 20 20 20 20 3c 73 |.Stringer. // Data retu| 521s 00001570 72 6e 73 20 61 6c 6c 20 64 61 74 61 20 61 73 73 |rns all data ass| 521s 00001580 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 69 |ociated with thi| 521s 00001590 73 20 70 61 63 6b 65 74 3c 2f 73 70 61 6e 3e 0a |s packet.| 521s 000015a0 20 20 20 20 44 61 74 61 28 29 20 5b 5d 62 79 74 | Data() []byt| 521s 000015b0 65 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 |e. // L| 521s 000015d0 61 79 65 72 73 20 72 65 74 75 72 6e 73 20 61 6c |ayers returns al| 521s 000015e0 6c 20 6c 61 79 65 72 73 20 69 6e 20 74 68 69 73 |l layers in this| 521s 000015f0 20 70 61 63 6b 65 74 2c 20 63 6f 6d 70 75 74 69 | packet, computi| 521s 00001600 6e 67 20 74 68 65 6d 20 61 73 20 6e 65 63 65 73 |ng them as neces| 521s 00001610 73 61 72 79 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 |sary. | 521s 00001620 4c 61 79 65 72 73 28 29 20 5b 5d 4c 61 79 65 72 |Layers() []Layer| 521s 00001630 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 |. // La| 521s 00001650 79 65 72 20 72 65 74 75 72 6e 73 20 74 68 65 20 |yer returns the | 521s 00001660 66 69 72 73 74 20 6c 61 79 65 72 20 69 6e 20 74 |first layer in t| 521s 00001670 68 69 73 20 70 61 63 6b 65 74 20 6f 66 20 74 68 |his packet of th| 521s 00001680 65 20 67 69 76 65 6e 20 74 79 70 65 2c 20 6f 72 |e given type, or| 521s 00001690 20 6e 69 6c 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 | nil. | 521s 000016a0 4c 61 79 65 72 28 4c 61 79 65 72 54 79 70 65 29 |Layer(LayerType)| 521s 000016b0 20 4c 61 79 65 72 0a 20 20 20 20 3c 73 70 61 6e | Layer. // LayerClass r| 521s 000016e0 65 74 75 72 6e 73 20 74 68 65 20 66 69 72 73 74 |eturns the first| 521s 000016f0 20 6c 61 79 65 72 20 69 6e 20 74 68 69 73 20 70 | layer in this p| 521s 00001700 61 63 6b 65 74 20 6f 66 20 74 68 65 20 67 69 76 |acket of the giv| 521s 00001710 65 6e 20 63 6c 61 73 73 2c 3c 2f 73 70 61 6e 3e |en class,| 521s 00001720 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 |. // or| 521s 00001740 20 6e 69 6c 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 | nil.. | 521s 00001750 20 4c 61 79 65 72 43 6c 61 73 73 28 4c 61 79 65 | LayerClass(Laye| 521s 00001760 72 43 6c 61 73 73 29 20 4c 61 79 65 72 0a 20 20 |rClass) Layer. | 521s 00001770 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // Captu| 521s 00001790 72 65 49 6e 66 6f 20 72 65 74 75 72 6e 73 20 74 |reInfo returns t| 521s 000017a0 68 65 20 63 61 70 75 74 75 72 65 20 69 6e 66 6f |he caputure info| 521s 000017b0 72 6d 61 74 69 6f 6e 20 66 6f 72 20 74 68 69 73 |rmation for this| 521s 000017c0 20 70 61 63 6b 65 74 2e 20 20 54 68 69 73 20 72 | packet. This r| 521s 000017d0 65 74 75 72 6e 73 3c 2f 73 70 61 6e 3e 0a 20 20 |eturns. | 521s 000017e0 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // a poi| 521s 00001800 6e 74 65 72 20 74 6f 20 74 68 65 20 70 61 63 6b |nter to the pack| 521s 00001810 65 74 26 23 33 39 3b 73 20 73 74 72 75 63 74 2c |et's struct,| 521s 00001820 20 73 6f 20 69 74 20 63 61 6e 20 62 65 20 75 73 | so it can be us| 521s 00001830 65 64 20 62 6f 74 68 20 66 6f 72 20 72 65 61 64 |ed both for read| 521s 00001840 69 6e 67 20 61 6e 64 3c 2f 73 70 61 6e 3e 0a 20 |ing and. | 521s 00001850 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 | // writ| 521s 00001870 69 6e 67 20 74 68 65 20 69 6e 66 6f 72 6d 61 74 |ing the informat| 521s 00001880 69 6f 6e 2e 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 |ion.. | 521s 00001890 43 61 70 74 75 72 65 49 6e 66 6f 28 29 20 2a 43 |CaptureInfo() *C| 521s 000018a0 61 70 74 75 72 65 49 6e 66 6f 0a 0a 20 20 20 20 |aptureInfo.. | 521s 000018b0 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 6f 6d |// LinkLay| 521s 000018d0 65 72 20 72 65 74 75 72 6e 73 20 74 68 65 20 66 |er returns the f| 521s 000018e0 69 72 73 74 20 6c 69 6e 6b 20 6c 61 79 65 72 20 |irst link layer | 521s 000018f0 69 6e 20 74 68 65 20 70 61 63 6b 65 74 3c 2f 73 |in the packet. LinkLay| 521s 00001910 65 72 28 29 20 4c 69 6e 6b 4c 61 79 65 72 0a 20 |er() LinkLayer. | 521s 00001920 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 | // Netw| 521s 00001940 6f 72 6b 4c 61 79 65 72 20 72 65 74 75 72 6e 73 |orkLayer returns| 521s 00001950 20 74 68 65 20 66 69 72 73 74 20 6e 65 74 77 6f | the first netwo| 521s 00001960 72 6b 20 6c 61 79 65 72 20 69 6e 20 74 68 65 20 |rk layer in the | 521s 00001970 70 61 63 6b 65 74 3c 2f 73 70 61 6e 3e 0a 20 20 |packet. | 521s 00001980 20 20 4e 65 74 77 6f 72 6b 4c 61 79 65 72 28 29 | NetworkLayer()| 521s 00001990 20 4e 65 74 77 6f 72 6b 4c 61 79 65 72 0a 20 20 | NetworkLayer. | 521s 000019a0 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // Trans| 521s 000019c0 70 6f 72 74 4c 61 79 65 72 20 72 65 74 75 72 6e |portLayer return| 521s 000019d0 73 20 74 68 65 20 66 69 72 73 74 20 74 72 61 6e |s the first tran| 521s 000019e0 73 70 6f 72 74 20 6c 61 79 65 72 20 69 6e 20 74 |sport layer in t| 521s 000019f0 68 65 20 70 61 63 6b 65 74 3c 2f 73 70 61 6e 3e |he packet| 521s 00001a00 0a 20 20 20 20 54 72 61 6e 73 70 6f 72 74 4c 61 |. TransportLa| 521s 00001a10 79 65 72 28 29 20 54 72 61 6e 73 70 6f 72 74 4c |yer() TransportL| 521s 00001a20 61 79 65 72 0a 20 20 20 20 3c 73 70 61 6e 20 63 |ayer. /| 521s 00001a40 2f 20 41 70 70 6c 69 63 61 74 69 6f 6e 4c 61 79 |/ ApplicationLay| 521s 00001a50 65 72 20 72 65 74 75 72 6e 73 20 74 68 65 20 66 |er returns the f| 521s 00001a60 69 72 73 74 20 61 70 70 6c 69 63 61 74 69 6f 6e |irst application| 521s 00001a70 20 6c 61 79 65 72 20 69 6e 20 74 68 65 20 70 61 | layer in the pa| 521s 00001a80 63 6b 65 74 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 |cket. | 521s 00001a90 41 70 70 6c 69 63 61 74 69 6f 6e 4c 61 79 65 72 |ApplicationLayer| 521s 00001aa0 28 29 20 41 70 70 6c 69 63 61 74 69 6f 6e 4c 61 |() ApplicationLa| 521s 00001ab0 79 65 72 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c |yer. //| 521s 00001ad0 20 45 72 72 6f 72 4c 61 79 65 72 20 69 73 20 70 | ErrorLayer is p| 521s 00001ae0 61 72 74 69 63 75 6c 61 72 6c 79 20 75 73 65 66 |articularly usef| 521s 00001af0 75 6c 2c 20 73 69 6e 63 65 20 69 74 20 72 65 74 |ul, since it ret| 521s 00001b00 75 72 6e 73 20 6e 69 6c 20 69 66 20 74 68 65 20 |urns nil if the | 521s 00001b10 70 61 63 6b 65 74 3c 2f 73 70 61 6e 3e 0a 20 20 |packet. | 521s 00001b20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // was f| 521s 00001b40 75 6c 6c 79 20 64 65 63 6f 64 65 64 20 73 75 63 |ully decoded suc| 521s 00001b50 63 65 73 73 66 75 6c 6c 79 2c 20 61 6e 64 20 6e |cessfully, and n| 521s 00001b60 6f 6e 2d 6e 69 6c 20 69 66 20 61 6e 20 65 72 72 |on-nil if an err| 521s 00001b70 6f 72 20 77 61 73 20 65 6e 63 6f 75 6e 74 65 72 |or was encounter| 521s 00001b80 65 64 3c 2f 73 70 61 6e 3e 0a 20 20 20 20 3c 73 |ed. // in decodi| 521s 00001bb0 6e 67 20 61 6e 64 20 74 68 65 20 70 61 63 6b 65 |ng and the packe| 521s 00001bc0 74 20 77 61 73 20 6f 6e 6c 79 20 70 61 72 74 69 |t was only parti| 521s 00001bd0 61 6c 6c 79 20 64 65 63 6f 64 65 64 2e 20 20 54 |ally decoded. T| 521s 00001be0 68 75 73 2c 20 69 74 73 20 6f 75 74 70 75 74 3c |hus, its output<| 521s 00001bf0 2f 73 70 61 6e 3e 0a 20 20 20 20 3c 73 70 61 6e |/span>. // can be used | 521s 00001c20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 69 66 20 |to determine if | 521s 00001c30 74 68 65 20 65 6e 74 69 72 65 20 70 61 63 6b 65 |the entire packe| 521s 00001c40 74 20 77 61 73 20 61 62 6c 65 20 74 6f 20 62 65 |t was able to be| 521s 00001c50 20 64 65 63 6f 64 65 64 2e 3c 2f 73 70 61 6e 3e | decoded.| 521s 00001c60 0a 20 20 20 20 45 72 72 6f 72 4c 61 79 65 72 28 |. ErrorLayer(| 521s 00001c70 29 20 45 72 72 6f 72 4c 61 79 65 72 0a 7d 3c 2f |) ErrorLayer.}....

.Pack| 521s 00001c90 65 74 20 69 73 20 74 68 65 20 70 72 69 6d 61 72 |et is the primar| 521s 00001ca0 79 20 6f 62 6a 65 63 74 20 75 73 65 64 20 62 79 |y object used by| 521s 00001cb0 20 67 6f 70 61 63 6b 65 74 2e 20 20 50 61 63 6b | gopacket. Pack| 521s 00001cc0 65 74 73 20 61 72 65 20 63 72 65 61 74 65 64 20 |ets are created | 521s 00001cd0 62 79 20 61 0a 44 65 63 6f 64 65 72 26 23 33 39 |by a.Decoder'| 521s 00001ce0 3b 73 20 44 65 63 6f 64 65 20 63 61 6c 6c 2e 20 |;s Decode call. | 521s 00001cf0 20 41 20 70 61 63 6b 65 74 20 69 73 20 6d 61 64 | A packet is mad| 521s 00001d00 65 20 75 70 20 6f 66 20 61 20 73 65 74 20 6f 66 |e up of a set of| 521s 00001d10 20 44 61 74 61 2c 20 77 68 69 63 68 0a 69 73 20 | Data, which.is | 521s 00001d20 62 72 6f 6b 65 6e 20 69 6e 74 6f 20 61 20 6e 75 |broken into a nu| 521s 00001d30 6d 62 65 72 20 6f 66 20 4c 61 79 65 72 73 20 61 |mber of Layers a| 521s 00001d40 73 20 69 74 20 69 73 20 64 65 63 6f 64 65 64 2e |s it is decoded.| 521s 00001d50 0a 3c 2f 70 3e 0a 0a 0a 09 09 09 0a 0a 09 09 09 |.

...........| 521s 00001d60 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a |................| 521s 00001d70 09 09 09 09 3c 68 33 20 69 64 3d 22 4e 65 77 50 |....

func NewPacke| 521s 00001de0 74 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c |t

.....<| 521s 00001df0 70 72 65 3e 66 75 6e 63 20 4e 65 77 50 61 63 6b |pre>func NewPack| 521s 00001e00 65 74 28 64 61 74 61 20 5b 5d 62 79 74 65 2c 20 |et(data []byte, | 521s 00001e10 66 69 72 73 74 4c 61 79 65 72 44 65 63 6f 64 65 |firstLayerDecode| 521s 00001e20 72 20 44 65 63 6f 64 65 72 2c 20 6f 70 74 69 6f |r Decoder, optio| 521s 00001e30 6e 73 20 44 65 63 6f 64 65 4f 70 74 69 6f 6e 73 |ns DecodeOptions| 521s 00001e40 29 20 50 61 63 6b 65 74 3c 2f 70 72 65 3e 0a 09 |) Packet
..| 521s 00001e50 09 09 09 3c 70 3e 0a 4e 65 77 50 61 63 6b 65 74 |...

.NewPacket| 521s 00001e60 20 63 72 65 61 74 65 73 20 61 20 6e 65 77 20 50 | creates a new P| 521s 00001e70 61 63 6b 65 74 20 6f 62 6a 65 63 74 20 66 72 6f |acket object fro| 521s 00001e80 6d 20 61 20 73 65 74 20 6f 66 20 62 79 74 65 73 |m a set of bytes| 521s 00001e90 2e 20 20 54 68 65 0a 66 69 72 73 74 4c 61 79 65 |. The.firstLaye| 521s 00001ea0 72 44 65 63 6f 64 65 72 20 74 65 6c 6c 73 20 69 |rDecoder tells i| 521s 00001eb0 74 20 68 6f 77 20 74 6f 20 69 6e 74 65 72 70 72 |t how to interpr| 521s 00001ec0 65 74 20 74 68 65 20 66 69 72 73 74 20 6c 61 79 |et the first lay| 521s 00001ed0 65 72 20 66 72 6f 6d 20 74 68 65 20 62 79 74 65 |er from the byte| 521s 00001ee0 73 2c 0a 66 75 74 75 72 65 20 6c 61 79 65 72 73 |s,.future layers| 521s 00001ef0 20 77 69 6c 6c 20 62 65 20 67 65 6e 65 72 61 74 | will be generat| 521s 00001f00 65 64 20 66 72 6f 6d 20 74 68 61 74 20 66 69 72 |ed from that fir| 521s 00001f10 73 74 20 6c 61 79 65 72 20 61 75 74 6f 6d 61 74 |st layer automat| 521s 00001f20 69 63 61 6c 6c 79 2e 0a 3c 2f 70 3e 0a 0a 09 09 |ically..

....| 521s 00001f30 09 09 0a 09 09 09 0a 0a 09 09 09 0a 09 09 0a 09 |................| 521s 00001f40 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 69 64 |..........

type P| 521s 00001fb0 61 63 6b 65 74 42 75 69 6c 64 65 72 3c 2f 61 3e |acketBuilder| 521s 00001fc0 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 3e 74 79 |

....
ty|
521s         00001fd0  70 65 20 50 61 63 6b 65  74 42 75 69 6c 64 65 72  |pe PacketBuilder|
521s         00001fe0  20 69 6e 74 65 72 66 61  63 65 20 7b 0a 20 20 20  | interface {.   |
521s         00001ff0  20 3c 73 70 61 6e 20 63  6c 61 73 73 3d 22 63 6f  | // AddLay|
521s         00002010  65 72 20 73 68 6f 75 6c  64 20 62 65 20 63 61 6c  |er should be cal|
521s         00002020  6c 65 64 20 62 79 20 61  20 64 65 63 6f 64 65 72  |led by a decoder|
521s         00002030  20 69 6d 6d 65 64 69 61  74 65 6c 79 20 75 70 6f  | immediately upo|
521s         00002040  6e 20 73 75 63 63 65 73  73 66 75 6c 3c 2f 73 70  |n successful.    //|
521s         00002070  20 64 65 63 6f 64 69 6e  67 20 6f 66 20 61 20 6c  | decoding of a l|
521s         00002080  61 79 65 72 2e 3c 2f 73  70 61 6e 3e 0a 20 20 20  |ayer..   |
521s         00002090  20 41 64 64 4c 61 79 65  72 28 6c 20 4c 61 79 65  | AddLayer(l Laye|
521s         000020a0  72 29 0a 20 20 20 20 3c  73 70 61 6e 20 63 6c 61  |r).    // |
521s         000020c0  54 68 65 20 66 6f 6c 6c  6f 77 69 6e 67 20 66 75  |The following fu|
521s         000020d0  6e 63 74 69 6f 6e 73 20  73 65 74 20 74 68 65 20  |nctions set the |
521s         000020e0  76 61 72 69 6f 75 73 20  73 70 65 63 69 66 69 63  |various specific|
521s         000020f0  20 6c 61 79 65 72 73 20  69 6e 20 74 68 65 20 66  | layers in the f|
521s         00002100  69 6e 61 6c 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |inal.    |
521s         00002110  3c 73 70 61 6e 20 63 6c  61 73 73 3d 22 63 6f 6d  |// packet.|
521s         00002130  20 20 4e 6f 74 65 20 74  68 61 74 20 69 66 20 6d  |  Note that if m|
521s         00002140  61 6e 79 20 6c 61 79 65  72 73 20 63 61 6c 6c 20  |any layers call |
521s         00002150  53 65 74 58 2c 20 74 68  65 20 66 69 72 73 74 20  |SetX, the first |
521s         00002160  63 61 6c 6c 20 69 73 20  6b 65 70 74 20 61 6e 64  |call is kept and|
521s         00002170  20 61 6c 6c 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  | all.    |
521s         00002180  3c 73 70 61 6e 20 63 6c  61 73 73 3d 22 63 6f 6d  |// other c|
521s         000021a0  61 6c 6c 73 20 61 72 65  20 69 67 6e 6f 72 65 64  |alls are ignored|
521s         000021b0  2e 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 53 65 74  |..    Set|
521s         000021c0  4c 69 6e 6b 4c 61 79 65  72 28 4c 69 6e 6b 4c 61  |LinkLayer(LinkLa|
521s         000021d0  79 65 72 29 0a 20 20 20  20 53 65 74 4e 65 74 77  |yer).    SetNetw|
521s         000021e0  6f 72 6b 4c 61 79 65 72  28 4e 65 74 77 6f 72 6b  |orkLayer(Network|
521s         000021f0  4c 61 79 65 72 29 0a 20  20 20 20 53 65 74 54 72  |Layer).    SetTr|
521s         00002200  61 6e 73 70 6f 72 74 4c  61 79 65 72 28 54 72 61  |ansportLayer(Tra|
521s         00002210  6e 73 70 6f 72 74 4c 61  79 65 72 29 0a 20 20 20  |nsportLayer).   |
521s         00002220  20 53 65 74 41 70 70 6c  69 63 61 74 69 6f 6e 4c  | SetApplicationL|
521s         00002230  61 79 65 72 28 41 70 70  6c 69 63 61 74 69 6f 6e  |ayer(Application|
521s         00002240  4c 61 79 65 72 29 0a 20  20 20 20 53 65 74 45 72  |Layer).    SetEr|
521s         00002250  72 6f 72 4c 61 79 65 72  28 45 72 72 6f 72 4c 61  |rorLayer(ErrorLa|
521s         00002260  79 65 72 29 0a 20 20 20  20 3c 73 70 61 6e 20 63  |yer).    /|
521s         00002280  2f 20 4e 65 78 74 44 65  63 6f 64 65 72 20 73 68  |/ NextDecoder sh|
521s         00002290  6f 75 6c 64 20 62 65 20  63 61 6c 6c 65 64 20 62  |ould be called b|
521s         000022a0  79 20 61 20 64 65 63 6f  64 65 72 20 77 68 65 6e  |y a decoder when|
521s         000022b0  20 74 68 65 79 26 23 33  39 3b 72 65 20 64 6f 6e  | they're don|
521s         000022c0  65 20 64 65 63 6f 64 69  6e 67 20 61 3c 2f 73 70  |e decoding a.    //|
521s         000022f0  20 70 61 63 6b 65 74 20  6c 61 79 65 72 20 62 75  | packet layer bu|
521s         00002300  74 20 6e 6f 74 20 64 6f  6e 65 20 77 69 74 68 20  |t not done with |
521s         00002310  64 65 63 6f 64 69 6e 67  20 74 68 65 20 65 6e 74  |decoding the ent|
521s         00002320  69 72 65 20 70 61 63 6b  65 74 2e 20 20 54 68 65  |ire packet.  The|
521s         00002330  20 6e 65 78 74 3c 2f 73  70 61 6e 3e 0a 20 20 20  | next.   |
521s         00002340  20 3c 73 70 61 6e 20 63  6c 61 73 73 3d 22 63 6f  | // decode|
521s         00002360  72 20 77 69 6c 6c 20 62  65 20 63 61 6c 6c 65 64  |r will be called|
521s         00002370  20 74 6f 20 64 65 63 6f  64 65 20 74 68 65 20 6c  | to decode the l|
521s         00002380  61 73 74 20 41 64 64 4c  61 79 65 72 26 23 33 39  |ast AddLayer'|
521s         00002390  3b 73 20 4c 61 79 65 72  50 61 79 6c 6f 61 64 2e  |;s LayerPayload.|
521s         000023a0  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // Because of |
521s         000023d0  74 68 69 73 2c 20 4e 65  78 74 44 65 63 6f 64 65  |this, NextDecode|
521s         000023e0  72 20 6d 75 73 74 20 6f  6e 6c 79 20 62 65 20 63  |r must only be c|
521s         000023f0  61 6c 6c 65 64 20 6f 6e  63 65 20 61 6c 6c 20 6f  |alled once all o|
521s         00002400  74 68 65 72 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |ther.    |
521s         00002410  3c 73 70 61 6e 20 63 6c  61 73 73 3d 22 63 6f 6d  |// PacketB|
521s         00002430  75 69 6c 64 65 72 20 63  61 6c 6c 73 20 68 61 76  |uilder calls hav|
521s         00002440  65 20 62 65 65 6e 20 6d  61 64 65 2e 20 20 53 65  |e been made.  Se|
521s         00002450  74 2a 4c 61 79 65 72 20  61 6e 64 20 41 64 64 4c  |t*Layer and AddL|
521s         00002460  61 79 65 72 20 63 61 6c  6c 73 20 61 66 74 65 72  |ayer calls after|
521s         00002470  3c 2f 73 70 61 6e 3e 0a  20 20 20 20 3c 73 70 61  |.    // NextDecoder|
521s         000024a0  20 63 61 6c 6c 73 20 77  69 6c 6c 20 62 65 68 61  | calls will beha|
521s         000024b0  76 65 20 69 6e 63 6f 72  72 65 63 74 6c 79 2e 3c  |ve incorrectly.<|
521s         000024c0  2f 73 70 61 6e 3e 0a 20  20 20 20 4e 65 78 74 44  |/span>.    NextD|
521s         000024d0  65 63 6f 64 65 72 28 6e  65 78 74 20 44 65 63 6f  |ecoder(next Deco|
521s         000024e0  64 65 72 29 20 65 72 72  6f 72 0a 7d 3c 2f 70 72  |der) error.}....

.Packet| 521s 00002500 42 75 69 6c 64 65 72 20 69 73 20 75 73 65 64 20 |Builder is used | 521s 00002510 62 79 20 6c 61 79 65 72 20 64 65 63 6f 64 65 72 |by layer decoder| 521s 00002520 73 20 74 6f 20 73 74 6f 72 65 20 74 68 65 20 6c |s to store the l| 521s 00002530 61 79 65 72 73 20 74 68 65 79 26 23 33 39 3b 76 |ayers they'v| 521s 00002540 65 20 64 65 63 6f 64 65 64 2c 0a 61 6e 64 20 74 |e decoded,.and t| 521s 00002550 6f 20 64 65 66 65 72 20 66 75 74 75 72 65 20 64 |o defer future d| 521s 00002560 65 63 6f 64 69 6e 67 20 76 69 61 20 4e 65 78 74 |ecoding via Next| 521s 00002570 44 65 63 6f 64 65 72 2e 0a 54 79 70 69 63 61 6c |Decoder..Typical| 521s 00002580 6c 79 2c 20 74 68 65 20 70 61 74 74 65 72 6e 20 |ly, the pattern | 521s 00002590 66 6f 72 20 75 73 65 20 69 73 3a 0a 3c 2f 70 3e |for use is:.

| 521s 000025a0 0a 3c 70 72 65 3e 66 75 6e 63 20 28 6d 20 2a 6d |.
func (m *m|
521s         000025b0  79 44 65 63 6f 64 65 72  29 20 44 65 63 6f 64 65  |yDecoder) Decode|
521s         000025c0  28 64 61 74 61 20 5b 5d  62 79 74 65 2c 20 70 20  |(data []byte, p |
521s         000025d0  50 61 63 6b 65 74 42 75  69 6c 64 65 72 29 20 65  |PacketBuilder) e|
521s         000025e0  72 72 6f 72 20 7b 0a 20  20 69 66 20 6d 79 4c 61  |rror {.  if myLa|
521s         000025f0  79 65 72 2c 20 65 72 72  20 3a 3d 20 6d 79 44 65  |yer, err := myDe|
521s         00002600  63 6f 64 69 6e 67 4c 6f  67 69 63 28 64 61 74 61  |codingLogic(data|
521s         00002610  29 3b 20 65 72 72 20 21  3d 20 6e 69 6c 20 7b 0a  |); err != nil {.|
521s         00002620  20 20 20 20 72 65 74 75  72 6e 20 65 72 72 0a 20  |    return err. |
521s         00002630  20 7d 20 65 6c 73 65 20  7b 0a 20 20 20 20 70 2e  | } else {.    p.|
521s         00002640  41 64 64 4c 61 79 65 72  28 6d 79 4c 61 79 65 72  |AddLayer(myLayer|
521s         00002650  29 0a 20 20 7d 0a 20 20  2f 2f 20 6d 61 79 62 65  |).  }.  // maybe|
521s         00002660  20 64 6f 20 74 68 69 73  2c 20 69 66 20 6d 79 4c  | do this, if myL|
521s         00002670  61 79 65 72 20 69 73 20  61 20 4c 69 6e 6b 4c 61  |ayer is a LinkLa|
521s         00002680  79 65 72 0a 20 20 70 2e  53 65 74 4c 69 6e 6b 4c  |yer.  p.SetLinkL|
521s         00002690  61 79 65 72 28 6d 79 4c  61 79 65 72 29 0a 20 20  |ayer(myLayer).  |
521s         000026a0  72 65 74 75 72 6e 20 70  2e 4e 65 78 74 44 65 63  |return p.NextDec|
521s         000026b0  6f 64 65 72 28 6e 65 78  74 44 65 63 6f 64 65 72  |oder(nextDecoder|
521s         000026c0  29 0a 7d 0a 3c 2f 70 72  65 3e 0a 0a 0a 09 09 09  |).}.
......| 521s 000026d0 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 000026e0 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 09 0a |................| 521s 000026f0 09 09 09 3c 68 32 20 69 64 3d 22 50 61 63 6b 65 |...

typ| 521s 00002710 65 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |e P| 521s 00002760 61 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 3c |acketDataSource<| 521s 00002770 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type PacketData| 521s 00002790 53 6f 75 72 63 65 20 69 6e 74 65 72 66 61 63 65 |Source interface| 521s 000027a0 20 7b 0a 20 20 20 20 3c 73 70 61 6e 20 63 6c 61 | {. // | 521s 000027c0 52 65 61 64 50 61 63 6b 65 74 44 61 74 61 20 72 |ReadPacketData r| 521s 000027d0 65 74 75 72 6e 73 20 74 68 65 20 6e 65 78 74 20 |eturns the next | 521s 000027e0 70 61 63 6b 65 74 20 61 76 61 69 6c 61 62 6c 65 |packet available| 521s 000027f0 20 66 72 6f 6d 20 74 68 69 73 20 64 61 74 61 20 | from this data | 521s 00002800 73 6f 75 72 63 65 2e 3c 2f 73 70 61 6e 3e 0a 20 |source.. | 521s 00002810 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 | // It r| 521s 00002830 65 74 75 72 6e 73 3a 3c 2f 73 70 61 6e 3e 0a 20 |eturns:. | 521s 00002840 20 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 | // dat| 521s 00002860 61 3a 20 20 54 68 65 20 62 79 74 65 73 20 6f 66 |a: The bytes of| 521s 00002870 20 61 6e 20 69 6e 64 69 76 69 64 75 61 6c 20 70 | an individual p| 521s 00002880 61 63 6b 65 74 2e 3c 2f 73 70 61 6e 3e 0a 20 20 |acket.. | 521s 00002890 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // ci: | 521s 000028b0 20 4d 65 74 61 64 61 74 61 20 61 62 6f 75 74 20 | Metadata about | 521s 000028c0 74 68 65 20 63 61 70 74 75 72 65 3c 2f 73 70 61 |the capture
. // | 521s 000028f0 20 65 72 72 3a 20 20 41 6e 20 65 72 72 6f 72 20 | err: An error | 521s 00002900 65 6e 63 6f 75 6e 74 65 72 65 64 20 77 68 69 6c |encountered whil| 521s 00002910 65 20 72 65 61 64 69 6e 67 20 70 61 63 6b 65 74 |e reading packet| 521s 00002920 20 64 61 74 61 2e 20 20 49 66 20 65 72 72 20 21 | data. If err !| 521s 00002930 3d 20 6e 69 6c 2c 3c 2f 73 70 61 6e 3e 0a 20 20 |= nil,. | 521s 00002940 20 20 3c 73 70 61 6e 20 63 6c 61 73 73 3d 22 63 | // th| 521s 00002960 65 6e 20 64 61 74 61 2f 63 69 20 77 69 6c 6c 20 |en data/ci will | 521s 00002970 62 65 20 69 67 6e 6f 72 65 64 2e 3c 2f 73 70 61 |be ignored.. ReadPacke| 521s 00002990 74 44 61 74 61 28 29 20 28 64 61 74 61 20 5b 5d |tData() (data []| 521s 000029a0 62 79 74 65 2c 20 63 69 20 43 61 70 74 75 72 65 |byte, ci Capture| 521s 000029b0 49 6e 66 6f 2c 20 65 72 72 20 65 72 72 6f 72 29 |Info, err error)| 521s 000029c0 0a 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c 70 3e 0a |.}
....

.| 521s 000029d0 50 61 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 |PacketDataSource| 521s 000029e0 20 69 73 20 61 6e 20 69 6e 74 65 72 66 61 63 65 | is an interface| 521s 000029f0 20 66 6f 72 20 73 6f 6d 65 20 73 6f 75 72 63 65 | for some source| 521s 00002a00 20 6f 66 20 70 61 63 6b 65 74 20 64 61 74 61 2e | of packet data.| 521s 00002a10 20 20 55 73 65 72 73 20 6d 61 79 0a 63 72 65 61 | Users may.crea| 521s 00002a20 74 65 20 74 68 65 69 72 20 6f 77 6e 20 69 6d 70 |te their own imp| 521s 00002a30 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2c 20 6f 72 |lementations, or| 521s 00002a40 20 75 73 65 20 74 68 65 20 65 78 69 73 74 69 6e | use the existin| 521s 00002a50 67 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e |g implementation| 521s 00002a60 73 20 69 6e 0a 67 6f 70 61 63 6b 65 74 2f 70 63 |s in.gopacket/pc| 521s 00002a70 61 70 20 28 6c 69 62 70 63 61 70 2c 20 61 6c 6c |ap (libpcap, all| 521s 00002a80 6f 77 73 20 72 65 61 64 69 6e 67 20 66 72 6f 6d |ows reading from| 521s 00002a90 20 6c 69 76 65 20 69 6e 74 65 72 66 61 63 65 73 | live interfaces| 521s 00002aa0 20 6f 72 20 66 72 6f 6d 0a 70 63 61 70 20 66 69 | or from.pcap fi| 521s 00002ab0 6c 65 73 29 20 6f 72 20 67 6f 70 61 63 6b 65 74 |les) or gopacket| 521s 00002ac0 2f 70 66 72 69 6e 67 20 28 50 46 5f 52 49 4e 47 |/pfring (PF_RING| 521s 00002ad0 2c 20 61 6c 6c 6f 77 73 20 72 65 61 64 69 6e 67 |, allows reading| 521s 00002ae0 20 66 72 6f 6d 20 6c 69 76 65 0a 69 6e 74 65 72 | from live.inter| 521s 00002af0 66 61 63 65 73 29 2e 0a 3c 2f 70 3e 0a 0a 0a 09 |faces)..

....| 521s 00002b00 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 |................| 521s 00002b10 09 0a 0a 09 09 09 0a 09 09 0a 09 09 09 0a 09 09 |................| 521s 00002b20 09 0a 09 09 09 3c 68 32 20 69 64 3d 22 50 61 63 |.....

type | 521s 00002b40 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |Pac| 521s 00002b90 6b 65 74 53 6f 75 72 63 65 3c 2f 61 3e 3c 2f 68 |ketSource....
type |
521s         00002bb0  50 61 63 6b 65 74 53 6f  75 72 63 65 20 73 74 72  |PacketSource str|
521s         00002bc0  75 63 74 20 7b 0a 0a 20  20 20 20 3c 73 70 61 6e  |uct {..    // DecodeOption|
521s         00002bf0  73 20 69 73 20 74 68 65  20 73 65 74 20 6f 66 20  |s is the set of |
521s         00002c00  6f 70 74 69 6f 6e 73 20  74 6f 20 75 73 65 20 66  |options to use f|
521s         00002c10  6f 72 20 64 65 63 6f 64  69 6e 67 20 65 61 63 68  |or decoding each|
521s         00002c20  20 70 69 65 63 65 3c 2f  73 70 61 6e 3e 0a 20 20  | piece.  |
521s         00002c30  20 20 3c 73 70 61 6e 20  63 6c 61 73 73 3d 22 63  |  // of pa|
521s         00002c50  63 6b 65 74 20 64 61 74  61 2e 20 20 54 68 69 73  |cket data.  This|
521s         00002c60  20 63 61 6e 2f 73 68 6f  75 6c 64 20 62 65 20 63  | can/should be c|
521s         00002c70  68 61 6e 67 65 64 20 62  79 20 74 68 65 20 75 73  |hanged by the us|
521s         00002c80  65 72 20 74 6f 20 72 65  66 6c 65 63 74 20 74 68  |er to reflect th|
521s         00002c90  65 3c 2f 73 70 61 6e 3e  0a 20 20 20 20 3c 73 70  |e.    // way packet|
521s         00002cc0  73 20 73 68 6f 75 6c 64  20 62 65 20 64 65 63 6f  |s should be deco|
521s         00002cd0  64 65 64 2e 3c 2f 73 70  61 6e 3e 0a 20 20 20 20  |ded..    |
521s         00002ce0  44 65 63 6f 64 65 4f 70  74 69 6f 6e 73 0a 20 20  |DecodeOptions.  |
521s         00002cf0  20 20 3c 73 70 61 6e 20  63 6c 61 73 73 3d 22 63  |  // conta|
521s         00002d10  69 6e 73 20 66 69 6c 74  65 72 65 64 20 6f 72 20  |ins filtered or |
521s         00002d20  75 6e 65 78 70 6f 72 74  65 64 20 66 69 65 6c 64  |unexported field|
521s         00002d30  73 3c 2f 73 70 61 6e 3e  0a 7d 3c 2f 70 72 65 3e  |s.}
| 521s 00002d40 0a 09 09 09 3c 70 3e 0a 50 61 63 6b 65 74 53 6f |....

.PacketSo| 521s 00002d50 75 72 63 65 20 72 65 61 64 73 20 69 6e 20 70 61 |urce reads in pa| 521s 00002d60 63 6b 65 74 73 20 66 72 6f 6d 20 61 20 50 61 63 |ckets from a Pac| 521s 00002d70 6b 65 74 44 61 74 61 53 6f 75 72 63 65 2c 20 64 |ketDataSource, d| 521s 00002d80 65 63 6f 64 65 73 20 74 68 65 6d 2c 20 61 6e 64 |ecodes them, and| 521s 00002d90 0a 72 65 74 75 72 6e 73 20 74 68 65 6d 2e 0a 3c |.returns them..<| 521s 00002da0 2f 70 3e 0a 3c 70 3e 0a 54 68 65 72 65 20 61 72 |/p>.

.There ar| 521s 00002db0 65 20 63 75 72 72 65 6e 74 6c 79 20 74 77 6f 20 |e currently two | 521s 00002dc0 64 69 66 66 65 72 65 6e 74 20 6d 65 74 68 6f 64 |different method| 521s 00002dd0 73 20 66 6f 72 20 72 65 61 64 69 6e 67 20 70 61 |s for reading pa| 521s 00002de0 63 6b 65 74 73 20 69 6e 20 74 68 72 6f 75 67 68 |ckets in through| 521s 00002df0 0a 61 20 50 61 63 6b 65 74 53 6f 75 72 63 65 3a |.a PacketSource:| 521s 00002e00 0a 3c 2f 70 3e 0a 3c 68 33 20 69 64 3d 22 52 65 |.

.

Rea| 521s 00002e30 64 69 6e 67 20 57 69 74 68 20 50 61 63 6b 65 74 |ding With Packet| 521s 00002e40 73 20 46 75 6e 63 74 69 6f 6e 3c 2f 68 33 3e 0a |s Function

.| 521s 00002e50 3c 70 3e 0a 54 68 69 73 20 6d 65 74 68 6f 64 20 |

.This method | 521s 00002e60 69 73 20 74 68 65 20 6d 6f 73 74 20 63 6f 6e 76 |is the most conv| 521s 00002e70 65 6e 69 65 6e 74 20 61 6e 64 20 65 61 73 69 65 |enient and easie| 521s 00002e80 73 74 20 74 6f 20 63 6f 64 65 2c 20 62 75 74 20 |st to code, but | 521s 00002e90 6c 61 63 6b 73 0a 66 6c 65 78 69 62 69 6c 69 74 |lacks.flexibilit| 521s 00002ea0 79 2e 20 20 50 61 63 6b 65 74 73 20 72 65 74 75 |y. Packets retu| 521s 00002eb0 72 6e 73 20 61 20 26 23 33 39 3b 63 68 61 6e 20 |rns a 'chan | 521s 00002ec0 50 61 63 6b 65 74 26 23 33 39 3b 2c 20 74 68 65 |Packet', the| 521s 00002ed0 6e 20 61 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 |n asynchronously| 521s 00002ee0 20 77 72 69 74 65 73 0a 70 61 63 6b 65 74 73 20 | writes.packets | 521s 00002ef0 69 6e 74 6f 20 74 68 61 74 20 63 68 61 6e 6e 65 |into that channe| 521s 00002f00 6c 2e 20 20 50 61 63 6b 65 74 73 20 75 73 65 73 |l. Packets uses| 521s 00002f10 20 61 20 62 6c 6f 63 6b 69 6e 67 20 63 68 61 6e | a blocking chan| 521s 00002f20 6e 65 6c 2c 20 61 6e 64 20 63 6c 6f 73 65 73 0a |nel, and closes.| 521s 00002f30 69 74 20 69 66 20 61 6e 20 69 6f 2e 45 4f 46 20 |it if an io.EOF | 521s 00002f40 69 73 20 72 65 74 75 72 6e 65 64 20 62 79 20 74 |is returned by t| 521s 00002f50 68 65 20 75 6e 64 65 72 6c 79 69 6e 67 20 50 61 |he underlying Pa| 521s 00002f60 63 6b 65 74 44 61 74 61 53 6f 75 72 63 65 2e 20 |cketDataSource. | 521s 00002f70 20 41 6c 6c 20 6f 74 68 65 72 0a 50 61 63 6b 65 | All other.Packe| 521s 00002f80 74 44 61 74 61 53 6f 75 72 63 65 20 65 72 72 6f |tDataSource erro| 521s 00002f90 72 73 20 61 72 65 20 69 67 6e 6f 72 65 64 20 61 |rs are ignored a| 521s 00002fa0 6e 64 20 64 69 73 63 61 72 64 65 64 2e 0a 3c 2f |nd discarded...

for pack|
521s         00002fc0  65 74 20 3a 3d 20 72 61  6e 67 65 20 70 61 63 6b  |et := range pack|
521s         00002fd0  65 74 53 6f 75 72 63 65  2e 50 61 63 6b 65 74 73  |etSource.Packets|
521s         00002fe0  28 29 20 7b 0a 20 20 2e  2e 2e 0a 7d 0a 3c 2f 70  |() {.  ....}..

Re| 521s 00003020 61 64 69 6e 67 20 57 69 74 68 20 4e 65 78 74 50 |ading With NextP| 521s 00003030 61 63 6b 65 74 20 46 75 6e 63 74 69 6f 6e 3c 2f |acket Function.

.This met| 521s 00003050 68 6f 64 20 69 73 20 74 68 65 20 6d 6f 73 74 20 |hod is the most | 521s 00003060 66 6c 65 78 69 62 6c 65 2c 20 61 6e 64 20 65 78 |flexible, and ex| 521s 00003070 70 6f 73 65 73 20 65 72 72 6f 72 73 20 74 68 61 |poses errors tha| 521s 00003080 74 20 6d 61 79 20 62 65 0a 65 6e 63 6f 75 6e 74 |t may be.encount| 521s 00003090 65 72 65 64 20 62 79 20 74 68 65 20 75 6e 64 65 |ered by the unde| 521s 000030a0 72 6c 79 69 6e 67 20 50 61 63 6b 65 74 44 61 74 |rlying PacketDat| 521s 000030b0 61 53 6f 75 72 63 65 2e 20 20 49 74 26 23 33 39 |aSource. It'| 521s 000030c0 3b 73 20 61 6c 73 6f 20 74 68 65 20 66 61 73 74 |;s also the fast| 521s 000030d0 65 73 74 0a 69 6e 20 61 20 74 69 67 68 74 20 6c |est.in a tight l| 521s 000030e0 6f 6f 70 2c 20 73 69 6e 63 65 20 69 74 20 64 6f |oop, since it do| 521s 000030f0 65 73 6e 26 23 33 39 3b 74 20 68 61 76 65 20 74 |esn't have t| 521s 00003100 68 65 20 6f 76 65 72 68 65 61 64 20 6f 66 20 61 |he overhead of a| 521s 00003110 20 63 68 61 6e 6e 65 6c 0a 72 65 61 64 2f 77 72 | channel.read/wr| 521s 00003120 69 74 65 2e 20 20 48 6f 77 65 76 65 72 2c 20 69 |ite. However, i| 521s 00003130 74 20 72 65 71 75 69 72 65 73 20 74 68 65 20 75 |t requires the u| 521s 00003140 73 65 72 20 74 6f 20 68 61 6e 64 6c 65 20 65 72 |ser to handle er| 521s 00003150 72 6f 72 73 2c 20 6d 6f 73 74 0a 69 6d 70 6f 72 |rors, most.impor| 521s 00003160 74 61 6e 74 6c 79 20 74 68 65 20 69 6f 2e 45 4f |tantly the io.EO| 521s 00003170 46 20 65 72 72 6f 72 20 69 6e 20 63 61 73 65 73 |F error in cases| 521s 00003180 20 77 68 65 72 65 20 70 61 63 6b 65 74 73 20 61 | where packets a| 521s 00003190 72 65 20 62 65 69 6e 67 20 72 65 61 64 20 66 72 |re being read fr| 521s 000031a0 6f 6d 0a 61 20 66 69 6c 65 2e 0a 3c 2f 70 3e 0a |om.a file..

.| 521s 000031b0 3c 70 72 65 3e 66 6f 72 20 7b 0a 20 20 70 61 63 |
for {.  pac|
521s         000031c0  6b 65 74 2c 20 65 72 72  20 3a 3d 20 70 61 63 6b  |ket, err := pack|
521s         000031d0  65 74 53 6f 75 72 63 65  2e 4e 65 78 74 50 61 63  |etSource.NextPac|
521s         000031e0  6b 65 74 28 29 20 7b 0a  20 20 69 66 20 65 72 72  |ket() {.  if err|
521s         000031f0  20 3d 3d 20 69 6f 2e 45  4f 46 20 7b 0a 20 20 20  | == io.EOF {.   |
521s         00003200  20 62 72 65 61 6b 0a 20  20 7d 20 65 6c 73 65 20  | break.  } else |
521s         00003210  69 66 20 65 72 72 20 21  3d 20 6e 69 6c 20 7b 0a  |if err != nil {.|
521s         00003220  20 20 20 20 6c 6f 67 2e  50 72 69 6e 74 6c 6e 28  |    log.Println(|
521s         00003230  26 23 33 34 3b 45 72 72  6f 72 3a 26 23 33 34 3b  |"Error:"|
521s         00003240  2c 20 65 72 72 29 0a 20  20 20 20 63 6f 6e 74 69  |, err).    conti|
521s         00003250  6e 75 65 0a 20 20 7d 0a  20 20 68 61 6e 64 6c 65  |nue.  }.  handle|
521s         00003260  50 61 63 6b 65 74 28 70  61 63 6b 65 74 29 20 20  |Packet(packet)  |
521s         00003270  2f 2f 20 44 6f 20 73 6f  6d 65 74 68 69 6e 67 20  |// Do something |
521s         00003280  77 69 74 68 20 65 61 63  68 20 70 61 63 6b 65 74  |with each packet|
521s         00003290  2e 0a 7d 0a 3c 2f 70 72  65 3e 0a 0a 0a 09 09 09  |..}.
......| 521s 000032a0 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a |................| 521s 000032b0 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 3d |.........

func NewPacketSou| 521s 00003330 72 63 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 |rce

....| 521s 00003340 09 3c 70 72 65 3e 66 75 6e 63 20 4e 65 77 50 61 |.
func NewPa|
521s         00003350  63 6b 65 74 53 6f 75 72  63 65 28 73 6f 75 72 63  |cketSource(sourc|
521s         00003360  65 20 50 61 63 6b 65 74  44 61 74 61 53 6f 75 72  |e PacketDataSour|
521s         00003370  63 65 2c 20 64 65 63 6f  64 65 72 20 44 65 63 6f  |ce, decoder Deco|
521s         00003380  64 65 72 29 20 2a 50 61  63 6b 65 74 53 6f 75 72  |der) *PacketSour|
521s         00003390  63 65 3c 2f 70 72 65 3e  0a 09 09 09 09 3c 70 3e  |ce
.....

| 521s 000033a0 0a 4e 65 77 50 61 63 6b 65 74 53 6f 75 72 63 65 |.NewPacketSource| 521s 000033b0 20 63 72 65 61 74 65 73 20 61 20 70 61 63 6b 65 | creates a packe| 521s 000033c0 74 20 64 61 74 61 20 73 6f 75 72 63 65 2e 0a 3c |t data source..<| 521s 000033d0 2f 70 3e 0a 0a 09 09 09 09 0a 09 09 09 0a 0a 09 |/p>.............| 521s 000033e0 09 09 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 |............

fun| 521s 00003410 63 20 28 2a 50 61 63 6b 65 74 53 6f 75 72 63 65 |c (*PacketSource| 521s 00003420 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |) N| 521s 00003470 65 78 74 50 61 63 6b 65 74 3c 2f 61 3e 3c 2f 68 |extPacket.....
func|
521s         00003490  20 28 70 20 2a 50 61 63  6b 65 74 53 6f 75 72 63  | (p *PacketSourc|
521s         000034a0  65 29 20 4e 65 78 74 50  61 63 6b 65 74 28 29 20  |e) NextPacket() |
521s         000034b0  28 50 61 63 6b 65 74 2c  20 65 72 72 6f 72 29 3c  |(Packet, error)<|
521s         000034c0  2f 70 72 65 3e 0a 09 09  09 09 3c 70 3e 0a 4e 65  |/pre>.....

.Ne| 521s 000034d0 78 74 50 61 63 6b 65 74 20 72 65 74 75 72 6e 73 |xtPacket returns| 521s 000034e0 20 74 68 65 20 6e 65 78 74 20 64 65 63 6f 64 65 | the next decode| 521s 000034f0 64 20 70 61 63 6b 65 74 20 66 72 6f 6d 20 74 68 |d packet from th| 521s 00003500 65 20 50 61 63 6b 65 74 53 6f 75 72 63 65 2e 20 |e PacketSource. | 521s 00003510 20 4f 6e 20 65 72 72 6f 72 2c 0a 69 74 20 72 65 | On error,.it re| 521s 00003520 74 75 72 6e 73 20 61 20 6e 69 6c 20 70 61 63 6b |turns a nil pack| 521s 00003530 65 74 20 61 6e 64 20 61 20 6e 6f 6e 2d 6e 69 6c |et and a non-nil| 521s 00003540 20 65 72 72 6f 72 2e 0a 3c 2f 70 3e 0a 0a 09 09 | error..

....| 521s 00003550 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 00003560 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 50 61 63 |.....

func (*Packet| 521s 00003590 53 6f 75 72 63 65 29 20 3c 61 20 68 72 65 66 3d |Source) Packets| 521s 000035f0 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 72 65 3e 66 |

.....
f|
521s         00003600  75 6e 63 20 28 70 20 2a  50 61 63 6b 65 74 53 6f  |unc (p *PacketSo|
521s         00003610  75 72 63 65 29 20 50 61  63 6b 65 74 73 28 29 20  |urce) Packets() |
521s         00003620  63 68 61 6e 20 50 61 63  6b 65 74 3c 2f 70 72 65  |chan Packet.....

.Packet| 521s 00003640 73 20 72 65 74 75 72 6e 73 20 61 20 62 6c 6f 63 |s returns a bloc| 521s 00003650 6b 69 6e 67 20 63 68 61 6e 6e 65 6c 20 6f 66 20 |king channel of | 521s 00003660 70 61 63 6b 65 74 73 2c 20 61 6c 6c 6f 77 69 6e |packets, allowin| 521s 00003670 67 20 65 61 73 79 20 69 74 65 72 61 74 69 6e 67 |g easy iterating| 521s 00003680 20 6f 76 65 72 0a 70 61 63 6b 65 74 73 2e 20 20 | over.packets. | 521s 00003690 50 61 63 6b 65 74 73 20 77 69 6c 6c 20 62 65 20 |Packets will be | 521s 000036a0 61 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 20 72 |asynchronously r| 521s 000036b0 65 61 64 20 69 6e 20 66 72 6f 6d 20 74 68 65 20 |ead in from the | 521s 000036c0 75 6e 64 65 72 6c 79 69 6e 67 0a 50 61 63 6b 65 |underlying.Packe| 521s 000036d0 74 44 61 74 61 53 6f 75 72 63 65 20 61 6e 64 20 |tDataSource and | 521s 000036e0 77 72 69 74 74 65 6e 20 74 6f 20 74 68 65 20 72 |written to the r| 521s 000036f0 65 74 75 72 6e 65 64 20 63 68 61 6e 6e 65 6c 2e |eturned channel.| 521s 00003700 20 20 49 66 20 74 68 65 20 75 6e 64 65 72 6c 79 | If the underly| 521s 00003710 69 6e 67 0a 50 61 63 6b 65 74 44 61 74 61 53 6f |ing.PacketDataSo| 521s 00003720 75 72 63 65 20 72 65 74 75 72 6e 73 20 61 6e 20 |urce returns an | 521s 00003730 69 6f 2e 45 4f 46 20 65 72 72 6f 72 2c 20 74 68 |io.EOF error, th| 521s 00003740 65 20 63 68 61 6e 6e 65 6c 20 77 69 6c 6c 20 62 |e channel will b| 521s 00003750 65 20 63 6c 6f 73 65 64 2e 0a 49 66 20 61 6e 79 |e closed..If any| 521s 00003760 20 6f 74 68 65 72 20 65 72 72 6f 72 20 69 73 20 | other error is | 521s 00003770 65 6e 63 6f 75 6e 74 65 72 65 64 2c 20 69 74 20 |encountered, it | 521s 00003780 69 73 20 69 67 6e 6f 72 65 64 2e 0a 3c 2f 70 3e |is ignored..

| 521s 00003790 0a 3c 70 72 65 3e 66 6f 72 20 70 61 63 6b 65 74 |.
for packet|
521s         000037a0  20 3a 3d 20 72 61 6e 67  65 20 70 61 63 6b 65 74  | := range packet|
521s         000037b0  53 6f 75 72 63 65 2e 50  61 63 6b 65 74 73 28 29  |Source.Packets()|
521s         000037c0  20 7b 0a 20 20 68 61 6e  64 6c 65 50 61 63 6b 65  | {.  handlePacke|
521s         000037d0  74 28 70 61 63 6b 65 74  29 20 20 2f 2f 20 44 6f  |t(packet)  // Do|
521s         000037e0  20 73 6f 6d 65 74 68 69  6e 67 20 77 69 74 68 20  | something with |
521s         000037f0  65 61 63 68 20 70 61 63  6b 65 74 2e 0a 7d 0a 3c  |each packet..}.<|
521s         00003800  2f 70 72 65 3e 0a 0a 09  09 09 09 0a 09 09 09 09  |/pre>...........|
521s         00003810  0a 09 09 09 0a 09 09 0a  09 09 09 0a 09 09 09 0a  |................|
521s         00003820  09 09 09 3c 68 32 20 69  64 3d 22 50 61 79 6c 6f  |...

type Payload....
type P|
521s         000038a0  61 79 6c 6f 61 64 20 73  74 72 75 63 74 20 7b 0a  |ayload struct {.|
521s         000038b0  20 20 20 20 44 61 74 61  20 5b 5d 62 79 74 65 0a  |    Data []byte.|
521s         000038c0  7d 3c 2f 70 72 65 3e 0a  09 09 09 3c 70 3e 0a 50  |}
....

.P| 521s 000038d0 61 79 6c 6f 61 64 20 69 73 20 61 20 4c 61 79 65 |ayload is a Laye| 521s 000038e0 72 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 |r containing the| 521s 000038f0 20 70 61 79 6c 6f 61 64 20 6f 66 20 61 20 70 61 | payload of a pa| 521s 00003900 63 6b 65 74 2e 20 20 54 68 65 20 64 65 66 69 6e |cket. The defin| 521s 00003910 69 74 69 6f 6e 20 6f 66 0a 77 68 61 74 20 63 6f |ition of.what co| 521s 00003920 6e 73 74 69 74 75 74 65 73 20 74 68 65 20 70 61 |nstitutes the pa| 521s 00003930 79 6c 6f 61 64 20 6f 66 20 61 20 70 61 63 6b 65 |yload of a packe| 521s 00003940 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 70 72 65 |t depends on pre| 521s 00003950 76 69 6f 75 73 20 6c 61 79 65 72 73 3b 20 66 6f |vious layers; fo| 521s 00003960 72 0a 54 43 50 20 61 6e 64 20 55 44 50 2c 20 77 |r.TCP and UDP, w| 521s 00003970 65 20 73 74 6f 70 20 64 65 63 6f 64 69 6e 67 20 |e stop decoding | 521s 00003980 61 62 6f 76 65 20 6c 61 79 65 72 20 34 20 61 6e |above layer 4 an| 521s 00003990 64 20 72 65 74 75 72 6e 20 74 68 65 20 72 65 6d |d return the rem| 521s 000039a0 61 69 6e 69 6e 67 0a 62 79 74 65 73 20 61 73 20 |aining.bytes as | 521s 000039b0 61 20 50 61 79 6c 6f 61 64 2e 20 20 50 61 79 6c |a Payload. Payl| 521s 000039c0 6f 61 64 20 69 73 20 61 6e 20 41 70 70 6c 69 63 |oad is an Applic| 521s 000039d0 61 74 69 6f 6e 4c 61 79 65 72 2e 0a 3c 2f 70 3e |ationLayer..

| 521s 000039e0 0a 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 |................| 521s 000039f0 0a 0a 09 09 09 0a 0a 09 09 09 0a 09 09 09 09 0a |................| 521s 00003a00 09 09 09 09 3c 68 33 20 69 64 3d 22 50 61 79 6c |....

func (*Payloa| 521s 00003a30 64 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |d) Layer| 521s 00003a80 43 6f 6e 74 65 6e 74 73 3c 2f 61 3e 3c 2f 68 33 |Contents.....
func |
521s         00003aa0  28 70 20 2a 50 61 79 6c  6f 61 64 29 20 4c 61 79  |(p *Payload) Lay|
521s         00003ab0  65 72 43 6f 6e 74 65 6e  74 73 28 29 20 5b 5d 62  |erContents() []b|
521s         00003ac0  79 74 65 3c 2f 70 72 65  3e 0a 09 09 09 09 0a 09  |yte
.......| 521s 00003ad0 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 |................| 521s 00003ae0 09 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 50 61 |......

func (*Paylo| 521s 00003b10 61 64 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 |ad) Laye| 521s 00003b60 72 50 61 79 6c 6f 61 64 3c 2f 61 3e 3c 2f 68 33 |rPayload.....
func |
521s         00003b80  28 70 20 2a 50 61 79 6c  6f 61 64 29 20 4c 61 79  |(p *Payload) Lay|
521s         00003b90  65 72 50 61 79 6c 6f 61  64 28 29 20 5b 5d 62 79  |erPayload() []by|
521s         00003ba0  74 65 3c 2f 70 72 65 3e  0a 09 09 09 09 0a 09 09  |te
........| 521s 00003bb0 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 09 09 |................| 521s 00003bc0 0a 09 09 09 09 3c 68 33 20 69 64 3d 22 50 61 79 |.....

| 521s 00003be0 66 75 6e 63 20 28 2a 50 61 79 6c 6f 61 64 29 20 |func (*Payload) | 521s 00003bf0 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f 70 6b |LayerTyp| 521s 00003c40 65 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c |e

.....<| 521s 00003c50 70 72 65 3e 66 75 6e 63 20 28 70 20 2a 50 61 79 |pre>func (p *Pay| 521s 00003c60 6c 6f 61 64 29 20 4c 61 79 65 72 54 79 70 65 28 |load) LayerType(| 521s 00003c70 29 20 4c 61 79 65 72 54 79 70 65 3c 2f 70 72 65 |) LayerType.....

.LayerT| 521s 00003c90 79 70 65 20 72 65 74 75 72 6e 73 20 4c 61 79 65 |ype returns Laye| 521s 00003ca0 72 54 79 70 65 50 61 79 6c 6f 61 64 0a 3c 2f 70 |rTypePayload................| 521s 00003cc0 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

func (*Payloa| 521s 00003cf0 64 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 |d) Paylo| 521s 00003d40 61 64 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 |ad

.....| 521s 00003d50 3c 70 72 65 3e 66 75 6e 63 20 28 70 20 2a 50 61 |
func (p *Pa|
521s         00003d60  79 6c 6f 61 64 29 20 50  61 79 6c 6f 61 64 28 29  |yload) Payload()|
521s         00003d70  20 5b 5d 62 79 74 65 3c  2f 70 72 65 3e 0a 09 09  | []byte
...| 521s 00003d80 09 09 0a 09 09 09 09 0a 09 09 09 09 0a 09 09 09 |................| 521s 00003d90 0a 09 09 09 09 0a 09 09 09 09 3c 68 33 20 69 64 |..........

func (*Payload| 521s 00003dc0 29 20 3c 61 20 68 72 65 66 3d 22 2f 73 72 63 2f |) String| 521s 00003e10 3c 2f 61 3e 3c 2f 68 33 3e 0a 09 09 09 09 3c 70 |

.....func (p *Payl| 521s 00003e30 6f 61 64 29 20 53 74 72 69 6e 67 28 29 20 73 74 |oad) String() st| 521s 00003e40 72 69 6e 67 3c 2f 70 72 65 3e 0a 09 09 09 09 0a |ring
......| 521s 00003e50 09 09 09 09 0a 09 09 09 09 0a 09 09 09 0a 09 09 |................| 521s 00003e60 0a 09 09 09 0a 09 09 09 0a 09 09 09 3c 68 32 20 |............

type TransportLayer<| 521s 00003ee0 2f 61 3e 3c 2f 68 32 3e 0a 09 09 09 3c 70 72 65 |/a>

....type TransportL| 521s 00003f00 61 79 65 72 20 69 6e 74 65 72 66 61 63 65 20 7b |ayer interface {| 521s 00003f10 0a 20 20 20 20 4c 61 79 65 72 0a 20 20 20 20 54 |. Layer. T| 521s 00003f20 72 61 6e 73 70 6f 72 74 46 6c 6f 77 28 29 20 46 |ransportFlow() F| 521s 00003f30 6c 6f 77 0a 7d 3c 2f 70 72 65 3e 0a 09 09 09 3c |low.}
....<| 521s 00003f40 70 3e 0a 54 72 61 6e 73 70 6f 72 74 4c 61 79 65 |p>.TransportLaye| 521s 00003f50 72 20 69 73 20 74 68 65 20 70 61 63 6b 65 74 20 |r is the packet | 521s 00003f60 6c 61 79 65 72 20 63 6f 72 72 65 73 70 6f 6e 64 |layer correspond| 521s 00003f70 69 6e 67 20 74 6f 20 74 68 65 20 54 43 50 2f 49 |ing to the TCP/I| 521s 00003f80 50 20 6c 61 79 65 72 20 33 20 28 4f 53 49 0a 6c |P layer 3 (OSI.l| 521s 00003f90 61 79 65 72 20 34 29 0a 3c 2f 70 3e 0a 0a 0a 09 |ayer 4).

....| 521s 00003fa0 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 09 |................| 521s 00003fb0 09 0a 0a 09 09 09 0a 09 |........| 521s 521s pcap_test.go:110: -- FULL PACKET DATA (1006 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 01 88 91 03 c2 06 40 00 00 00 00 |....`......@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 521s 00000030 0a 66 36 17 08 97 18 4a 80 18 23 02 03 ca 00 00 |.f6....J..#.....| 521s 00000040 01 01 08 0a 05 c0 8d b6 05 c0 8c fc 09 0a 09 09 |................| 521s 00000050 3c 2f 64 69 76 3e 0a 09 0a 0a 09 0a 0a 0a 0a 0a |..........| 521s 00000060 0a 0a 0a 09 0a 09 0a 09 09 3c 68 32 20 69 64 3d |.........

Subdirector| 521s 00000090 69 65 73 3c 2f 68 32 3e 0a 09 0a 09 3c 74 61 62 |ies

.....| 521s 000000b0 09 3c 74 72 3e 0a 09 3c 74 68 3e 4e 61 6d 65 3c |...Name<| 521s 000000c0 2f 74 68 3e 0a 09 3c 74 68 3e 26 6e 62 73 70 3b |/th>.. | 521s 000000d0 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 |  &nbs| 521s 000000e0 70 3b 3c 2f 74 68 3e 0a 09 3c 74 68 20 73 74 79 |p;..Synopsis| 521s 00000120 0a 09 3c 2f 74 72 3e 0a 09 0a 09 09 3c 74 72 3e |.......| 521s 00000130 0a 09 09 3c 74 64 3e 3c 61 20 68 72 65 66 3d 22 |...
...| 521s 00000150 09 09 3c 2f 74 72 3e 0a 09 0a 09 0a 09 09 0a 09 |...........| 521s 00000160 09 09 3c 74 72 3e 0a 09 09 09 3c 74 64 20 63 6c |......lay| 521s 00000190 65 72 73 3c 2f 61 3e 3c 2f 74 64 3e 0a 09 09 09 |ers....| 521s 000001a0 3c 74 64 3e 26 6e 62 73 70 3b 26 6e 62 73 70 3b |  | 521s 000001b0 26 6e 62 73 70 3b 26 6e 62 73 70 3b 3c 2f 74 64 |  ....Pac| 521s 000001e0 6b 61 67 65 20 6c 61 79 65 72 73 20 70 72 6f 76 |kage layers prov| 521s 000001f0 69 64 65 73 20 64 65 63 6f 64 69 6e 67 20 6c 61 |ides decoding la| 521s 00000200 79 65 72 73 20 66 6f 72 20 6d 61 6e 79 20 63 6f |yers for many co| 521s 00000210 6d 6d 6f 6e 20 70 72 6f 74 6f 63 6f 6c 73 2e 3c |mmon protocols.<| 521s 00000220 2f 74 64 3e 0a 09 09 09 3c 2f 74 72 3e 0a 09 09 |/td>.......| 521s 00000230 0a 09 0a 09 09 0a 09 09 09 3c 74 72 3e 0a 09 09 |............| 521s 00000240 09 3c 74 64 20 63 6c 61 73 73 3d 22 6e 61 6d 65 |.pcap.| 521s 00000270 09 09 09 3c 74 64 3e 26 6e 62 73 70 3b 26 6e 62 |... &nb| 521s 00000280 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 3c |sp;  <| 521s 00000290 2f 74 64 3e 0a 09 09 09 3c 74 64 20 73 74 79 6c |/td>....| 521s 000002b0 50 61 63 6b 61 67 65 20 70 63 61 70 20 61 6c 6c |Package pcap all| 521s 000002c0 6f 77 73 20 75 73 65 72 73 20 6f 66 20 67 6f 70 |ows users of gop| 521s 000002d0 61 63 6b 65 74 20 74 6f 20 72 65 61 64 20 70 61 |acket to read pa| 521s 000002e0 63 6b 65 74 73 20 6f 66 66 20 74 68 65 20 77 69 |ckets off the wi| 521s 000002f0 72 65 20 6f 72 20 66 72 6f 6d 20 70 63 61 70 20 |re or from pcap | 521s 00000300 66 69 6c 65 73 2e 3c 2f 74 64 3e 0a 09 09 09 3c |files.....<| 521s 00000310 2f 74 72 3e 0a 09 09 0a 09 0a 09 09 0a 09 09 09 |/tr>............| 521s 00000320 3c 74 72 3e 0a 09 09 09 3c 74 64 20 63 6c 61 73 |....pfrin| 521s 00000350 67 3c 2f 61 3e 3c 2f 74 64 3e 0a 09 09 09 3c 74 |g....  &n| 521s 00000370 62 73 70 3b 26 6e 62 73 70 3b 3c 2f 74 64 3e 0a |bsp; .| 521s 00000380 09 09 09 3c 74 64 20 73 74 79 6c 65 3d 22 77 69 |...Packa| 521s 000003a0 67 65 20 70 66 72 69 6e 67 20 77 72 61 70 73 20 |ge pfring wraps | 521s 000003b0 74 68 65 20 50 46 5f 52 49 4e 47 20 43 20 6c 69 |the PF_RING C li| 521s 000003c0 62 72 61 72 79 20 66 6f 72 20 47 6f 2e 3c 2f 74 |brary for Go..........| 521s 000003e0 0a 09 3c 2f 74 61 62 6c 65 3e 0a 09 0a 0a |......| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..1002..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..962..] Version=6 TrafficClass=0 FlowLabel=100497 Length=962 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 01 88 91 03 c2 06 40 00 00 00 00 00 00 00 00 |`......@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[..930..] SrcPort=8080(http-alt) DstPort=58799 Seq=174470679 Ack=144119882 DataOffset=8 FIN=false SYN=false RST=false PSH=true ACK=true URG=false ECE=false CWR=false NS=false Window=8962 Checksum=970 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505270/96505084 0x05c08db605c08cfc)] Padding=[]} 521s 00000000 1f 90 e5 af 0a 66 36 17 08 97 18 4a 80 18 23 02 |.....f6....J..#.| 521s 00000010 03 ca 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |................| 521s --- Layer 4 --- 521s Payload 930 byte(s) 521s 00000000 09 0a 09 09 3c 2f 64 69 76 3e 0a 09 0a 0a 09 0a |..........| 521s 00000010 0a 0a 0a 0a 0a 0a 0a 09 0a 09 0a 09 09 3c 68 32 |.............Subdire| 521s 00000040 63 74 6f 72 69 65 73 3c 2f 68 32 3e 0a 09 0a 09 |ctories

....| 521s 00000050 3c 74 61 62 6c 65 20 63 6c 61 73 73 3d 22 64 69 |........Synopsis<| 521s 000000d0 2f 74 68 3e 0a 09 3c 2f 74 72 3e 0a 09 0a 09 09 |/th>.......| 521s 000000e0 3c 74 72 3e 0a 09 09 3c 74 64 3e 3c 61 20 68 72 |........| 521s 00000110 09 09 0a 09 09 09 3c 74 72 3e 0a 09 09 09 3c 74 |..........<| 521s 00000130 61 20 68 72 65 66 3d 22 6c 61 79 65 72 73 2f 22 |a href="layers/"| 521s 00000140 3e 6c 61 79 65 72 73 3c 2f 61 3e 3c 2f 74 64 3e |>layers| 521s 00000150 0a 09 09 09 3c 74 64 3e 26 6e 62 73 70 3b 26 6e |.................................| 521s 000002c0 09 09 09 3c 2f 74 72 3e 0a 09 09 0a 09 0a 09 09 |...........| 521s 000002d0 0a 09 09 09 3c 74 72 3e 0a 09 09 09 3c 74 64 20 |..........| 521s 00000310 09 09 3c 74 64 3e 26 6e 62 73 70 3b 26 6e 62 73 |.......| 521s 00000390 09 09 0a 09 0a 09 3c 2f 74 61 62 6c 65 3e 0a 09 |......
N| 521s 00000070 61 6d 65 3c 2f 74 68 3e 0a 09 3c 74 68 3e 26 6e |ame&n| 521s 00000080 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b |bsp;  | 521s 00000090 26 6e 62 73 70 3b 3c 2f 74 68 3e 0a 09 3c 74 68 | 
.....
 &n| 521s 00000160 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b |bsp;  | 521s 00000170 3c 2f 74 64 3e 0a 09 09 09 3c 74 64 20 73 74 79 |Package layers | 521s 000001a0 70 72 6f 76 69 64 65 73 20 64 65 63 6f 64 69 6e |provides decodin| 521s 000001b0 67 20 6c 61 79 65 72 73 20 66 6f 72 20 6d 61 6e |g layers for man| 521s 000001c0 79 20 63 6f 6d 6d 6f 6e 20 70 72 6f 74 6f 63 6f |y common protoco| 521s 000001d0 6c 73 2e 3c 2f 74 64 3e 0a 09 09 09 3c 2f 74 72 |ls.pcap.... | 521s 00000230 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 |;  &nb| 521s 00000240 73 70 3b 3c 2f 74 64 3e 0a 09 09 09 3c 74 64 20 |sp;Package pcap| 521s 00000270 20 61 6c 6c 6f 77 73 20 75 73 65 72 73 20 6f 66 | allows users of| 521s 00000280 20 67 6f 70 61 63 6b 65 74 20 74 6f 20 72 65 61 | gopacket to rea| 521s 00000290 64 20 70 61 63 6b 65 74 73 20 6f 66 66 20 74 68 |d packets off th| 521s 000002a0 65 20 77 69 72 65 20 6f 72 20 66 72 6f 6d 20 70 |e wire or from p| 521s 000002b0 63 61 70 20 66 69 6c 65 73 2e 3c 2f 74 64 3e 0a |cap files.
p| 521s 00000300 66 72 69 6e 67 3c 2f 61 3e 3c 2f 74 64 3e 0a 09 |fring &nbs| 521s 00000320 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 3c 2f |p;  ....P| 521s 00000350 61 63 6b 61 67 65 20 70 66 72 69 6e 67 20 77 72 |ackage pfring wr| 521s 00000360 61 70 73 20 74 68 65 20 50 46 5f 52 49 4e 47 20 |aps the PF_RING | 521s 00000370 43 20 6c 69 62 72 61 72 79 20 66 6f 72 20 47 6f |C library for Go| 521s 00000380 2e 3c 2f 74 64 3e 0a 09 09 09 3c 2f 74 72 3e 0a |.
..| 521s 000003a0 0a 0a |..| 521s 521s pcap_test.go:110: -- FULL PACKET DATA (76 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 00 00 00 00 20 06 40 00 00 00 00 |....`.... .@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 e5 af 1f 90 |................| 521s 00000030 08 97 18 4a 0a 65 76 ef 80 10 27 e9 00 28 00 00 |...J.ev...'..(..| 521s 00000040 01 01 08 0a 05 c0 8d b6 05 c0 8d b6 |............| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..72..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..32..] Version=6 TrafficClass=0 FlowLabel=0 Length=32 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 00 00 00 00 20 06 40 00 00 00 00 00 00 00 00 |`.... .@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[] SrcPort=58799 DstPort=8080(http-alt) Seq=144119882 Ack=174421743 DataOffset=8 FIN=false SYN=false RST=false PSH=false ACK=true URG=false ECE=false CWR=false NS=false Window=10217 Checksum=40 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505270/96505270 0x05c08db605c08db6)] Padding=[]} 521s 00000000 e5 af 1f 90 08 97 18 4a 0a 65 76 ef 80 10 27 e9 |.......J.ev...'.| 521s 00000010 00 28 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8d b6 |.(..............| 521s 521s pcap_test.go:110: -- FULL PACKET DATA (848 bytes) ------------------------------------ 521s 00000000 1e 00 00 00 60 01 88 91 03 24 06 40 00 00 00 00 |....`....$.@....| 521s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 521s 00000030 0a 66 39 b9 08 97 18 4a 80 18 23 02 03 2c 00 00 |.f9....J..#..,..| 521s 00000040 01 01 08 0a 05 c0 8d b6 05 c0 8c fc 0d 0a 32 61 |..............2a| 521s 00000050 0d 0a 0a 0a 3c 2f 64 69 76 3e 0a 0a 3c 64 69 76 |.......Bu| 521s 00000070 69 6c 64 20 76 65 72 73 69 6f 6e 20 0d 0a 37 0d |ild version ..7.| 521s 00000080 0a 67 6f 31 2e 30 2e 33 0d 0a 32 62 61 0d 0a 2e |.go1.0.3..2ba...| 521s 00000090 3c 62 72 3e 0a 45 78 63 65 70 74 20 61 73 20 3c |
.Except as <| 521s 000000a0 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 63 |a href="http://c| 521s 000000b0 6f 64 65 2e 67 6f 6f 67 6c 65 2e 63 6f 6d 2f 70 |ode.google.com/p| 521s 000000c0 6f 6c 69 63 69 65 73 2e 68 74 6d 6c 23 72 65 73 |olicies.html#res| 521s 000000d0 74 72 69 63 74 69 6f 6e 73 22 3e 6e 6f 74 65 64 |trictions">noted| 521s 000000e0 3c 2f 61 3e 2c 0a 74 68 65 20 63 6f 6e 74 65 6e |,.the conten| 521s 000000f0 74 20 6f 66 20 74 68 69 73 20 70 61 67 65 20 69 |t of this page i| 521s 00000100 73 20 6c 69 63 65 6e 73 65 64 20 75 6e 64 65 72 |s licensed under| 521s 00000110 20 74 68 65 0a 43 72 65 61 74 69 76 65 20 43 6f | the.Creative Co| 521s 00000120 6d 6d 6f 6e 73 20 41 74 74 72 69 62 75 74 69 6f |mmons Attributio| 521s 00000130 6e 20 33 2e 30 20 4c 69 63 65 6e 73 65 2c 0a 61 |n 3.0 License,.a| 521s 00000140 6e 64 20 63 6f 64 65 20 69 73 20 6c 69 63 65 6e |nd code is licen| 521s 00000150 73 65 64 20 75 6e 64 65 72 20 61 20 3c 61 20 68 |sed under a B| 521s 00000170 53 44 20 6c 69 63 65 6e 73 65 3c 2f 61 3e 2e 3c |SD license.<| 521s 00000180 62 72 3e 0a 3c 61 20 68 72 65 66 3d 22 2f 64 6f |br>.Term| 521s 000001a0 73 20 6f 66 20 53 65 72 76 69 63 65 3c 2f 61 3e |s of Service| 521s 000001b0 20 7c 20 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 | | .Pr| 521s 000001f0 69 76 61 63 79 20 50 6f 6c 69 63 79 3c 2f 61 3e |ivacy Policy| 521s 00000200 0a 3c 2f 64 69 76 3e 0a 0a 3c 2f 62 6f 64 79 3e |...| 521s 00000210 0a 3c 73 63 72 69 70 74 20 74 79 70 65 3d 22 74 |..| 521s 00000340 3c 2f 68 74 6d 6c 3e 0a 0a 0d 0a 30 0d 0a 0d 0a |....0....| 521s --- Layer 1 --- 521s Loopback {Contents=[30, 0, 0, 0] Payload=[..844..] Family=IPv6} 521s 00000000 1e 00 00 00 |....| 521s --- Layer 2 --- 521s IPv6 {Contents=[..40..] Payload=[..804..] Version=6 TrafficClass=0 FlowLabel=100497 Length=804 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 521s 00000000 60 01 88 91 03 24 06 40 00 00 00 00 00 00 00 00 |`....$.@........| 521s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 521s 00000020 00 00 00 00 00 00 00 01 |........| 521s --- Layer 3 --- 521s TCP {Contents=[..32..] Payload=[..772..] SrcPort=8080(http-alt) DstPort=58799 Seq=174471609 Ack=144119882 DataOffset=8 FIN=false SYN=false RST=false PSH=true ACK=true URG=false ECE=false CWR=false NS=false Window=8962 Checksum=812 Urgent=0 Options=[TCPOption(NOP:), TCPOption(NOP:), TCPOption(Timestamps:96505270/96505084 0x05c08db605c08cfc)] Padding=[]} 521s 00000000 1f 90 e5 af 0a 66 39 b9 08 97 18 4a 80 18 23 02 |.....f9....J..#.| 521s 00000010 03 2c 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |.,..............| 521s --- Layer 4 --- 521s Payload 772 byte(s) 521s 00000000 0d 0a 32 61 0d 0a 0a 0a 3c 2f 64 69 76 3e 0a 0a |..2a......| 521s 00000010 3c 64 69 76 20 69 64 3d 22 66 6f 6f 74 65 72 22 |...