0s autopkgtest [23:27:23]: starting date and time: 2024-03-26 23:27:23+0000 0s autopkgtest [23:27:23]: git checkout: 4a1cd702 l/adt_testbed: don't blame the testbed for unsolvable build deps 0s autopkgtest [23:27:23]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work._ct3rh8j/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-2@bos02-ppc64el-2.secgroup --name adt-noble-ppc64el-gopacket-20240326-232723-juju-7f2275-prod-proposed-migration-environment-2-846a0648-9fa3-4d8f-a943-18df299e601e --image adt/ubuntu-noble-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --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/ 105s autopkgtest [23:29:08]: testbed dpkg architecture: ppc64el 105s autopkgtest [23:29:08]: testbed apt version: 2.7.12 105s autopkgtest [23:29:08]: @@@@@@@@@@@@@@@@@@@@ test bed setup 106s Get:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease [117 kB] 107s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/multiverse Sources [55.4 kB] 107s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main Sources [497 kB] 107s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/restricted Sources [8504 B] 107s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/universe Sources [3985 kB] 109s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el Packages [702 kB] 109s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el c-n-f Metadata [3116 B] 109s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/restricted ppc64el Packages [1372 B] 109s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/restricted ppc64el c-n-f Metadata [116 B] 109s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el Packages [4217 kB] 111s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el c-n-f Metadata [8652 B] 111s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/multiverse ppc64el Packages [62.2 kB] 111s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/multiverse ppc64el c-n-f Metadata [116 B] 113s Fetched 9658 kB in 5s (1915 kB/s) 114s Reading package lists... 116s Reading package lists... 116s Building dependency tree... 116s Reading state information... 116s Calculating upgrade... 116s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 116s Reading package lists... 116s Building dependency tree... 116s Reading state information... 116s 0 upgraded, 0 newly installed, 0 to remove and 248 not upgraded. 117s Hit:1 http://ftpmaster.internal/ubuntu noble-proposed InRelease 117s Hit:2 http://ftpmaster.internal/ubuntu noble InRelease 117s Hit:3 http://ftpmaster.internal/ubuntu noble-updates InRelease 117s Hit:4 http://ftpmaster.internal/ubuntu noble-security InRelease 118s Reading package lists... 118s Reading package lists... 119s Building dependency tree... 119s Reading state information... 119s Calculating upgrade... 119s The following packages were automatically installed and are no longer required: 119s libaio1 libnetplan0 python3-distutils python3-lib2to3 119s Use 'sudo apt autoremove' to remove them. 119s The following packages will be REMOVED: 119s libapt-pkg6.0 libarchive13 libatm1 libcurl3-gnutls libcurl4 libdb5.3 libelf1 119s libext2fs2 libgdbm-compat4 libgdbm6 libglib2.0-0 libgnutls30 libgpgme11 119s libhogweed6 libmagic1 libnettle8 libnpth0 libnvme1 libparted2 libperl5.38 119s libpng16-16 libpsl5 libreadline8 libreiserfscore0 libssl3 libtirpc3 liburcu8 119s libuv1 119s The following NEW packages will be installed: 119s bpfcc-tools bpftrace fontconfig-config fonts-dejavu-core fonts-dejavu-mono 119s ieee-data libaio1t64 libapt-pkg6.0t64 libarchive13t64 libatm1t64 libbpfcc 119s libc-dev-bin libc-devtools libc6-dev libclang-cpp18 libclang1-18 119s libcrypt-dev libcurl3t64-gnutls libcurl4t64 libdb5.3t64 libdeflate0 119s libdw1t64 libelf1t64 libext2fs2t64 libfontconfig1 libgd3 libgdbm-compat4t64 119s libgdbm6t64 libglib2.0-0t64 libgnutls30t64 libgpgme11t64 libhogweed6t64 119s libjbig0 libjpeg-turbo8 libjpeg8 liblerc4 libllvm18 libmagic1t64 libnetplan1 119s libnettle8t64 libnpth0t64 libnvme1t64 libparted2t64 libperl5.38t64 119s libpng16-16t64 libpsl5t64 libreadline8t64 libreiserfscore0t64 libsharpyuv0 119s libssl3t64 libtiff6 libtirpc3t64 libunwind8 liburcu8t64 libuv1t64 libwebp7 119s libxpm4 linux-headers-6.8.0-20 linux-headers-6.8.0-20-generic 119s linux-image-6.8.0-20-generic linux-libc-dev linux-modules-6.8.0-20-generic 119s linux-modules-extra-6.8.0-20-generic linux-tools-6.8.0-20 119s linux-tools-6.8.0-20-generic linux-tools-common manpages manpages-dev 119s python3-bpfcc python3-netaddr rpcsvc-proto ubuntu-kernel-accessories 119s xdg-user-dirs 119s The following packages will be upgraded: 119s apparmor apt apt-utils base-files bash bc bind9-dnsutils bind9-host 119s bind9-libs binutils binutils-common binutils-powerpc64le-linux-gnu bolt 119s bsdextrautils bsdutils btrfs-progs coreutils cryptsetup-bin curl dbus 119s dbus-bin dbus-daemon dbus-session-bus-common dbus-system-bus-common 119s dbus-user-session dhcpcd-base dirmngr dmsetup dpkg dpkg-dev e2fsprogs 119s e2fsprogs-l10n eject fdisk file ftp fwupd gawk gcc-13-base gcc-14-base 119s gir1.2-girepository-2.0 gir1.2-glib-2.0 gnupg gnupg-l10n gnupg-utils gpg 119s gpg-agent gpg-wks-client gpgconf gpgsm gpgv groff-base grub-common 119s grub-ieee1275 grub-ieee1275-bin grub2-common ibverbs-providers 119s inetutils-telnet info initramfs-tools initramfs-tools-bin 119s initramfs-tools-core install-info iproute2 jq keyboxd kmod kpartx 119s krb5-locales libapparmor1 libaudit-common libaudit1 libbinutils libblkid1 119s libblockdev-crypto3 libblockdev-fs3 libblockdev-loop3 libblockdev-mdraid3 119s libblockdev-nvme3 libblockdev-part3 libblockdev-swap3 libblockdev-utils3 119s libblockdev3 libbpf1 libbrotli1 libcap-ng0 libcom-err2 libcryptsetup12 119s libctf-nobfd0 libctf0 libdbus-1-3 libdebconfclient0 libdevmapper1.02.1 119s libdpkg-perl libevent-core-2.1-7 libexpat1 libfdisk1 libfido2-1 libfreetype6 119s libftdi1-2 libfwupd2 libgcc-s1 libgirepository-1.0-1 libglib2.0-data 119s libgssapi-krb5-2 libgudev-1.0-0 libgusb2 libibverbs1 libjcat1 libjq1 119s libjson-glib-1.0-0 libjson-glib-1.0-common libk5crypto3 libkmod2 libkrb5-3 119s libkrb5support0 libldap-common libldap2 liblocale-gettext-perl liblzma5 119s libmagic-mgc libmbim-glib4 libmbim-proxy libmm-glib0 libmount1 libnghttp2-14 119s libnsl2 libnss-systemd libpam-modules libpam-modules-bin libpam-runtime 119s libpam-systemd libpam0g libplymouth5 libpolkit-agent-1-0 119s libpolkit-gobject-1-0 libproc2-0 libprotobuf-c1 libpython3-stdlib 119s libpython3.11-minimal libpython3.11-stdlib libpython3.12-minimal 119s libpython3.12-stdlib libqmi-glib5 libqmi-proxy libqrtr-glib0 librtmp1 119s libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libselinux1 119s libsemanage-common libsemanage2 libsframe1 libslang2 libsmartcols1 119s libsqlite3-0 libss2 libssh-4 libstdc++6 libsystemd-shared libsystemd0 119s libtext-charwidth-perl libtext-iconv-perl libtirpc-common libudev1 119s libudisks2-0 libusb-1.0-0 libuuid1 libvolume-key1 libxml2 libxmlb2 libxmuu1 119s linux-generic linux-headers-generic linux-headers-virtual 119s linux-image-generic linux-image-virtual linux-virtual logsave lshw lsof 119s man-db motd-news-config mount mtr-tiny multipath-tools netplan-generator 119s netplan.io openssh-client openssh-server openssh-sftp-server openssl parted 119s perl perl-base perl-modules-5.38 pinentry-curses plymouth 119s plymouth-theme-ubuntu-text procps python-apt-common python3 python3-apt 119s python3-cryptography python3-dbus python3-distutils python3-gdbm python3-gi 119s python3-lib2to3 python3-minimal python3-netplan python3-pkg-resources 119s python3-pyrsistent python3-setuptools python3-typing-extensions python3-yaml 119s python3.11 python3.11-minimal python3.12 python3.12-minimal readline-common 119s rsync rsyslog shared-mime-info sudo systemd systemd-dev systemd-resolved 119s systemd-sysv systemd-timesyncd tcpdump telnet tnftp ubuntu-pro-client 119s ubuntu-pro-client-l10n udev udisks2 usb.ids util-linux uuid-runtime 119s vim-common vim-tiny wget xxd xz-utils zlib1g 119s 248 upgraded, 73 newly installed, 28 to remove and 0 not upgraded. 119s Need to get 390 MB of archives. 119s After this operation, 640 MB of additional disk space will be used. 119s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el motd-news-config all 13ubuntu8 [5098 B] 119s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el base-files ppc64el 13ubuntu8 [74.5 kB] 120s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bash ppc64el 5.2.21-2ubuntu3 [977 kB] 120s Get:4 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bsdutils ppc64el 1:2.39.3-9ubuntu2 [98.3 kB] 120s Get:5 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el coreutils ppc64el 9.4-3ubuntu3 [1523 kB] 120s Get:6 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libudisks2-0 ppc64el 2.10.1-6 [182 kB] 120s Get:7 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el udisks2 ppc64el 2.10.1-6 [344 kB] 120s Get:8 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el shared-mime-info ppc64el 2.4-1build1 [481 kB] 120s Get:9 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gir1.2-girepository-2.0 ppc64el 1.79.1-1ubuntu6 [24.8 kB] 120s Get:10 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gir1.2-glib-2.0 ppc64el 2.79.3-3ubuntu5 [182 kB] 120s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgirepository-1.0-1 ppc64el 1.79.1-1ubuntu6 [93.8 kB] 120s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-gi ppc64el 3.47.0-3build1 [261 kB] 120s Get:13 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-dbus ppc64el 1.3.2-5build2 [107 kB] 120s Get:14 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libnetplan1 ppc64el 1.0-1 [136 kB] 120s Get:15 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-netplan ppc64el 1.0-1 [21.8 kB] 120s Get:16 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el netplan-generator ppc64el 1.0-1 [59.2 kB] 120s Get:17 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el initramfs-tools-bin ppc64el 0.142ubuntu23 [21.0 kB] 120s Get:18 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el initramfs-tools-core all 0.142ubuntu23 [50.1 kB] 120s Get:19 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el initramfs-tools all 0.142ubuntu23 [9058 B] 120s Get:20 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el netplan.io ppc64el 1.0-1 [66.2 kB] 120s Get:21 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libxmlb2 ppc64el 0.3.15-1build1 [82.6 kB] 120s Get:22 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgpgme11t64 ppc64el 1.18.0-4.1ubuntu3 [173 kB] 120s Get:23 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libvolume-key1 ppc64el 0.3.12-7build1 [47.9 kB] 120s Get:24 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libqrtr-glib0 ppc64el 1.2.2-1ubuntu3 [18.3 kB] 120s Get:25 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libqmi-glib5 ppc64el 1.35.2-0ubuntu1 [966 kB] 121s Get:26 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libqmi-proxy ppc64el 1.35.2-0ubuntu1 [6208 B] 121s Get:27 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpolkit-agent-1-0 ppc64el 124-1ubuntu1 [18.8 kB] 121s Get:28 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpolkit-gobject-1-0 ppc64el 124-1ubuntu1 [52.7 kB] 121s Get:29 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libmm-glib0 ppc64el 1.23.4-0ubuntu1 [282 kB] 121s Get:30 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libmbim-glib4 ppc64el 1.31.2-0ubuntu2 [253 kB] 121s Get:31 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libmbim-proxy ppc64el 1.31.2-0ubuntu2 [6274 B] 121s Get:32 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libjson-glib-1.0-common all 1.8.0-2build1 [4210 B] 121s Get:33 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libjson-glib-1.0-0 ppc64el 1.8.0-2build1 [73.6 kB] 121s Get:34 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgusb2 ppc64el 0.4.8-1build1 [43.0 kB] 121s Get:35 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgudev-1.0-0 ppc64el 1:238-3ubuntu2 [15.8 kB] 121s Get:36 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el tnftp ppc64el 20230507-2build1 [116 kB] 121s Get:37 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el tcpdump ppc64el 4.99.4-3ubuntu2 [543 kB] 121s Get:38 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsystemd0 ppc64el 255.4-1ubuntu5 [526 kB] 121s Get:39 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el systemd-dev all 255.4-1ubuntu5 [103 kB] 121s Get:40 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libnss-systemd ppc64el 255.4-1ubuntu5 [208 kB] 121s Get:41 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libudev1 ppc64el 255.4-1ubuntu5 [200 kB] 121s Get:42 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libssl3t64 ppc64el 3.0.13-0ubuntu2 [2125 kB] 121s Get:43 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el systemd ppc64el 255.4-1ubuntu5 [3771 kB] 121s Get:44 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el udev ppc64el 255.4-1ubuntu5 [2038 kB] 121s Get:45 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el systemd-sysv ppc64el 255.4-1ubuntu5 [11.9 kB] 121s Get:46 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpam-systemd ppc64el 255.4-1ubuntu5 [304 kB] 121s Get:47 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el systemd-timesyncd ppc64el 255.4-1ubuntu5 [37.9 kB] 121s Get:48 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsystemd-shared ppc64el 255.4-1ubuntu5 [2351 kB] 121s Get:49 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el systemd-resolved ppc64el 255.4-1ubuntu5 [346 kB] 122s Get:50 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el sudo ppc64el 1.9.15p5-3ubuntu3 [1005 kB] 122s Get:51 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el rsync ppc64el 3.2.7-1build1 [487 kB] 122s Get:52 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-cryptography ppc64el 41.0.7-4build2 [860 kB] 122s Get:53 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el openssl ppc64el 3.0.13-0ubuntu2 [1026 kB] 122s Get:54 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el openssh-sftp-server ppc64el 1:9.6p1-3ubuntu11 [43.7 kB] 122s Get:55 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el openssh-client ppc64el 1:9.6p1-3ubuntu11 [1112 kB] 122s Get:56 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el openssh-server ppc64el 1:9.6p1-3ubuntu11 [627 kB] 122s Get:57 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libssh-4 ppc64el 0.10.6-2build1 [234 kB] 122s Get:58 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsasl2-modules ppc64el 2.1.28+dfsg1-5ubuntu1 [83.1 kB] 122s Get:59 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3.12 ppc64el 3.12.2-4build3 [645 kB] 122s Get:60 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3.12-minimal ppc64el 3.12.2-4build3 [2447 kB] 122s Get:61 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpython3.12-minimal ppc64el 3.12.2-4build3 [836 kB] 122s Get:62 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el grub-ieee1275 ppc64el 2.12-1ubuntu5 [63.1 kB] 122s Get:63 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el grub2-common ppc64el 2.12-1ubuntu5 [752 kB] 122s Get:64 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el grub-common ppc64el 2.12-1ubuntu5 [2356 kB] 122s Get:65 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el grub-ieee1275-bin ppc64el 2.12-1ubuntu5 [687 kB] 122s Get:66 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libparted2t64 ppc64el 3.6-3.1build2 [184 kB] 122s Get:67 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el parted ppc64el 3.6-3.1build2 [58.9 kB] 122s Get:68 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3.11 ppc64el 3.11.8-1build4 [589 kB] 122s Get:69 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3.11-minimal ppc64el 3.11.8-1build4 [2292 kB] 122s Get:70 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpython3.11-minimal ppc64el 3.11.8-1build4 [846 kB] 122s Get:71 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpython3.11-stdlib ppc64el 3.11.8-1build4 [1977 kB] 122s Get:72 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gnupg-utils ppc64el 2.4.4-2ubuntu15 [123 kB] 122s Get:73 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gpg-agent ppc64el 2.4.4-2ubuntu15 [275 kB] 122s Get:74 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gpg-wks-client ppc64el 2.4.4-2ubuntu15 [85.0 kB] 122s Get:75 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gpg ppc64el 2.4.4-2ubuntu15 [706 kB] 122s Get:76 http://ftpmaster.internal/ubuntu noble/main ppc64el libnpth0t64 ppc64el 1.6-3.1 [8864 B] 122s Get:77 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gpgv ppc64el 2.4.4-2ubuntu15 [198 kB] 122s Get:78 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dirmngr ppc64el 2.4.4-2ubuntu15 [391 kB] 122s Get:79 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gnupg all 2.4.4-2ubuntu15 [359 kB] 122s Get:80 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el keyboxd ppc64el 2.4.4-2ubuntu15 [94.3 kB] 122s Get:81 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gpgconf ppc64el 2.4.4-2ubuntu15 [115 kB] 122s Get:82 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gpgsm ppc64el 2.4.4-2ubuntu15 [292 kB] 123s Get:83 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libreadline8t64 ppc64el 8.2-4 [182 kB] 123s Get:84 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gawk ppc64el 1:5.2.1-2build2 [528 kB] 123s Get:85 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el fdisk ppc64el 2.39.3-9ubuntu2 [132 kB] 123s Get:86 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bc ppc64el 1.07.1-3ubuntu2 [93.2 kB] 123s Get:87 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpython3.12-stdlib ppc64el 3.12.2-4build3 [2082 kB] 123s Get:88 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el perl-base ppc64el 5.38.2-3.2 [1916 kB] 123s Get:89 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el perl-modules-5.38 all 5.38.2-3.2 [3110 kB] 123s Get:90 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-gdbm ppc64el 3.12.2-3ubuntu1.1 [19.8 kB] 123s Get:91 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el man-db ppc64el 2.12.0-3build4 [1274 kB] 123s Get:92 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgdbm6t64 ppc64el 1.23-5.1 [41.9 kB] 123s Get:93 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgdbm-compat4t64 ppc64el 1.23-5.1 [6972 B] 123s Get:94 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libperl5.38t64 ppc64el 5.38.2-3.2 [4957 kB] 123s Get:95 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el perl ppc64el 5.38.2-3.2 [231 kB] 123s Get:96 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdb5.3t64 ppc64el 5.3.28+dfsg2-6 [875 kB] 123s Get:97 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsasl2-modules-db ppc64el 2.1.28+dfsg1-5ubuntu1 [23.4 kB] 123s Get:98 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsasl2-2 ppc64el 2.1.28+dfsg1-5ubuntu1 [68.0 kB] 123s Get:99 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libnvme1t64 ppc64el 1.8-3 [98.2 kB] 123s Get:100 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el wget ppc64el 1.21.4-1ubuntu2 [382 kB] 123s Get:101 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libcurl4t64 ppc64el 8.5.0-2ubuntu8 [428 kB] 123s Get:102 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el curl ppc64el 8.5.0-2ubuntu8 [234 kB] 124s Get:103 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpsl5t64 ppc64el 0.21.2-1.1 [59.0 kB] 124s Get:104 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libarchive13t64 ppc64el 3.7.2-1.1ubuntu2 [518 kB] 124s Get:105 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el fwupd ppc64el 1.9.15-2 [4634 kB] 125s Get:106 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libcurl3t64-gnutls ppc64el 8.5.0-2ubuntu8 [419 kB] 125s Get:107 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libfwupd2 ppc64el 1.9.15-2 [136 kB] 125s Get:108 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev3 ppc64el 3.1.0-1build1 [55.2 kB] 125s Get:109 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-utils3 ppc64el 3.1.0-1build1 [20.3 kB] 125s Get:110 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-swap3 ppc64el 3.1.0-1build1 [8616 B] 125s Get:111 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-part3 ppc64el 3.1.0-1build1 [17.5 kB] 125s Get:112 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-nvme3 ppc64el 3.1.0-1build1 [20.1 kB] 125s Get:113 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-mdraid3 ppc64el 3.1.0-1build1 [14.3 kB] 125s Get:114 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-loop3 ppc64el 3.1.0-1build1 [7742 B] 125s Get:115 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el e2fsprogs-l10n all 1.47.0-2.4~exp1ubuntu2 [5996 B] 125s Get:116 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el logsave ppc64el 1.47.0-2.4~exp1ubuntu2 [22.9 kB] 125s Get:117 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libext2fs2t64 ppc64el 1.47.0-2.4~exp1ubuntu2 [270 kB] 125s Get:118 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el e2fsprogs ppc64el 1.47.0-2.4~exp1ubuntu2 [663 kB] 125s Get:119 http://ftpmaster.internal/ubuntu noble/main ppc64el libreiserfscore0t64 ppc64el 1:3.6.27-7.1 [92.7 kB] 125s Get:120 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el btrfs-progs ppc64el 6.6.3-1.1build1 [1352 kB] 126s Get:121 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-fs3 ppc64el 3.1.0-1build1 [41.2 kB] 126s Get:122 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblockdev-crypto3 ppc64el 3.1.0-1build1 [22.5 kB] 126s Get:123 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bolt ppc64el 0.9.6-2build1 [171 kB] 126s Get:124 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libglib2.0-0t64 ppc64el 2.79.3-3ubuntu5 [1773 kB] 126s Get:125 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libjcat1 ppc64el 0.2.0-2build2 [40.0 kB] 126s Get:126 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libldap2 ppc64el 2.6.7+dfsg-1~exp1ubuntu6 [233 kB] 126s Get:127 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el ubuntu-pro-client-l10n ppc64el 31.2.2 [19.4 kB] 126s Get:128 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el ubuntu-pro-client ppc64el 31.2.2 [215 kB] 126s Get:129 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-apt ppc64el 2.7.7 [181 kB] 126s Get:130 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el apt-utils ppc64el 2.7.14 [226 kB] 126s Get:131 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libapt-pkg6.0t64 ppc64el 2.7.14 [1063 kB] 126s Get:132 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libnettle8t64 ppc64el 3.9.1-2.2 [226 kB] 126s Get:133 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libhogweed6t64 ppc64el 3.9.1-2.2 [208 kB] 126s Get:134 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgnutls30t64 ppc64el 3.8.3-1.1ubuntu2 [1154 kB] 126s Get:135 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el apt ppc64el 2.7.14 [1401 kB] 126s Get:136 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el librtmp1 ppc64el 2.4+20151223.gitfa8646d.1-2build6 [64.4 kB] 126s Get:137 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el liblzma5 ppc64el 5.6.0-0.2 [156 kB] 126s Get:138 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libblkid1 ppc64el 2.39.3-9ubuntu2 [155 kB] 126s Get:139 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el kmod ppc64el 31+20240202-2ubuntu4 [122 kB] 126s Get:140 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libkmod2 ppc64el 31+20240202-2ubuntu4 [64.4 kB] 126s Get:141 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libselinux1 ppc64el 3.5-2ubuntu1 [101 kB] 126s Get:142 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libaudit-common all 1:3.1.2-2.1 [5674 B] 126s Get:143 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libcap-ng0 ppc64el 0.8.4-2build1 [16.2 kB] 126s Get:144 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libaudit1 ppc64el 1:3.1.2-2.1 [52.8 kB] 126s Get:145 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpam0g ppc64el 1.5.3-5ubuntu3 [75.7 kB] 126s Get:146 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpam-modules-bin ppc64el 1.5.3-5ubuntu3 [57.9 kB] 126s Get:147 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpam-modules ppc64el 1.5.3-5ubuntu3 [320 kB] 126s Get:148 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpam-runtime all 1.5.3-5ubuntu3 [40.8 kB] 126s Get:149 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dbus-session-bus-common all 1.14.10-4ubuntu2 [80.3 kB] 126s Get:150 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dbus-user-session ppc64el 1.14.10-4ubuntu2 [9960 B] 126s Get:151 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libapparmor1 ppc64el 4.0.0-beta3-0ubuntu2 [55.0 kB] 126s Get:152 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libexpat1 ppc64el 2.6.1-2 [101 kB] 126s Get:153 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dbus-system-bus-common all 1.14.10-4ubuntu2 [81.5 kB] 126s Get:154 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dbus-bin ppc64el 1.14.10-4ubuntu2 [48.1 kB] 126s Get:155 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dbus ppc64el 1.14.10-4ubuntu2 [26.9 kB] 126s Get:156 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dbus-daemon ppc64el 1.14.10-4ubuntu2 [136 kB] 126s Get:157 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdbus-1-3 ppc64el 1.14.10-4ubuntu2 [244 kB] 126s Get:158 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdevmapper1.02.1 ppc64el 2:1.02.185-3ubuntu2 [182 kB] 126s Get:159 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libuuid1 ppc64el 2.39.3-9ubuntu2 [39.3 kB] 126s Get:160 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libcryptsetup12 ppc64el 2:2.7.0-1ubuntu2 [376 kB] 127s Get:161 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libfdisk1 ppc64el 2.39.3-9ubuntu2 [171 kB] 127s Get:162 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libseccomp2 ppc64el 2.5.5-1ubuntu2 [62.5 kB] 127s Get:163 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el mount ppc64el 2.39.3-9ubuntu2 [125 kB] 127s Get:164 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libmount1 ppc64el 2.39.3-9ubuntu2 [169 kB] 127s Get:165 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el zlib1g ppc64el 1:1.3.dfsg-3.1ubuntu1 [72.8 kB] 127s Get:166 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-minimal ppc64el 3.12.2-0ubuntu1 [27.1 kB] 127s Get:167 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3 ppc64el 3.12.2-0ubuntu1 [24.1 kB] 127s Get:168 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libplymouth5 ppc64el 24.004.60-1ubuntu6 [166 kB] 127s Get:169 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpng16-16t64 ppc64el 1.6.43-3 [242 kB] 127s Get:170 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libbrotli1 ppc64el 1.1.0-2build1 [410 kB] 127s Get:171 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libfreetype6 ppc64el 2.13.2+dfsg-1build2 [545 kB] 127s Get:172 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsqlite3-0 ppc64el 3.45.1-1ubuntu1 [804 kB] 127s Get:173 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el pinentry-curses ppc64el 1.2.1-3ubuntu4 [38.7 kB] 127s Get:174 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gcc-14-base ppc64el 14-20240315-1ubuntu1 [47.0 kB] 127s Get:175 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgcc-s1 ppc64el 14-20240315-1ubuntu1 [39.2 kB] 127s Get:176 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libstdc++6 ppc64el 14-20240315-1ubuntu1 [897 kB] 127s Get:177 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python-apt-common all 2.7.7 [19.8 kB] 127s Get:178 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsmartcols1 ppc64el 2.39.3-9ubuntu2 [79.0 kB] 127s Get:179 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el readline-common all 8.2-4 [56.4 kB] 127s Get:180 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bsdextrautils ppc64el 2.39.3-9ubuntu2 [78.6 kB] 127s Get:181 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el groff-base ppc64el 1.23.0-3build1 [1112 kB] 127s Get:182 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpython3-stdlib ppc64el 3.12.2-0ubuntu1 [9798 B] 127s Get:183 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libfido2-1 ppc64el 1.14.0-1build1 [111 kB] 127s Get:184 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgssapi-krb5-2 ppc64el 1.20.1-6ubuntu1 [185 kB] 127s Get:185 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libkrb5-3 ppc64el 1.20.1-6ubuntu1 [432 kB] 127s Get:186 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libkrb5support0 ppc64el 1.20.1-6ubuntu1 [38.5 kB] 127s Get:187 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libk5crypto3 ppc64el 1.20.1-6ubuntu1 [108 kB] 127s Get:188 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libcom-err2 ppc64el 1.47.0-2.4~exp1ubuntu2 [22.9 kB] 127s Get:189 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libproc2-0 ppc64el 2:4.0.4-4ubuntu2 [68.8 kB] 127s Get:190 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el procps ppc64el 2:4.0.4-4ubuntu2 [736 kB] 127s Get:191 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libnghttp2-14 ppc64el 1.59.0-1build1 [89.0 kB] 127s Get:192 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dpkg ppc64el 1.22.6ubuntu5 [1343 kB] 127s Get:193 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el util-linux ppc64el 2.39.3-9ubuntu2 [1195 kB] 127s Get:194 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libxml2 ppc64el 2.9.14+dfsg-1.3ubuntu2 [840 kB] 127s Get:195 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libbpf1 ppc64el 1:1.3.0-2build1 [216 kB] 127s Get:196 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el iproute2 ppc64el 6.1.0-1ubuntu5 [1384 kB] 127s Get:197 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libelf1t64 ppc64el 0.190-1.1build2 [69.3 kB] 127s Get:198 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dhcpcd-base ppc64el 1:10.0.6-1ubuntu2 [276 kB] 127s Get:199 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el file ppc64el 1:5.45-3 [22.7 kB] 127s Get:200 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libmagic-mgc ppc64el 1:5.45-3 [307 kB] 127s Get:201 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libmagic1t64 ppc64el 1:5.45-3 [106 kB] 127s Get:202 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libtirpc-common all 1.3.4+ds-1.1 [8018 B] 127s Get:203 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el lsof ppc64el 4.95.0-1build2 [256 kB] 128s Get:204 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libnsl2 ppc64el 1.3.0-3build2 [48.9 kB] 128s Get:205 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libtirpc3t64 ppc64el 1.3.4+ds-1.1 [102 kB] 128s Get:206 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el multipath-tools ppc64el 0.9.4-5ubuntu6 [341 kB] 128s Get:207 http://ftpmaster.internal/ubuntu noble/main ppc64el liburcu8t64 ppc64el 0.14.0-3.1 [73.6 kB] 128s Get:208 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bind9-host ppc64el 1:9.18.24-0ubuntu3 [54.5 kB] 128s Get:209 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bind9-dnsutils ppc64el 1:9.18.24-0ubuntu3 [167 kB] 128s Get:210 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el bind9-libs ppc64el 1:9.18.24-0ubuntu3 [1436 kB] 128s Get:211 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libuv1t64 ppc64el 1.48.0-1.1 [117 kB] 128s Get:212 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el liblocale-gettext-perl ppc64el 1.07-6ubuntu4 [16.1 kB] 128s Get:213 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el uuid-runtime ppc64el 2.39.3-9ubuntu2 [33.8 kB] 128s Get:214 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdebconfclient0 ppc64el 0.271ubuntu2 [11.2 kB] 128s Get:215 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsemanage-common all 3.5-1build4 [10.1 kB] 128s Get:216 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsemanage2 ppc64el 3.5-1build4 [115 kB] 128s Get:217 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el install-info ppc64el 7.1-3build1 [64.5 kB] 128s Get:218 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gcc-13-base ppc64el 13.2.0-21ubuntu1 [48.3 kB] 128s Get:219 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libss2 ppc64el 1.47.0-2.4~exp1ubuntu2 [18.0 kB] 128s Get:220 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dmsetup ppc64el 2:1.02.185-3ubuntu2 [91.8 kB] 128s Get:221 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el eject ppc64el 2.39.3-9ubuntu2 [28.2 kB] 128s Get:222 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el krb5-locales all 1.20.1-6ubuntu1 [13.8 kB] 128s Get:223 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libglib2.0-data all 2.79.3-3ubuntu5 [46.6 kB] 128s Get:224 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libslang2 ppc64el 2.3.3-3build1 [501 kB] 128s Get:225 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libtext-charwidth-perl ppc64el 0.04-11build2 [9506 B] 128s Get:226 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libtext-iconv-perl ppc64el 1.7-8build2 [13.7 kB] 128s Get:227 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-yaml ppc64el 6.0.1-2build1 [123 kB] 128s Get:228 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-setuptools all 68.1.2-2ubuntu1 [396 kB] 128s Get:229 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-pkg-resources all 68.1.2-2ubuntu1 [168 kB] 128s Get:230 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el rsyslog ppc64el 8.2312.0-3ubuntu7 [629 kB] 128s Get:231 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el vim-tiny ppc64el 2:9.1.0016-1ubuntu6 [1042 kB] 128s Get:232 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el vim-common all 2:9.1.0016-1ubuntu6 [385 kB] 128s Get:233 http://ftpmaster.internal/ubuntu noble/main ppc64el xdg-user-dirs ppc64el 0.18-1 [20.0 kB] 128s Get:234 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el xxd ppc64el 2:9.1.0016-1ubuntu6 [63.7 kB] 128s Get:235 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el apparmor ppc64el 4.0.0-beta3-0ubuntu2 [747 kB] 128s Get:236 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el ftp all 20230507-2build1 [4724 B] 128s Get:237 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el inetutils-telnet ppc64el 2:2.5-3ubuntu3 [115 kB] 129s Get:238 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el info ppc64el 7.1-3build1 [188 kB] 129s Get:239 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libusb-1.0-0 ppc64el 2:1.0.27-1 [64.0 kB] 129s Get:240 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libxmuu1 ppc64el 2:1.1.3-3build1 [9488 B] 129s Get:241 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el lshw ppc64el 02.19.git.2021.06.19.996aaad9c7-2build2 [334 kB] 129s Get:242 http://ftpmaster.internal/ubuntu noble/main ppc64el manpages all 6.05.01-1 [1340 kB] 129s Get:243 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el mtr-tiny ppc64el 0.95-1.1build1 [62.8 kB] 129s Get:244 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el plymouth-theme-ubuntu-text ppc64el 24.004.60-1ubuntu6 [11.1 kB] 129s Get:245 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el plymouth ppc64el 24.004.60-1ubuntu6 [155 kB] 129s Get:246 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el telnet all 0.17+2.5-3ubuntu3 [3682 B] 129s Get:247 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el usb.ids all 2024.03.18-1 [223 kB] 129s Get:248 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el xz-utils ppc64el 5.6.0-0.2 [281 kB] 129s Get:249 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libctf0 ppc64el 2.42-4ubuntu1 [112 kB] 129s Get:250 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libctf-nobfd0 ppc64el 2.42-4ubuntu1 [112 kB] 129s Get:251 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el binutils-powerpc64le-linux-gnu ppc64el 2.42-4ubuntu1 [2473 kB] 129s Get:252 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libbinutils ppc64el 2.42-4ubuntu1 [699 kB] 129s Get:253 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el binutils ppc64el 2.42-4ubuntu1 [3078 B] 129s Get:254 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el binutils-common ppc64el 2.42-4ubuntu1 [217 kB] 129s Get:255 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsframe1 ppc64el 2.42-4ubuntu1 [16.0 kB] 129s Get:256 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libllvm18 ppc64el 1:18.1.2-1ubuntu2 [28.9 MB] 131s Get:257 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libclang-cpp18 ppc64el 1:18.1.2-1ubuntu2 [14.6 MB] 132s Get:258 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el libbpfcc ppc64el 0.29.1+ds-1ubuntu4 [707 kB] 132s Get:259 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el python3-bpfcc all 0.29.1+ds-1ubuntu4 [40.2 kB] 132s Get:260 http://ftpmaster.internal/ubuntu noble/main ppc64el ieee-data all 20220827.1 [2113 kB] 132s Get:261 http://ftpmaster.internal/ubuntu noble/main ppc64el python3-netaddr all 0.8.0-2ubuntu1 [319 kB] 132s Get:262 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el bpfcc-tools all 0.29.1+ds-1ubuntu4 [687 kB] 132s Get:263 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libclang1-18 ppc64el 1:18.1.2-1ubuntu2 [8725 kB] 132s Get:264 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdw1t64 ppc64el 0.190-1.1build2 [301 kB] 132s Get:265 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el bpftrace ppc64el 0.20.2-1ubuntu1 [1058 kB] 132s Get:266 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el cryptsetup-bin ppc64el 2:2.7.0-1ubuntu2 [227 kB] 132s Get:267 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dpkg-dev all 1.22.6ubuntu5 [1074 kB] 132s Get:268 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdpkg-perl all 1.22.6ubuntu5 [269 kB] 133s Get:269 http://ftpmaster.internal/ubuntu noble/main ppc64el fonts-dejavu-mono all 2.37-8 [502 kB] 133s Get:270 http://ftpmaster.internal/ubuntu noble/main ppc64el fonts-dejavu-core all 2.37-8 [835 kB] 133s Get:271 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el fontconfig-config ppc64el 2.15.0-1.1ubuntu1 [37.4 kB] 133s Get:272 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libprotobuf-c1 ppc64el 1.4.1-1ubuntu3 [25.9 kB] 133s Get:273 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gnupg-l10n all 2.4.4-2ubuntu15 [65.8 kB] 133s Get:274 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libibverbs1 ppc64el 50.0-2build1 [74.4 kB] 133s Get:275 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el ibverbs-providers ppc64el 50.0-2build1 [420 kB] 133s Get:276 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el jq ppc64el 1.7.1-3 [66.1 kB] 133s Get:277 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libjq1 ppc64el 1.7.1-3 [173 kB] 133s Get:278 http://ftpmaster.internal/ubuntu noble/main ppc64el libaio1t64 ppc64el 0.3.113-6 [8188 B] 133s Get:279 http://ftpmaster.internal/ubuntu noble/main ppc64el libatm1t64 ppc64el 1:2.5.1-5.1 [26.9 kB] 133s Get:280 http://ftpmaster.internal/ubuntu noble/main ppc64el libc-dev-bin ppc64el 2.39-0ubuntu6 [21.3 kB] 133s Get:281 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libfontconfig1 ppc64el 2.15.0-1.1ubuntu1 [190 kB] 133s Get:282 http://ftpmaster.internal/ubuntu noble/main ppc64el libjpeg-turbo8 ppc64el 2.1.5-2ubuntu1 [212 kB] 133s Get:283 http://ftpmaster.internal/ubuntu noble/main ppc64el libjpeg8 ppc64el 8c-2ubuntu11 [2148 B] 133s Get:284 http://ftpmaster.internal/ubuntu noble/main ppc64el libdeflate0 ppc64el 1.19-1 [61.9 kB] 133s Get:285 http://ftpmaster.internal/ubuntu noble/main ppc64el libjbig0 ppc64el 2.1-6.1ubuntu1 [34.7 kB] 133s Get:286 http://ftpmaster.internal/ubuntu noble/main ppc64el liblerc4 ppc64el 4.0.0+ds-4ubuntu1 [266 kB] 133s Get:287 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libsharpyuv0 ppc64el 1.3.2-0.4build2 [28.8 kB] 133s Get:288 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libwebp7 ppc64el 1.3.2-0.4build2 [312 kB] 133s Get:289 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libtiff6 ppc64el 4.5.1+git230720-4ubuntu1 [274 kB] 133s Get:290 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libxpm4 ppc64el 1:3.5.17-1build1 [50.2 kB] 133s Get:291 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgd3 ppc64el 2.3.3-9ubuntu3 [162 kB] 133s Get:292 http://ftpmaster.internal/ubuntu noble/main ppc64el libc-devtools ppc64el 2.39-0ubuntu6 [29.6 kB] 133s Get:293 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-libc-dev ppc64el 6.8.0-20.20 [1586 kB] 133s Get:294 http://ftpmaster.internal/ubuntu noble/main ppc64el libcrypt-dev ppc64el 1:4.4.36-4 [167 kB] 133s Get:295 http://ftpmaster.internal/ubuntu noble/main ppc64el rpcsvc-proto ppc64el 1.4.2-0ubuntu6 [82.3 kB] 133s Get:296 http://ftpmaster.internal/ubuntu noble/main ppc64el libc6-dev ppc64el 2.39-0ubuntu6 [2102 kB] 133s Get:297 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libevent-core-2.1-7 ppc64el 2.1.12-stable-9build1 [110 kB] 133s Get:298 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libftdi1-2 ppc64el 1.5-6build4 [32.5 kB] 133s Get:299 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libldap-common all 2.6.7+dfsg-1~exp1ubuntu6 [31.3 kB] 133s Get:300 http://ftpmaster.internal/ubuntu noble/main ppc64el libunwind8 ppc64el 1.6.2-3 [59.9 kB] 133s Get:301 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-modules-6.8.0-20-generic ppc64el 6.8.0-20.20 [31.3 MB] 135s Get:302 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-image-6.8.0-20-generic ppc64el 6.8.0-20.20 [63.9 MB] 140s Get:303 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-modules-extra-6.8.0-20-generic ppc64el 6.8.0-20.20 [103 MB] 148s Get:304 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-generic ppc64el 6.8.0-20.20+1 [1734 B] 148s Get:305 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-image-generic ppc64el 6.8.0-20.20+1 [9698 B] 148s Get:306 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-virtual ppc64el 6.8.0-20.20+1 [1686 B] 148s Get:307 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-image-virtual ppc64el 6.8.0-20.20+1 [9702 B] 148s Get:308 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-headers-virtual ppc64el 6.8.0-20.20+1 [1648 B] 148s Get:309 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-headers-6.8.0-20 all 6.8.0-20.20 [13.6 MB] 149s Get:310 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-headers-6.8.0-20-generic ppc64el 6.8.0-20.20 [3728 kB] 149s Get:311 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-headers-generic ppc64el 6.8.0-20.20+1 [9612 B] 149s Get:312 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-tools-common all 6.8.0-20.20 [437 kB] 150s Get:313 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-tools-6.8.0-20 ppc64el 6.8.0-20.20 [2924 kB] 150s Get:314 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el linux-tools-6.8.0-20-generic ppc64el 6.8.0-20.20 [1730 B] 150s Get:315 http://ftpmaster.internal/ubuntu noble/main ppc64el manpages-dev all 6.05.01-1 [2018 kB] 150s Get:316 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-distutils all 3.12.2-3ubuntu1.1 [133 kB] 150s Get:317 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-lib2to3 all 3.12.2-3ubuntu1.1 [79.1 kB] 150s Get:318 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-pyrsistent ppc64el 0.20.0-1build1 [60.4 kB] 150s Get:319 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el python3-typing-extensions all 4.10.0-1 [60.7 kB] 150s Get:320 http://ftpmaster.internal/ubuntu noble/main ppc64el ubuntu-kernel-accessories ppc64el 1.536build1 [10.5 kB] 150s Get:321 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el kpartx ppc64el 0.9.4-5ubuntu6 [34.4 kB] 150s Preconfiguring packages ... 151s Fetched 390 MB in 31s (12.8 MB/s) 151s (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 ... 70153 files and directories currently installed.) 151s Preparing to unpack .../motd-news-config_13ubuntu8_all.deb ... 151s Unpacking motd-news-config (13ubuntu8) over (13ubuntu7) ... 151s Preparing to unpack .../base-files_13ubuntu8_ppc64el.deb ... 151s Unpacking base-files (13ubuntu8) over (13ubuntu7) ... 151s Setting up base-files (13ubuntu8) ... 152s motd-news.service is a disabled or a static unit not running, not starting it. 152s (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 ... 70153 files and directories currently installed.) 152s Preparing to unpack .../bash_5.2.21-2ubuntu3_ppc64el.deb ... 152s Unpacking bash (5.2.21-2ubuntu3) over (5.2.21-2ubuntu2) ... 152s Setting up bash (5.2.21-2ubuntu3) ... 152s 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 152s (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 ... 70153 files and directories currently installed.) 152s Preparing to unpack .../bsdutils_1%3a2.39.3-9ubuntu2_ppc64el.deb ... 152s Unpacking bsdutils (1:2.39.3-9ubuntu2) over (1:2.39.3-6ubuntu2) ... 152s Setting up bsdutils (1:2.39.3-9ubuntu2) ... 152s (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 ... 70153 files and directories currently installed.) 152s Preparing to unpack .../coreutils_9.4-3ubuntu3_ppc64el.deb ... 152s Unpacking coreutils (9.4-3ubuntu3) over (9.4-2ubuntu4) ... 152s Setting up coreutils (9.4-3ubuntu3) ... 152s (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 ... 70153 files and directories currently installed.) 152s Preparing to unpack .../00-libudisks2-0_2.10.1-6_ppc64el.deb ... 152s Unpacking libudisks2-0:ppc64el (2.10.1-6) over (2.10.1-1ubuntu2) ... 152s Preparing to unpack .../01-udisks2_2.10.1-6_ppc64el.deb ... 152s Unpacking udisks2 (2.10.1-6) over (2.10.1-1ubuntu2) ... 153s Preparing to unpack .../02-shared-mime-info_2.4-1build1_ppc64el.deb ... 153s Unpacking shared-mime-info (2.4-1build1) over (2.4-1) ... 153s Preparing to unpack .../03-gir1.2-girepository-2.0_1.79.1-1ubuntu6_ppc64el.deb ... 153s Unpacking gir1.2-girepository-2.0:ppc64el (1.79.1-1ubuntu6) over (1.79.1-1) ... 153s Preparing to unpack .../04-gir1.2-glib-2.0_2.79.3-3ubuntu5_ppc64el.deb ... 153s Unpacking gir1.2-glib-2.0:ppc64el (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 153s Preparing to unpack .../05-libgirepository-1.0-1_1.79.1-1ubuntu6_ppc64el.deb ... 153s Unpacking libgirepository-1.0-1:ppc64el (1.79.1-1ubuntu6) over (1.79.1-1) ... 153s Preparing to unpack .../06-python3-gi_3.47.0-3build1_ppc64el.deb ... 153s Unpacking python3-gi (3.47.0-3build1) over (3.47.0-3) ... 153s Preparing to unpack .../07-python3-dbus_1.3.2-5build2_ppc64el.deb ... 153s Unpacking python3-dbus (1.3.2-5build2) over (1.3.2-5build1) ... 153s Selecting previously unselected package libnetplan1:ppc64el. 153s Preparing to unpack .../08-libnetplan1_1.0-1_ppc64el.deb ... 153s Unpacking libnetplan1:ppc64el (1.0-1) ... 153s Preparing to unpack .../09-python3-netplan_1.0-1_ppc64el.deb ... 153s Unpacking python3-netplan (1.0-1) over (0.107.1-3) ... 153s Preparing to unpack .../10-netplan-generator_1.0-1_ppc64el.deb ... 153s Adding 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 153s Unpacking netplan-generator (1.0-1) over (0.107.1-3) ... 153s Preparing to unpack .../11-initramfs-tools-bin_0.142ubuntu23_ppc64el.deb ... 153s Unpacking initramfs-tools-bin (0.142ubuntu23) over (0.142ubuntu20) ... 153s Preparing to unpack .../12-initramfs-tools-core_0.142ubuntu23_all.deb ... 153s Unpacking initramfs-tools-core (0.142ubuntu23) over (0.142ubuntu20) ... 153s Preparing to unpack .../13-initramfs-tools_0.142ubuntu23_all.deb ... 153s Unpacking initramfs-tools (0.142ubuntu23) over (0.142ubuntu20) ... 153s Preparing to unpack .../14-netplan.io_1.0-1_ppc64el.deb ... 153s Unpacking netplan.io (1.0-1) over (0.107.1-3) ... 153s Preparing to unpack .../15-libxmlb2_0.3.15-1build1_ppc64el.deb ... 153s Unpacking libxmlb2:ppc64el (0.3.15-1build1) over (0.3.15-1) ... 153s dpkg: libgpgme11:ppc64el: dependency problems, but removing anyway as you requested: 153s libvolume-key1:ppc64el depends on libgpgme11 (>= 1.4.1). 153s libjcat1:ppc64el depends on libgpgme11 (>= 1.2.0). 153s 153s (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 ... 70157 files and directories currently installed.) 153s Removing libgpgme11:ppc64el (1.18.0-4ubuntu1) ... 153s Selecting previously unselected package libgpgme11t64:ppc64el. 153s (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 ... 70151 files and directories currently installed.) 153s Preparing to unpack .../00-libgpgme11t64_1.18.0-4.1ubuntu3_ppc64el.deb ... 153s Unpacking libgpgme11t64:ppc64el (1.18.0-4.1ubuntu3) ... 153s Preparing to unpack .../01-libvolume-key1_0.3.12-7build1_ppc64el.deb ... 153s Unpacking libvolume-key1:ppc64el (0.3.12-7build1) over (0.3.12-5build2) ... 153s Preparing to unpack .../02-libqrtr-glib0_1.2.2-1ubuntu3_ppc64el.deb ... 153s Unpacking libqrtr-glib0:ppc64el (1.2.2-1ubuntu3) over (1.2.2-1ubuntu2) ... 153s Preparing to unpack .../03-libqmi-glib5_1.35.2-0ubuntu1_ppc64el.deb ... 153s Unpacking libqmi-glib5:ppc64el (1.35.2-0ubuntu1) over (1.34.0-2) ... 153s Preparing to unpack .../04-libqmi-proxy_1.35.2-0ubuntu1_ppc64el.deb ... 153s Unpacking libqmi-proxy (1.35.2-0ubuntu1) over (1.34.0-2) ... 153s Preparing to unpack .../05-libpolkit-agent-1-0_124-1ubuntu1_ppc64el.deb ... 153s Unpacking libpolkit-agent-1-0:ppc64el (124-1ubuntu1) over (124-1) ... 153s Preparing to unpack .../06-libpolkit-gobject-1-0_124-1ubuntu1_ppc64el.deb ... 153s Unpacking libpolkit-gobject-1-0:ppc64el (124-1ubuntu1) over (124-1) ... 153s Preparing to unpack .../07-libmm-glib0_1.23.4-0ubuntu1_ppc64el.deb ... 153s Unpacking libmm-glib0:ppc64el (1.23.4-0ubuntu1) over (1.22.0-3) ... 153s Preparing to unpack .../08-libmbim-glib4_1.31.2-0ubuntu2_ppc64el.deb ... 153s Unpacking libmbim-glib4:ppc64el (1.31.2-0ubuntu2) over (1.30.0-1) ... 153s Preparing to unpack .../09-libmbim-proxy_1.31.2-0ubuntu2_ppc64el.deb ... 153s Unpacking libmbim-proxy (1.31.2-0ubuntu2) over (1.30.0-1) ... 153s Preparing to unpack .../10-libjson-glib-1.0-common_1.8.0-2build1_all.deb ... 153s Unpacking libjson-glib-1.0-common (1.8.0-2build1) over (1.8.0-2) ... 153s Preparing to unpack .../11-libjson-glib-1.0-0_1.8.0-2build1_ppc64el.deb ... 153s Unpacking libjson-glib-1.0-0:ppc64el (1.8.0-2build1) over (1.8.0-2) ... 153s Preparing to unpack .../12-libgusb2_0.4.8-1build1_ppc64el.deb ... 153s Unpacking libgusb2:ppc64el (0.4.8-1build1) over (0.4.8-1) ... 153s Preparing to unpack .../13-libgudev-1.0-0_1%3a238-3ubuntu2_ppc64el.deb ... 153s Unpacking libgudev-1.0-0:ppc64el (1:238-3ubuntu2) over (1:238-3) ... 153s Preparing to unpack .../14-tnftp_20230507-2build1_ppc64el.deb ... 153s Unpacking tnftp (20230507-2build1) over (20230507-2) ... 153s Preparing to unpack .../15-tcpdump_4.99.4-3ubuntu2_ppc64el.deb ... 153s Unpacking tcpdump (4.99.4-3ubuntu2) over (4.99.4-3ubuntu1) ... 153s Preparing to unpack .../16-libsystemd0_255.4-1ubuntu5_ppc64el.deb ... 153s Unpacking libsystemd0:ppc64el (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 153s Setting up libsystemd0:ppc64el (255.4-1ubuntu5) ... 153s (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 ... 70158 files and directories currently installed.) 153s Preparing to unpack .../systemd-dev_255.4-1ubuntu5_all.deb ... 153s Unpacking systemd-dev (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 154s Preparing to unpack .../libnss-systemd_255.4-1ubuntu5_ppc64el.deb ... 154s Unpacking libnss-systemd:ppc64el (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 154s Preparing to unpack .../libudev1_255.4-1ubuntu5_ppc64el.deb ... 154s Unpacking libudev1:ppc64el (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 154s Setting up libudev1:ppc64el (255.4-1ubuntu5) ... 154s dpkg: libssl3:ppc64el: dependency problems, but removing anyway as you requested: 154s wget depends on libssl3 (>= 3.0.0). 154s systemd-resolved depends on libssl3 (>= 3.0.0). 154s systemd depends on libssl3 (>= 3.0.0). 154s sudo depends on libssl3 (>= 3.0.0). 154s rsync depends on libssl3 (>= 3.0.0). 154s python3-cryptography depends on libssl3 (>= 3.0.0). 154s openssl depends on libssl3 (>= 3.0.9). 154s openssh-server depends on libssl3 (>= 3.0.10). 154s openssh-client depends on libssl3 (>= 3.0.10). 154s linux-headers-6.8.0-11-generic depends on libssl3 (>= 3.0.0). 154s libsystemd-shared:ppc64el depends on libssl3 (>= 3.0.0). 154s libssh-4:ppc64el depends on libssl3 (>= 3.0.0). 154s libsasl2-modules:ppc64el depends on libssl3 (>= 3.0.0). 154s libsasl2-2:ppc64el depends on libssl3 (>= 3.0.0). 154s libpython3.12-minimal:ppc64el depends on libssl3 (>= 3.0.0). 154s libpython3.11-minimal:ppc64el depends on libssl3 (>= 3.0.0). 154s libnvme1 depends on libssl3 (>= 3.0.0). 154s libkrb5-3:ppc64el depends on libssl3 (>= 3.0.0). 154s libkmod2:ppc64el depends on libssl3 (>= 3.0.0). 154s libfido2-1:ppc64el depends on libssl3 (>= 3.0.0). 154s libcurl4:ppc64el depends on libssl3 (>= 3.0.0). 154s libcryptsetup12:ppc64el depends on libssl3 (>= 3.0.0). 154s kmod depends on libssl3 (>= 3.0.0). 154s dhcpcd-base depends on libssl3 (>= 3.0.0). 154s coreutils depends on libssl3 (>= 3.0.0). 154s bind9-libs:ppc64el depends on libssl3 (>= 3.0.0). 154s 154s (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 ... 70158 files and directories currently installed.) 154s Removing libssl3:ppc64el (3.0.10-1ubuntu4) ... 154s Selecting previously unselected package libssl3t64:ppc64el. 154s (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 ... 70147 files and directories currently installed.) 154s Preparing to unpack .../libssl3t64_3.0.13-0ubuntu2_ppc64el.deb ... 154s Unpacking libssl3t64:ppc64el (3.0.13-0ubuntu2) ... 154s Setting up libssl3t64:ppc64el (3.0.13-0ubuntu2) ... 154s (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 ... 70160 files and directories currently installed.) 154s Preparing to unpack .../systemd_255.4-1ubuntu5_ppc64el.deb ... 154s Unpacking systemd (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 154s Preparing to unpack .../udev_255.4-1ubuntu5_ppc64el.deb ... 154s Unpacking udev (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 154s Preparing to unpack .../libsystemd-shared_255.4-1ubuntu5_ppc64el.deb ... 154s Unpacking libsystemd-shared:ppc64el (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 154s Setting up libsystemd-shared:ppc64el (255.4-1ubuntu5) ... 154s Setting up systemd-dev (255.4-1ubuntu5) ... 154s Setting up systemd (255.4-1ubuntu5) ... 155s (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 ... 70160 files and directories currently installed.) 155s Preparing to unpack .../00-systemd-sysv_255.4-1ubuntu5_ppc64el.deb ... 155s Unpacking systemd-sysv (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 155s Preparing to unpack .../01-libpam-systemd_255.4-1ubuntu5_ppc64el.deb ... 155s Unpacking libpam-systemd:ppc64el (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 155s Preparing to unpack .../02-systemd-timesyncd_255.4-1ubuntu5_ppc64el.deb ... 155s Unpacking systemd-timesyncd (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 155s Preparing to unpack .../03-systemd-resolved_255.4-1ubuntu5_ppc64el.deb ... 155s Unpacking systemd-resolved (255.4-1ubuntu5) over (255.2-3ubuntu2) ... 155s Preparing to unpack .../04-sudo_1.9.15p5-3ubuntu3_ppc64el.deb ... 155s Unpacking sudo (1.9.15p5-3ubuntu3) over (1.9.15p5-3ubuntu1) ... 155s Preparing to unpack .../05-rsync_3.2.7-1build1_ppc64el.deb ... 155s Unpacking rsync (3.2.7-1build1) over (3.2.7-1) ... 155s Preparing to unpack .../06-python3-cryptography_41.0.7-4build2_ppc64el.deb ... 155s Unpacking python3-cryptography (41.0.7-4build2) over (41.0.7-3) ... 155s Preparing to unpack .../07-openssl_3.0.13-0ubuntu2_ppc64el.deb ... 155s Unpacking openssl (3.0.13-0ubuntu2) over (3.0.10-1ubuntu4) ... 155s Preparing to unpack .../08-openssh-sftp-server_1%3a9.6p1-3ubuntu11_ppc64el.deb ... 155s Unpacking openssh-sftp-server (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 155s Preparing to unpack .../09-openssh-client_1%3a9.6p1-3ubuntu11_ppc64el.deb ... 155s Unpacking openssh-client (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 156s Preparing to unpack .../10-openssh-server_1%3a9.6p1-3ubuntu11_ppc64el.deb ... 156s Unpacking openssh-server (1:9.6p1-3ubuntu11) over (1:9.6p1-3ubuntu2) ... 156s Preparing to unpack .../11-libssh-4_0.10.6-2build1_ppc64el.deb ... 156s Unpacking libssh-4:ppc64el (0.10.6-2build1) over (0.10.6-2) ... 156s Preparing to unpack .../12-libsasl2-modules_2.1.28+dfsg1-5ubuntu1_ppc64el.deb ... 156s Unpacking libsasl2-modules:ppc64el (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 156s Preparing to unpack .../13-python3.12_3.12.2-4build3_ppc64el.deb ... 156s Unpacking python3.12 (3.12.2-4build3) over (3.12.2-1) ... 156s Preparing to unpack .../14-python3.12-minimal_3.12.2-4build3_ppc64el.deb ... 156s Unpacking python3.12-minimal (3.12.2-4build3) over (3.12.2-1) ... 156s Preparing to unpack .../15-libpython3.12-minimal_3.12.2-4build3_ppc64el.deb ... 156s Unpacking libpython3.12-minimal:ppc64el (3.12.2-4build3) over (3.12.2-1) ... 156s Preparing to unpack .../16-grub-ieee1275_2.12-1ubuntu5_ppc64el.deb ... 156s Unpacking grub-ieee1275 (2.12-1ubuntu5) over (2.12-1ubuntu4) ... 156s Preparing to unpack .../17-grub2-common_2.12-1ubuntu5_ppc64el.deb ... 156s Unpacking grub2-common (2.12-1ubuntu5) over (2.12-1ubuntu4) ... 156s Preparing to unpack .../18-grub-common_2.12-1ubuntu5_ppc64el.deb ... 156s Unpacking grub-common (2.12-1ubuntu5) over (2.12-1ubuntu4) ... 156s Preparing to unpack .../19-grub-ieee1275-bin_2.12-1ubuntu5_ppc64el.deb ... 156s Unpacking grub-ieee1275-bin (2.12-1ubuntu5) over (2.12-1ubuntu4) ... 156s dpkg: libparted2:ppc64el: dependency problems, but removing anyway as you requested: 156s parted depends on libparted2 (= 3.6-3). 156s 156s (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 ... 70160 files and directories currently installed.) 156s Removing libparted2:ppc64el (3.6-3) ... 156s Selecting previously unselected package libparted2t64:ppc64el. 156s (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 ... 70154 files and directories currently installed.) 156s Preparing to unpack .../0-libparted2t64_3.6-3.1build2_ppc64el.deb ... 156s Unpacking libparted2t64:ppc64el (3.6-3.1build2) ... 157s Preparing to unpack .../1-parted_3.6-3.1build2_ppc64el.deb ... 157s Unpacking parted (3.6-3.1build2) over (3.6-3) ... 157s Preparing to unpack .../2-python3.11_3.11.8-1build4_ppc64el.deb ... 157s Unpacking python3.11 (3.11.8-1build4) over (3.11.8-1) ... 157s Preparing to unpack .../3-python3.11-minimal_3.11.8-1build4_ppc64el.deb ... 157s Unpacking python3.11-minimal (3.11.8-1build4) over (3.11.8-1) ... 157s Preparing to unpack .../4-libpython3.11-minimal_3.11.8-1build4_ppc64el.deb ... 157s Unpacking libpython3.11-minimal:ppc64el (3.11.8-1build4) over (3.11.8-1) ... 157s Preparing to unpack .../5-libpython3.11-stdlib_3.11.8-1build4_ppc64el.deb ... 157s Unpacking libpython3.11-stdlib:ppc64el (3.11.8-1build4) over (3.11.8-1) ... 157s Preparing to unpack .../6-gnupg-utils_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking gnupg-utils (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Preparing to unpack .../7-gpg-agent_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking gpg-agent (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Preparing to unpack .../8-gpg-wks-client_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking gpg-wks-client (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Preparing to unpack .../9-gpg_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking gpg (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s dpkg: libnpth0:ppc64el: dependency problems, but removing anyway as you requested: 157s keyboxd depends on libnpth0 (>= 0.90). 157s gpgv depends on libnpth0 (>= 0.90). 157s gpgsm depends on libnpth0 (>= 0.90). 157s dirmngr depends on libnpth0 (>= 0.90). 157s 157s (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 ... 70159 files and directories currently installed.) 157s Removing libnpth0:ppc64el (1.6-3build2) ... 157s Selecting previously unselected package libnpth0t64:ppc64el. 157s (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 ... 70154 files and directories currently installed.) 157s Preparing to unpack .../libnpth0t64_1.6-3.1_ppc64el.deb ... 157s Unpacking libnpth0t64:ppc64el (1.6-3.1) ... 157s Setting up libnpth0t64:ppc64el (1.6-3.1) ... 157s (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 ... 70160 files and directories currently installed.) 157s Preparing to unpack .../gpgv_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking gpgv (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Setting up gpgv (2.4.4-2ubuntu15) ... 157s (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 ... 70160 files and directories currently installed.) 157s Preparing to unpack .../dirmngr_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking dirmngr (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Preparing to unpack .../gnupg_2.4.4-2ubuntu15_all.deb ... 157s Unpacking gnupg (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Preparing to unpack .../keyboxd_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking keyboxd (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 157s Preparing to unpack .../gpgconf_2.4.4-2ubuntu15_ppc64el.deb ... 157s Unpacking gpgconf (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 158s Preparing to unpack .../gpgsm_2.4.4-2ubuntu15_ppc64el.deb ... 158s Unpacking gpgsm (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 158s dpkg: libreadline8:ppc64el: dependency problems, but removing anyway as you requested: 158s libpython3.12-stdlib:ppc64el depends on libreadline8 (>= 7.0~beta). 158s gawk depends on libreadline8 (>= 6.0). 158s fdisk depends on libreadline8 (>= 6.0). 158s bc depends on libreadline8 (>= 6.0). 158s 158s (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 ... 70160 files and directories currently installed.) 158s Removing libreadline8:ppc64el (8.2-3) ... 158s Selecting previously unselected package libreadline8t64:ppc64el. 158s (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 ... 70148 files and directories currently installed.) 158s Preparing to unpack .../libreadline8t64_8.2-4_ppc64el.deb ... 158s Adding 'diversion of /lib/powerpc64le-linux-gnu/libhistory.so.8 to /lib/powerpc64le-linux-gnu/libhistory.so.8.usr-is-merged by libreadline8t64' 158s Adding 'diversion of /lib/powerpc64le-linux-gnu/libhistory.so.8.2 to /lib/powerpc64le-linux-gnu/libhistory.so.8.2.usr-is-merged by libreadline8t64' 158s Adding 'diversion of /lib/powerpc64le-linux-gnu/libreadline.so.8 to /lib/powerpc64le-linux-gnu/libreadline.so.8.usr-is-merged by libreadline8t64' 158s Adding 'diversion of /lib/powerpc64le-linux-gnu/libreadline.so.8.2 to /lib/powerpc64le-linux-gnu/libreadline.so.8.2.usr-is-merged by libreadline8t64' 158s Unpacking libreadline8t64:ppc64el (8.2-4) ... 158s Setting up libreadline8t64:ppc64el (8.2-4) ... 158s (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 ... 70168 files and directories currently installed.) 158s Preparing to unpack .../gawk_1%3a5.2.1-2build2_ppc64el.deb ... 158s Unpacking gawk (1:5.2.1-2build2) over (1:5.2.1-2) ... 158s Preparing to unpack .../fdisk_2.39.3-9ubuntu2_ppc64el.deb ... 158s Unpacking fdisk (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 158s Preparing to unpack .../bc_1.07.1-3ubuntu2_ppc64el.deb ... 158s Unpacking bc (1.07.1-3ubuntu2) over (1.07.1-3build1) ... 158s Preparing to unpack .../libpython3.12-stdlib_3.12.2-4build3_ppc64el.deb ... 158s Unpacking libpython3.12-stdlib:ppc64el (3.12.2-4build3) over (3.12.2-1) ... 158s Preparing to unpack .../perl-base_5.38.2-3.2_ppc64el.deb ... 158s Unpacking perl-base (5.38.2-3.2) over (5.38.2-3) ... 158s Setting up perl-base (5.38.2-3.2) ... 158s (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 ... 70166 files and directories currently installed.) 158s Preparing to unpack .../perl-modules-5.38_5.38.2-3.2_all.deb ... 158s Unpacking perl-modules-5.38 (5.38.2-3.2) over (5.38.2-3) ... 159s Preparing to unpack .../python3-gdbm_3.12.2-3ubuntu1.1_ppc64el.deb ... 159s Unpacking python3-gdbm:ppc64el (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 159s Preparing to unpack .../man-db_2.12.0-3build4_ppc64el.deb ... 159s Unpacking man-db (2.12.0-3build4) over (2.12.0-3) ... 159s dpkg: libgdbm-compat4:ppc64el: dependency problems, but removing anyway as you requested: 159s libperl5.38:ppc64el depends on libgdbm-compat4 (>= 1.18-3). 159s 159s (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 ... 70166 files and directories currently installed.) 159s Removing libgdbm-compat4:ppc64el (1.23-5) ... 159s dpkg: libgdbm6:ppc64el: dependency problems, but removing anyway as you requested: 159s libperl5.38:ppc64el depends on libgdbm6 (>= 1.21). 159s 159s Removing libgdbm6:ppc64el (1.23-5) ... 159s Selecting previously unselected package libgdbm6t64:ppc64el. 159s (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 ... 70156 files and directories currently installed.) 159s Preparing to unpack .../libgdbm6t64_1.23-5.1_ppc64el.deb ... 159s Unpacking libgdbm6t64:ppc64el (1.23-5.1) ... 159s Selecting previously unselected package libgdbm-compat4t64:ppc64el. 159s Preparing to unpack .../libgdbm-compat4t64_1.23-5.1_ppc64el.deb ... 159s Unpacking libgdbm-compat4t64:ppc64el (1.23-5.1) ... 159s dpkg: libperl5.38:ppc64el: dependency problems, but removing anyway as you requested: 159s perl depends on libperl5.38 (= 5.38.2-3). 159s 159s (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 ... 70168 files and directories currently installed.) 159s Removing libperl5.38:ppc64el (5.38.2-3) ... 159s Selecting previously unselected package libperl5.38t64:ppc64el. 159s (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 ... 69645 files and directories currently installed.) 159s Preparing to unpack .../libperl5.38t64_5.38.2-3.2_ppc64el.deb ... 159s Unpacking libperl5.38t64:ppc64el (5.38.2-3.2) ... 159s Preparing to unpack .../perl_5.38.2-3.2_ppc64el.deb ... 159s Unpacking perl (5.38.2-3.2) over (5.38.2-3) ... 160s dpkg: libdb5.3:ppc64el: dependency problems, but removing anyway as you requested: 160s libsasl2-modules-db:ppc64el depends on libdb5.3. 160s libpam-modules:ppc64el depends on libdb5.3. 160s iproute2 depends on libdb5.3. 160s apt-utils depends on libdb5.3. 160s 160s (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 ... 70168 files and directories currently installed.) 160s Removing libdb5.3:ppc64el (5.3.28+dfsg2-4) ... 160s Selecting previously unselected package libdb5.3t64:ppc64el. 160s (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 ... 70162 files and directories currently installed.) 160s Preparing to unpack .../libdb5.3t64_5.3.28+dfsg2-6_ppc64el.deb ... 160s Unpacking libdb5.3t64:ppc64el (5.3.28+dfsg2-6) ... 160s Preparing to unpack .../libsasl2-modules-db_2.1.28+dfsg1-5ubuntu1_ppc64el.deb ... 160s Unpacking libsasl2-modules-db:ppc64el (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 160s Preparing to unpack .../libsasl2-2_2.1.28+dfsg1-5ubuntu1_ppc64el.deb ... 160s Unpacking libsasl2-2:ppc64el (2.1.28+dfsg1-5ubuntu1) over (2.1.28+dfsg1-4) ... 160s dpkg: libnvme1: dependency problems, but removing anyway as you requested: 160s libblockdev-nvme3:ppc64el depends on libnvme1 (>= 1.7.1). 160s 160s (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 ... 70168 files and directories currently installed.) 160s Removing libnvme1 (1.8-2) ... 160s Selecting previously unselected package libnvme1t64. 160s (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 ... 70161 files and directories currently installed.) 160s Preparing to unpack .../libnvme1t64_1.8-3_ppc64el.deb ... 160s Unpacking libnvme1t64 (1.8-3) ... 160s Preparing to unpack .../wget_1.21.4-1ubuntu2_ppc64el.deb ... 160s Unpacking wget (1.21.4-1ubuntu2) over (1.21.4-1ubuntu1) ... 160s dpkg: libcurl4:ppc64el: dependency problems, but removing anyway as you requested: 160s curl depends on libcurl4 (= 8.5.0-2ubuntu2). 160s 160s (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 ... 70169 files and directories currently installed.) 160s Removing libcurl4:ppc64el (8.5.0-2ubuntu2) ... 160s Selecting previously unselected package libcurl4t64:ppc64el. 160s (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 ... 70164 files and directories currently installed.) 160s Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu8_ppc64el.deb ... 160s Unpacking libcurl4t64:ppc64el (8.5.0-2ubuntu8) ... 160s Preparing to unpack .../curl_8.5.0-2ubuntu8_ppc64el.deb ... 160s Unpacking curl (8.5.0-2ubuntu8) over (8.5.0-2ubuntu2) ... 160s dpkg: libpsl5:ppc64el: dependency problems, but removing anyway as you requested: 160s libcurl3-gnutls:ppc64el depends on libpsl5 (>= 0.16.0). 160s 160s (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 ... 70170 files and directories currently installed.) 160s Removing libpsl5:ppc64el (0.21.2-1build1) ... 160s Selecting previously unselected package libpsl5t64:ppc64el. 160s (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 ... 70165 files and directories currently installed.) 160s Preparing to unpack .../libpsl5t64_0.21.2-1.1_ppc64el.deb ... 160s Unpacking libpsl5t64:ppc64el (0.21.2-1.1) ... 160s dpkg: libarchive13:ppc64el: dependency problems, but removing anyway as you requested: 160s fwupd depends on libarchive13 (>= 3.2.1). 160s 160s (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 ... 70171 files and directories currently installed.) 160s Removing libarchive13:ppc64el (3.7.2-1ubuntu2) ... 160s Selecting previously unselected package libarchive13t64:ppc64el. 160s (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 ... 70165 files and directories currently installed.) 160s Preparing to unpack .../libarchive13t64_3.7.2-1.1ubuntu2_ppc64el.deb ... 160s Unpacking libarchive13t64:ppc64el (3.7.2-1.1ubuntu2) ... 160s Preparing to unpack .../fwupd_1.9.15-2_ppc64el.deb ... 160s Unpacking fwupd (1.9.15-2) over (1.9.14-1) ... 160s dpkg: libcurl3-gnutls:ppc64el: dependency problems, but removing anyway as you requested: 160s libfwupd2:ppc64el depends on libcurl3-gnutls (>= 7.63.0). 160s 160s (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 ... 70172 files and directories currently installed.) 160s Removing libcurl3-gnutls:ppc64el (8.5.0-2ubuntu2) ... 160s Selecting previously unselected package libcurl3t64-gnutls:ppc64el. 160s (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 ... 70165 files and directories currently installed.) 160s Preparing to unpack .../00-libcurl3t64-gnutls_8.5.0-2ubuntu8_ppc64el.deb ... 160s Unpacking libcurl3t64-gnutls:ppc64el (8.5.0-2ubuntu8) ... 161s Preparing to unpack .../01-libfwupd2_1.9.15-2_ppc64el.deb ... 161s Unpacking libfwupd2:ppc64el (1.9.15-2) over (1.9.14-1) ... 161s Preparing to unpack .../02-libblockdev3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../03-libblockdev-utils3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-utils3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../04-libblockdev-swap3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-swap3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../05-libblockdev-part3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-part3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../06-libblockdev-nvme3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-nvme3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../07-libblockdev-mdraid3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-mdraid3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../08-libblockdev-loop3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-loop3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../09-e2fsprogs-l10n_1.47.0-2.4~exp1ubuntu2_all.deb ... 161s Unpacking e2fsprogs-l10n (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 161s Preparing to unpack .../10-logsave_1.47.0-2.4~exp1ubuntu2_ppc64el.deb ... 161s Unpacking logsave (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 161s dpkg: libext2fs2:ppc64el: dependency problems, but removing anyway as you requested: 161s libblockdev-fs3:ppc64el depends on libext2fs2 (>= 1.42.11). 161s e2fsprogs depends on libext2fs2 (= 1.47.0-2ubuntu1). 161s btrfs-progs depends on libext2fs2 (>= 1.42). 161s 161s (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 ... 70172 files and directories currently installed.) 161s Removing libext2fs2:ppc64el (1.47.0-2ubuntu1) ... 161s Selecting previously unselected package libext2fs2t64:ppc64el. 161s (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 ... 70165 files and directories currently installed.) 161s Preparing to unpack .../libext2fs2t64_1.47.0-2.4~exp1ubuntu2_ppc64el.deb ... 161s Adding 'diversion of /lib/powerpc64le-linux-gnu/libe2p.so.2 to /lib/powerpc64le-linux-gnu/libe2p.so.2.usr-is-merged by libext2fs2t64' 161s Adding 'diversion of /lib/powerpc64le-linux-gnu/libe2p.so.2.3 to /lib/powerpc64le-linux-gnu/libe2p.so.2.3.usr-is-merged by libext2fs2t64' 161s Adding 'diversion of /lib/powerpc64le-linux-gnu/libext2fs.so.2 to /lib/powerpc64le-linux-gnu/libext2fs.so.2.usr-is-merged by libext2fs2t64' 161s Adding 'diversion of /lib/powerpc64le-linux-gnu/libext2fs.so.2.4 to /lib/powerpc64le-linux-gnu/libext2fs.so.2.4.usr-is-merged by libext2fs2t64' 161s Unpacking libext2fs2t64:ppc64el (1.47.0-2.4~exp1ubuntu2) ... 161s Setting up libext2fs2t64:ppc64el (1.47.0-2.4~exp1ubuntu2) ... 161s (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 ... 70181 files and directories currently installed.) 161s Preparing to unpack .../e2fsprogs_1.47.0-2.4~exp1ubuntu2_ppc64el.deb ... 161s Unpacking e2fsprogs (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 161s dpkg: libreiserfscore0: dependency problems, but removing anyway as you requested: 161s btrfs-progs depends on libreiserfscore0 (>= 1:3.6.27). 161s 161s (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 ... 70181 files and directories currently installed.) 161s Removing libreiserfscore0 (1:3.6.27-7) ... 161s Selecting previously unselected package libreiserfscore0t64. 161s (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 ... 70176 files and directories currently installed.) 161s Preparing to unpack .../libreiserfscore0t64_1%3a3.6.27-7.1_ppc64el.deb ... 161s Unpacking libreiserfscore0t64 (1:3.6.27-7.1) ... 161s Preparing to unpack .../btrfs-progs_6.6.3-1.1build1_ppc64el.deb ... 161s Unpacking btrfs-progs (6.6.3-1.1build1) over (6.6.3-1.1) ... 161s Preparing to unpack .../libblockdev-fs3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-fs3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../libblockdev-crypto3_3.1.0-1build1_ppc64el.deb ... 161s Unpacking libblockdev-crypto3:ppc64el (3.1.0-1build1) over (3.1.0-1) ... 161s Preparing to unpack .../bolt_0.9.6-2build1_ppc64el.deb ... 161s Unpacking bolt (0.9.6-2build1) over (0.9.6-2) ... 161s dpkg: libglib2.0-0:ppc64el: dependency problems, but removing anyway as you requested: 161s libnetplan0:ppc64el depends on libglib2.0-0 (>= 2.75.3). 161s libjcat1:ppc64el depends on libglib2.0-0 (>= 2.75.3). 161s 161s (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 ... 70182 files and directories currently installed.) 161s Removing libglib2.0-0:ppc64el (2.79.2-1~ubuntu1) ... 161s Selecting previously unselected package libglib2.0-0t64:ppc64el. 161s (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 ... 70157 files and directories currently installed.) 161s Preparing to unpack .../0-libglib2.0-0t64_2.79.3-3ubuntu5_ppc64el.deb ... 161s libglib2.0-0t64.preinst: Removing /var/lib/dpkg/info/libglib2.0-0:ppc64el.postrm to avoid loss of /usr/share/glib-2.0/schemas/gschemas.compiled... 161s removed '/var/lib/dpkg/info/libglib2.0-0:ppc64el.postrm' 161s Unpacking libglib2.0-0t64:ppc64el (2.79.3-3ubuntu5) ... 161s Preparing to unpack .../1-libjcat1_0.2.0-2build2_ppc64el.deb ... 161s Unpacking libjcat1:ppc64el (0.2.0-2build2) over (0.2.0-2) ... 161s Preparing to unpack .../2-libldap2_2.6.7+dfsg-1~exp1ubuntu6_ppc64el.deb ... 161s Unpacking libldap2:ppc64el (2.6.7+dfsg-1~exp1ubuntu6) over (2.6.7+dfsg-1~exp1ubuntu1) ... 161s Preparing to unpack .../3-ubuntu-pro-client-l10n_31.2.2_ppc64el.deb ... 161s Unpacking ubuntu-pro-client-l10n (31.2.2) over (31.1) ... 161s Preparing to unpack .../4-ubuntu-pro-client_31.2.2_ppc64el.deb ... 162s Unpacking ubuntu-pro-client (31.2.2) over (31.1) ... 162s Preparing to unpack .../5-python3-apt_2.7.7_ppc64el.deb ... 162s Unpacking python3-apt (2.7.7) over (2.7.6) ... 162s Preparing to unpack .../6-apt-utils_2.7.14_ppc64el.deb ... 162s Unpacking apt-utils (2.7.14) over (2.7.12) ... 162s dpkg: libapt-pkg6.0:ppc64el: dependency problems, but removing anyway as you requested: 162s apt depends on libapt-pkg6.0 (>= 2.7.12). 162s 162s (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 ... 70180 files and directories currently installed.) 162s Removing libapt-pkg6.0:ppc64el (2.7.12) ... 162s dpkg: libnettle8:ppc64el: dependency problems, but removing anyway as you requested: 162s librtmp1:ppc64el depends on libnettle8. 162s libhogweed6:ppc64el depends on libnettle8. 162s libgnutls30:ppc64el depends on libnettle8 (>= 3.9~). 162s 162s Removing libnettle8:ppc64el (3.9.1-2) ... 162s Selecting previously unselected package libapt-pkg6.0t64:ppc64el. 162s (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 ... 70124 files and directories currently installed.) 162s Preparing to unpack .../libapt-pkg6.0t64_2.7.14_ppc64el.deb ... 162s Unpacking libapt-pkg6.0t64:ppc64el (2.7.14) ... 162s Setting up libapt-pkg6.0t64:ppc64el (2.7.14) ... 162s Selecting previously unselected package libnettle8t64:ppc64el. 162s (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 ... 70174 files and directories currently installed.) 162s Preparing to unpack .../libnettle8t64_3.9.1-2.2_ppc64el.deb ... 162s Unpacking libnettle8t64:ppc64el (3.9.1-2.2) ... 162s Setting up libnettle8t64:ppc64el (3.9.1-2.2) ... 162s dpkg: libhogweed6:ppc64el: dependency problems, but removing anyway as you requested: 162s librtmp1:ppc64el depends on libhogweed6. 162s libgnutls30:ppc64el depends on libhogweed6 (>= 3.6). 162s 162s (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 ... 70182 files and directories currently installed.) 162s Removing libhogweed6:ppc64el (3.9.1-2) ... 162s Selecting previously unselected package libhogweed6t64:ppc64el. 162s (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 ... 70177 files and directories currently installed.) 162s Preparing to unpack .../libhogweed6t64_3.9.1-2.2_ppc64el.deb ... 162s Unpacking libhogweed6t64:ppc64el (3.9.1-2.2) ... 162s Setting up libhogweed6t64:ppc64el (3.9.1-2.2) ... 162s dpkg: libgnutls30:ppc64el: dependency problems, but removing anyway as you requested: 162s librtmp1:ppc64el depends on libgnutls30 (>= 3.7.2). 162s apt depends on libgnutls30 (>= 3.8.1). 162s 162s (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 ... 70183 files and directories currently installed.) 162s Removing libgnutls30:ppc64el (3.8.3-1ubuntu1) ... 162s Selecting previously unselected package libgnutls30t64:ppc64el. 162s (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 ... 70174 files and directories currently installed.) 162s Preparing to unpack .../libgnutls30t64_3.8.3-1.1ubuntu2_ppc64el.deb ... 162s Unpacking libgnutls30t64:ppc64el (3.8.3-1.1ubuntu2) ... 163s Setting up libgnutls30t64:ppc64el (3.8.3-1.1ubuntu2) ... 163s (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 ... 70202 files and directories currently installed.) 163s Preparing to unpack .../apt_2.7.14_ppc64el.deb ... 163s Unpacking apt (2.7.14) over (2.7.12) ... 163s Setting up apt (2.7.14) ... 163s (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 ... 70202 files and directories currently installed.) 163s Preparing to unpack .../librtmp1_2.4+20151223.gitfa8646d.1-2build6_ppc64el.deb ... 163s Unpacking librtmp1:ppc64el (2.4+20151223.gitfa8646d.1-2build6) over (2.4+20151223.gitfa8646d.1-2build4) ... 163s Preparing to unpack .../liblzma5_5.6.0-0.2_ppc64el.deb ... 163s Unpacking liblzma5:ppc64el (5.6.0-0.2) over (5.4.5-0.3) ... 163s Setting up liblzma5:ppc64el (5.6.0-0.2) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../libblkid1_2.39.3-9ubuntu2_ppc64el.deb ... 164s Unpacking libblkid1:ppc64el (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 164s Setting up libblkid1:ppc64el (2.39.3-9ubuntu2) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../kmod_31+20240202-2ubuntu4_ppc64el.deb ... 164s Unpacking kmod (31+20240202-2ubuntu4) over (30+20230601-2ubuntu1) ... 164s Preparing to unpack .../libkmod2_31+20240202-2ubuntu4_ppc64el.deb ... 164s Unpacking libkmod2:ppc64el (31+20240202-2ubuntu4) over (30+20230601-2ubuntu1) ... 164s Preparing to unpack .../libselinux1_3.5-2ubuntu1_ppc64el.deb ... 164s Unpacking libselinux1:ppc64el (3.5-2ubuntu1) over (3.5-2build1) ... 164s Setting up libselinux1:ppc64el (3.5-2ubuntu1) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../libaudit-common_1%3a3.1.2-2.1_all.deb ... 164s Unpacking libaudit-common (1:3.1.2-2.1) over (1:3.1.2-2) ... 164s Setting up libaudit-common (1:3.1.2-2.1) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../libcap-ng0_0.8.4-2build1_ppc64el.deb ... 164s Unpacking libcap-ng0:ppc64el (0.8.4-2build1) over (0.8.4-2) ... 164s Setting up libcap-ng0:ppc64el (0.8.4-2build1) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../libaudit1_1%3a3.1.2-2.1_ppc64el.deb ... 164s Unpacking libaudit1:ppc64el (1:3.1.2-2.1) over (1:3.1.2-2) ... 164s Setting up libaudit1:ppc64el (1:3.1.2-2.1) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../libpam0g_1.5.3-5ubuntu3_ppc64el.deb ... 164s Unpacking libpam0g:ppc64el (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 164s Setting up libpam0g:ppc64el (1.5.3-5ubuntu3) ... 164s (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 ... 70202 files and directories currently installed.) 164s Preparing to unpack .../libpam-modules-bin_1.5.3-5ubuntu3_ppc64el.deb ... 164s Unpacking libpam-modules-bin (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 164s Setting up libpam-modules-bin (1.5.3-5ubuntu3) ... 165s pam_namespace.service is a disabled or a static unit not running, not starting it. 165s (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 ... 70202 files and directories currently installed.) 165s Preparing to unpack .../libpam-modules_1.5.3-5ubuntu3_ppc64el.deb ... 165s Unpacking libpam-modules:ppc64el (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 165s Setting up libpam-modules:ppc64el (1.5.3-5ubuntu3) ... 165s Installing new version of config file /etc/security/namespace.init ... 165s (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 ... 70200 files and directories currently installed.) 165s Preparing to unpack .../libpam-runtime_1.5.3-5ubuntu3_all.deb ... 165s Unpacking libpam-runtime (1.5.3-5ubuntu3) over (1.5.2-9.1ubuntu3) ... 165s Setting up libpam-runtime (1.5.3-5ubuntu3) ... 165s (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 ... 70200 files and directories currently installed.) 165s Preparing to unpack .../00-dbus-session-bus-common_1.14.10-4ubuntu2_all.deb ... 165s Unpacking dbus-session-bus-common (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../01-dbus-user-session_1.14.10-4ubuntu2_ppc64el.deb ... 165s Unpacking dbus-user-session (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../02-libapparmor1_4.0.0-beta3-0ubuntu2_ppc64el.deb ... 165s Unpacking libapparmor1:ppc64el (4.0.0-beta3-0ubuntu2) over (4.0.0~alpha4-0ubuntu1) ... 165s Preparing to unpack .../03-libexpat1_2.6.1-2_ppc64el.deb ... 165s Unpacking libexpat1:ppc64el (2.6.1-2) over (2.6.0-1) ... 165s Preparing to unpack .../04-dbus-system-bus-common_1.14.10-4ubuntu2_all.deb ... 165s Unpacking dbus-system-bus-common (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../05-dbus-bin_1.14.10-4ubuntu2_ppc64el.deb ... 165s Unpacking dbus-bin (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../06-dbus_1.14.10-4ubuntu2_ppc64el.deb ... 165s Unpacking dbus (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../07-dbus-daemon_1.14.10-4ubuntu2_ppc64el.deb ... 165s Unpacking dbus-daemon (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../08-libdbus-1-3_1.14.10-4ubuntu2_ppc64el.deb ... 165s Unpacking libdbus-1-3:ppc64el (1.14.10-4ubuntu2) over (1.14.10-4ubuntu1) ... 165s Preparing to unpack .../09-libdevmapper1.02.1_2%3a1.02.185-3ubuntu2_ppc64el.deb ... 165s Unpacking libdevmapper1.02.1:ppc64el (2:1.02.185-3ubuntu2) over (2:1.02.185-3ubuntu1) ... 165s Preparing to unpack .../10-libuuid1_2.39.3-9ubuntu2_ppc64el.deb ... 165s Unpacking libuuid1:ppc64el (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 165s Setting up libuuid1:ppc64el (2.39.3-9ubuntu2) ... 165s (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 ... 70200 files and directories currently installed.) 165s Preparing to unpack .../libcryptsetup12_2%3a2.7.0-1ubuntu2_ppc64el.deb ... 165s Unpacking libcryptsetup12:ppc64el (2:2.7.0-1ubuntu2) over (2:2.7.0-1ubuntu1) ... 165s Preparing to unpack .../libfdisk1_2.39.3-9ubuntu2_ppc64el.deb ... 165s Unpacking libfdisk1:ppc64el (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 165s Preparing to unpack .../libseccomp2_2.5.5-1ubuntu2_ppc64el.deb ... 165s Unpacking libseccomp2:ppc64el (2.5.5-1ubuntu2) over (2.5.5-1ubuntu1) ... 165s Setting up libseccomp2:ppc64el (2.5.5-1ubuntu2) ... 165s (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 ... 70200 files and directories currently installed.) 165s Preparing to unpack .../mount_2.39.3-9ubuntu2_ppc64el.deb ... 165s Unpacking mount (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 165s Preparing to unpack .../libmount1_2.39.3-9ubuntu2_ppc64el.deb ... 165s Unpacking libmount1:ppc64el (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 165s Setting up libmount1:ppc64el (2.39.3-9ubuntu2) ... 165s (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 ... 70200 files and directories currently installed.) 165s Preparing to unpack .../zlib1g_1%3a1.3.dfsg-3.1ubuntu1_ppc64el.deb ... 165s Unpacking zlib1g:ppc64el (1:1.3.dfsg-3.1ubuntu1) over (1:1.3.dfsg-3ubuntu1) ... 166s Setting up zlib1g:ppc64el (1:1.3.dfsg-3.1ubuntu1) ... 166s Setting up libpython3.12-minimal:ppc64el (3.12.2-4build3) ... 166s Setting up libexpat1:ppc64el (2.6.1-2) ... 166s Setting up python3.12-minimal (3.12.2-4build3) ... 167s (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 ... 70200 files and directories currently installed.) 167s Preparing to unpack .../python3-minimal_3.12.2-0ubuntu1_ppc64el.deb ... 167s Unpacking python3-minimal (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 167s Setting up python3-minimal (3.12.2-0ubuntu1) ... 167s (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 ... 70200 files and directories currently installed.) 167s Preparing to unpack .../python3_3.12.2-0ubuntu1_ppc64el.deb ... 167s Unpacking python3 (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 167s Preparing to unpack .../libplymouth5_24.004.60-1ubuntu6_ppc64el.deb ... 167s Unpacking libplymouth5:ppc64el (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 167s dpkg: libpng16-16:ppc64el: dependency problems, but removing anyway as you requested: 167s libfreetype6:ppc64el depends on libpng16-16 (>= 1.6.2-1). 167s 167s (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 ... 70200 files and directories currently installed.) 167s Removing libpng16-16:ppc64el (1.6.43-1) ... 167s Selecting previously unselected package libpng16-16t64:ppc64el. 167s (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 ... 70190 files and directories currently installed.) 167s Preparing to unpack .../0-libpng16-16t64_1.6.43-3_ppc64el.deb ... 167s Unpacking libpng16-16t64:ppc64el (1.6.43-3) ... 167s Preparing to unpack .../1-libbrotli1_1.1.0-2build1_ppc64el.deb ... 167s Unpacking libbrotli1:ppc64el (1.1.0-2build1) over (1.1.0-2) ... 167s Preparing to unpack .../2-libfreetype6_2.13.2+dfsg-1build2_ppc64el.deb ... 167s Unpacking libfreetype6:ppc64el (2.13.2+dfsg-1build2) over (2.13.2+dfsg-1) ... 167s Preparing to unpack .../3-libsqlite3-0_3.45.1-1ubuntu1_ppc64el.deb ... 167s Unpacking libsqlite3-0:ppc64el (3.45.1-1ubuntu1) over (3.45.1-1) ... 167s Preparing to unpack .../4-pinentry-curses_1.2.1-3ubuntu4_ppc64el.deb ... 167s Unpacking pinentry-curses (1.2.1-3ubuntu4) over (1.2.1-3ubuntu1) ... 167s Preparing to unpack .../5-gcc-14-base_14-20240315-1ubuntu1_ppc64el.deb ... 167s Unpacking gcc-14-base:ppc64el (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 167s Setting up gcc-14-base:ppc64el (14-20240315-1ubuntu1) ... 167s (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 ... 70201 files and directories currently installed.) 167s Preparing to unpack .../libgcc-s1_14-20240315-1ubuntu1_ppc64el.deb ... 167s Unpacking libgcc-s1:ppc64el (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 167s Setting up libgcc-s1:ppc64el (14-20240315-1ubuntu1) ... 167s (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 ... 70201 files and directories currently installed.) 167s Preparing to unpack .../libstdc++6_14-20240315-1ubuntu1_ppc64el.deb ... 167s Unpacking libstdc++6:ppc64el (14-20240315-1ubuntu1) over (14-20240303-1ubuntu1) ... 167s Setting up libstdc++6:ppc64el (14-20240315-1ubuntu1) ... 167s (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 ... 70201 files and directories currently installed.) 167s Preparing to unpack .../python-apt-common_2.7.7_all.deb ... 167s Unpacking python-apt-common (2.7.7) over (2.7.6) ... 167s Preparing to unpack .../libsmartcols1_2.39.3-9ubuntu2_ppc64el.deb ... 167s Unpacking libsmartcols1:ppc64el (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 167s Setting up libsmartcols1:ppc64el (2.39.3-9ubuntu2) ... 167s (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 ... 70201 files and directories currently installed.) 167s Preparing to unpack .../00-readline-common_8.2-4_all.deb ... 167s Unpacking readline-common (8.2-4) over (8.2-3) ... 168s Preparing to unpack .../01-bsdextrautils_2.39.3-9ubuntu2_ppc64el.deb ... 168s Unpacking bsdextrautils (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 168s Preparing to unpack .../02-groff-base_1.23.0-3build1_ppc64el.deb ... 168s Unpacking groff-base (1.23.0-3build1) over (1.23.0-3) ... 168s Preparing to unpack .../03-libpython3-stdlib_3.12.2-0ubuntu1_ppc64el.deb ... 168s Unpacking libpython3-stdlib:ppc64el (3.12.2-0ubuntu1) over (3.12.1-0ubuntu2) ... 168s Preparing to unpack .../04-libfido2-1_1.14.0-1build1_ppc64el.deb ... 168s Unpacking libfido2-1:ppc64el (1.14.0-1build1) over (1.14.0-1) ... 168s Preparing to unpack .../05-libgssapi-krb5-2_1.20.1-6ubuntu1_ppc64el.deb ... 168s Unpacking libgssapi-krb5-2:ppc64el (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 168s Preparing to unpack .../06-libkrb5-3_1.20.1-6ubuntu1_ppc64el.deb ... 168s Unpacking libkrb5-3:ppc64el (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 168s Preparing to unpack .../07-libkrb5support0_1.20.1-6ubuntu1_ppc64el.deb ... 168s Unpacking libkrb5support0:ppc64el (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 168s Preparing to unpack .../08-libk5crypto3_1.20.1-6ubuntu1_ppc64el.deb ... 168s Unpacking libk5crypto3:ppc64el (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 168s Preparing to unpack .../09-libcom-err2_1.47.0-2.4~exp1ubuntu2_ppc64el.deb ... 168s Unpacking libcom-err2:ppc64el (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 168s Preparing to unpack .../10-libproc2-0_2%3a4.0.4-4ubuntu2_ppc64el.deb ... 168s Unpacking libproc2-0:ppc64el (2:4.0.4-4ubuntu2) over (2:4.0.4-4ubuntu1) ... 168s Preparing to unpack .../11-procps_2%3a4.0.4-4ubuntu2_ppc64el.deb ... 168s Unpacking procps (2:4.0.4-4ubuntu2) over (2:4.0.4-4ubuntu1) ... 168s Preparing to unpack .../12-libnghttp2-14_1.59.0-1build1_ppc64el.deb ... 168s Unpacking libnghttp2-14:ppc64el (1.59.0-1build1) over (1.59.0-1) ... 168s Preparing to unpack .../13-dpkg_1.22.6ubuntu5_ppc64el.deb ... 168s Unpacking dpkg (1.22.6ubuntu5) over (1.22.4ubuntu5) ... 168s Setting up dpkg (1.22.6ubuntu5) ... 169s (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 ... 70202 files and directories currently installed.) 169s Preparing to unpack .../util-linux_2.39.3-9ubuntu2_ppc64el.deb ... 169s Unpacking util-linux (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 169s Setting up util-linux (2.39.3-9ubuntu2) ... 170s fstrim.service is a disabled or a static unit not running, not starting it. 170s (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 ... 70202 files and directories currently installed.) 170s Preparing to unpack .../libxml2_2.9.14+dfsg-1.3ubuntu2_ppc64el.deb ... 170s Unpacking libxml2:ppc64el (2.9.14+dfsg-1.3ubuntu2) over (2.9.14+dfsg-1.3ubuntu1) ... 170s (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 ... 70202 files and directories currently installed.) 170s Removing libatm1:ppc64el (1:2.5.1-5) ... 170s (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 ... 70197 files and directories currently installed.) 170s Preparing to unpack .../libbpf1_1%3a1.3.0-2build1_ppc64el.deb ... 170s Unpacking libbpf1:ppc64el (1:1.3.0-2build1) over (1:1.3.0-2) ... 170s Preparing to unpack .../iproute2_6.1.0-1ubuntu5_ppc64el.deb ... 170s Unpacking iproute2 (6.1.0-1ubuntu5) over (6.1.0-1ubuntu2) ... 170s dpkg: libelf1:ppc64el: dependency problems, but removing anyway as you requested: 170s linux-headers-6.8.0-11-generic depends on libelf1 (>= 0.144). 170s 170s (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 ... 70197 files and directories currently installed.) 170s Removing libelf1:ppc64el (0.190-1) ... 170s Selecting previously unselected package libelf1t64:ppc64el. 170s (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 ... 70192 files and directories currently installed.) 170s Preparing to unpack .../libelf1t64_0.190-1.1build2_ppc64el.deb ... 170s Unpacking libelf1t64:ppc64el (0.190-1.1build2) ... 170s Preparing to unpack .../dhcpcd-base_1%3a10.0.6-1ubuntu2_ppc64el.deb ... 170s Unpacking dhcpcd-base (1:10.0.6-1ubuntu2) over (1:10.0.6-1ubuntu1) ... 170s Preparing to unpack .../file_1%3a5.45-3_ppc64el.deb ... 170s Unpacking file (1:5.45-3) over (1:5.45-2) ... 170s (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 ... 70197 files and directories currently installed.) 170s Removing libmagic1:ppc64el (1:5.45-2) ... 170s (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 ... 70187 files and directories currently installed.) 170s Preparing to unpack .../libmagic-mgc_1%3a5.45-3_ppc64el.deb ... 170s Unpacking libmagic-mgc (1:5.45-3) over (1:5.45-2) ... 170s Selecting previously unselected package libmagic1t64:ppc64el. 170s Preparing to unpack .../libmagic1t64_1%3a5.45-3_ppc64el.deb ... 170s Unpacking libmagic1t64:ppc64el (1:5.45-3) ... 170s Preparing to unpack .../libtirpc-common_1.3.4+ds-1.1_all.deb ... 170s Unpacking libtirpc-common (1.3.4+ds-1.1) over (1.3.4+ds-1build1) ... 170s Preparing to unpack .../lsof_4.95.0-1build2_ppc64el.deb ... 170s Unpacking lsof (4.95.0-1build2) over (4.95.0-1build1) ... 170s Preparing to unpack .../libnsl2_1.3.0-3build2_ppc64el.deb ... 170s Unpacking libnsl2:ppc64el (1.3.0-3build2) over (1.3.0-3) ... 170s (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 ... 70198 files and directories currently installed.) 170s Removing libtirpc3:ppc64el (1.3.4+ds-1build1) ... 170s Selecting previously unselected package libtirpc3t64:ppc64el. 170s (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 ... 70192 files and directories currently installed.) 170s Preparing to unpack .../libtirpc3t64_1.3.4+ds-1.1_ppc64el.deb ... 170s Adding 'diversion of /lib/powerpc64le-linux-gnu/libtirpc.so.3 to /lib/powerpc64le-linux-gnu/libtirpc.so.3.usr-is-merged by libtirpc3t64' 170s Adding 'diversion of /lib/powerpc64le-linux-gnu/libtirpc.so.3.0.0 to /lib/powerpc64le-linux-gnu/libtirpc.so.3.0.0.usr-is-merged by libtirpc3t64' 170s Unpacking libtirpc3t64:ppc64el (1.3.4+ds-1.1) ... 170s Preparing to unpack .../multipath-tools_0.9.4-5ubuntu6_ppc64el.deb ... 170s Unpacking multipath-tools (0.9.4-5ubuntu6) over (0.9.4-5ubuntu3) ... 170s dpkg: liburcu8:ppc64el: dependency problems, but removing anyway as you requested: 170s xfsprogs depends on liburcu8 (>= 0.13.0). 170s 170s (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 ... 70202 files and directories currently installed.) 170s Removing liburcu8:ppc64el (0.14.0-3) ... 170s Selecting previously unselected package liburcu8t64:ppc64el. 170s (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 ... 70183 files and directories currently installed.) 170s Preparing to unpack .../liburcu8t64_0.14.0-3.1_ppc64el.deb ... 170s Unpacking liburcu8t64:ppc64el (0.14.0-3.1) ... 170s Preparing to unpack .../bind9-host_1%3a9.18.24-0ubuntu3_ppc64el.deb ... 170s Unpacking bind9-host (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 170s Preparing to unpack .../bind9-dnsutils_1%3a9.18.24-0ubuntu3_ppc64el.deb ... 170s Unpacking bind9-dnsutils (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 171s Preparing to unpack .../bind9-libs_1%3a9.18.24-0ubuntu3_ppc64el.deb ... 171s Unpacking bind9-libs:ppc64el (1:9.18.24-0ubuntu3) over (1:9.18.21-0ubuntu1) ... 171s (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 ... 70203 files and directories currently installed.) 171s Removing libuv1:ppc64el (1.48.0-1) ... 171s Selecting previously unselected package libuv1t64:ppc64el. 171s (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 ... 70198 files and directories currently installed.) 171s Preparing to unpack .../libuv1t64_1.48.0-1.1_ppc64el.deb ... 171s Unpacking libuv1t64:ppc64el (1.48.0-1.1) ... 171s Preparing to unpack .../liblocale-gettext-perl_1.07-6ubuntu4_ppc64el.deb ... 171s Unpacking liblocale-gettext-perl (1.07-6ubuntu4) over (1.07-6build1) ... 171s Preparing to unpack .../uuid-runtime_2.39.3-9ubuntu2_ppc64el.deb ... 171s Unpacking uuid-runtime (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 171s Preparing to unpack .../libdebconfclient0_0.271ubuntu2_ppc64el.deb ... 171s Unpacking libdebconfclient0:ppc64el (0.271ubuntu2) over (0.271ubuntu1) ... 171s Setting up libdebconfclient0:ppc64el (0.271ubuntu2) ... 171s (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 ... 70204 files and directories currently installed.) 171s Preparing to unpack .../libsemanage-common_3.5-1build4_all.deb ... 171s Unpacking libsemanage-common (3.5-1build4) over (3.5-1build2) ... 171s Setting up libsemanage-common (3.5-1build4) ... 171s (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 ... 70204 files and directories currently installed.) 171s Preparing to unpack .../libsemanage2_3.5-1build4_ppc64el.deb ... 171s Unpacking libsemanage2:ppc64el (3.5-1build4) over (3.5-1build2) ... 171s Setting up libsemanage2:ppc64el (3.5-1build4) ... 171s (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 ... 70204 files and directories currently installed.) 171s Preparing to unpack .../install-info_7.1-3build1_ppc64el.deb ... 171s Unpacking install-info (7.1-3build1) over (7.1-3) ... 171s Setting up install-info (7.1-3build1) ... 171s (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 ... 70204 files and directories currently installed.) 171s Preparing to unpack .../000-gcc-13-base_13.2.0-21ubuntu1_ppc64el.deb ... 171s Unpacking gcc-13-base:ppc64el (13.2.0-21ubuntu1) over (13.2.0-17ubuntu2) ... 171s Preparing to unpack .../001-libss2_1.47.0-2.4~exp1ubuntu2_ppc64el.deb ... 171s Unpacking libss2:ppc64el (1.47.0-2.4~exp1ubuntu2) over (1.47.0-2ubuntu1) ... 171s Preparing to unpack .../002-dmsetup_2%3a1.02.185-3ubuntu2_ppc64el.deb ... 171s Unpacking dmsetup (2:1.02.185-3ubuntu2) over (2:1.02.185-3ubuntu1) ... 171s Preparing to unpack .../003-eject_2.39.3-9ubuntu2_ppc64el.deb ... 171s Unpacking eject (2.39.3-9ubuntu2) over (2.39.3-6ubuntu2) ... 171s Preparing to unpack .../004-krb5-locales_1.20.1-6ubuntu1_all.deb ... 171s Unpacking krb5-locales (1.20.1-6ubuntu1) over (1.20.1-5build1) ... 171s Preparing to unpack .../005-libglib2.0-data_2.79.3-3ubuntu5_all.deb ... 171s Unpacking libglib2.0-data (2.79.3-3ubuntu5) over (2.79.2-1~ubuntu1) ... 171s Preparing to unpack .../006-libslang2_2.3.3-3build1_ppc64el.deb ... 171s Unpacking libslang2:ppc64el (2.3.3-3build1) over (2.3.3-3) ... 171s Preparing to unpack .../007-libtext-charwidth-perl_0.04-11build2_ppc64el.deb ... 171s Unpacking libtext-charwidth-perl:ppc64el (0.04-11build2) over (0.04-11build1) ... 171s Preparing to unpack .../008-libtext-iconv-perl_1.7-8build2_ppc64el.deb ... 171s Unpacking libtext-iconv-perl:ppc64el (1.7-8build2) over (1.7-8build1) ... 171s Preparing to unpack .../009-python3-yaml_6.0.1-2build1_ppc64el.deb ... 171s Unpacking python3-yaml (6.0.1-2build1) over (6.0.1-2) ... 171s Preparing to unpack .../010-python3-setuptools_68.1.2-2ubuntu1_all.deb ... 171s Unpacking python3-setuptools (68.1.2-2ubuntu1) over (68.1.2-2) ... 171s Preparing to unpack .../011-python3-pkg-resources_68.1.2-2ubuntu1_all.deb ... 172s Unpacking python3-pkg-resources (68.1.2-2ubuntu1) over (68.1.2-2) ... 172s Preparing to unpack .../012-rsyslog_8.2312.0-3ubuntu7_ppc64el.deb ... 172s Unpacking rsyslog (8.2312.0-3ubuntu7) over (8.2312.0-3ubuntu3) ... 172s Preparing to unpack .../013-vim-tiny_2%3a9.1.0016-1ubuntu6_ppc64el.deb ... 172s Unpacking vim-tiny (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 172s Preparing to unpack .../014-vim-common_2%3a9.1.0016-1ubuntu6_all.deb ... 172s Unpacking vim-common (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 172s Selecting previously unselected package xdg-user-dirs. 172s Preparing to unpack .../015-xdg-user-dirs_0.18-1_ppc64el.deb ... 172s Unpacking xdg-user-dirs (0.18-1) ... 172s Preparing to unpack .../016-xxd_2%3a9.1.0016-1ubuntu6_ppc64el.deb ... 172s Unpacking xxd (2:9.1.0016-1ubuntu6) over (2:9.1.0016-1ubuntu2) ... 172s Preparing to unpack .../017-apparmor_4.0.0-beta3-0ubuntu2_ppc64el.deb ... 172s Unpacking apparmor (4.0.0-beta3-0ubuntu2) over (4.0.0~alpha4-0ubuntu1) ... 172s Preparing to unpack .../018-ftp_20230507-2build1_all.deb ... 172s Unpacking ftp (20230507-2build1) over (20230507-2) ... 173s Preparing to unpack .../019-inetutils-telnet_2%3a2.5-3ubuntu3_ppc64el.deb ... 173s Unpacking inetutils-telnet (2:2.5-3ubuntu3) over (2:2.5-3ubuntu1) ... 173s Preparing to unpack .../020-info_7.1-3build1_ppc64el.deb ... 173s Unpacking info (7.1-3build1) over (7.1-3) ... 173s Preparing to unpack .../021-libusb-1.0-0_2%3a1.0.27-1_ppc64el.deb ... 173s Unpacking libusb-1.0-0:ppc64el (2:1.0.27-1) over (2:1.0.26-1) ... 173s Preparing to unpack .../022-libxmuu1_2%3a1.1.3-3build1_ppc64el.deb ... 173s Unpacking libxmuu1:ppc64el (2:1.1.3-3build1) over (2:1.1.3-3) ... 173s Preparing to unpack .../023-lshw_02.19.git.2021.06.19.996aaad9c7-2build2_ppc64el.deb ... 173s Unpacking lshw (02.19.git.2021.06.19.996aaad9c7-2build2) over (02.19.git.2021.06.19.996aaad9c7-2build1) ... 173s Selecting previously unselected package manpages. 173s Preparing to unpack .../024-manpages_6.05.01-1_all.deb ... 173s Unpacking manpages (6.05.01-1) ... 173s Preparing to unpack .../025-mtr-tiny_0.95-1.1build1_ppc64el.deb ... 173s Unpacking mtr-tiny (0.95-1.1build1) over (0.95-1.1) ... 173s Preparing to unpack .../026-plymouth-theme-ubuntu-text_24.004.60-1ubuntu6_ppc64el.deb ... 173s Unpacking plymouth-theme-ubuntu-text (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 173s Preparing to unpack .../027-plymouth_24.004.60-1ubuntu6_ppc64el.deb ... 173s Unpacking plymouth (24.004.60-1ubuntu6) over (24.004.60-1ubuntu3) ... 173s Preparing to unpack .../028-telnet_0.17+2.5-3ubuntu3_all.deb ... 173s Unpacking telnet (0.17+2.5-3ubuntu3) over (0.17+2.5-3ubuntu1) ... 173s Preparing to unpack .../029-usb.ids_2024.03.18-1_all.deb ... 173s Unpacking usb.ids (2024.03.18-1) over (2024.01.30-1) ... 173s Preparing to unpack .../030-xz-utils_5.6.0-0.2_ppc64el.deb ... 173s Unpacking xz-utils (5.6.0-0.2) over (5.4.5-0.3) ... 173s Preparing to unpack .../031-libctf0_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking libctf0:ppc64el (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Preparing to unpack .../032-libctf-nobfd0_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking libctf-nobfd0:ppc64el (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Preparing to unpack .../033-binutils-powerpc64le-linux-gnu_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking binutils-powerpc64le-linux-gnu (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Preparing to unpack .../034-libbinutils_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking libbinutils:ppc64el (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Preparing to unpack .../035-binutils_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking binutils (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Preparing to unpack .../036-binutils-common_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking binutils-common:ppc64el (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Preparing to unpack .../037-libsframe1_2.42-4ubuntu1_ppc64el.deb ... 173s Unpacking libsframe1:ppc64el (2.42-4ubuntu1) over (2.42-3ubuntu1) ... 173s Selecting previously unselected package libllvm18:ppc64el. 173s Preparing to unpack .../038-libllvm18_1%3a18.1.2-1ubuntu2_ppc64el.deb ... 173s Unpacking libllvm18:ppc64el (1:18.1.2-1ubuntu2) ... 174s Selecting previously unselected package libclang-cpp18. 174s Preparing to unpack .../039-libclang-cpp18_1%3a18.1.2-1ubuntu2_ppc64el.deb ... 174s Unpacking libclang-cpp18 (1:18.1.2-1ubuntu2) ... 175s Selecting previously unselected package libbpfcc:ppc64el. 175s Preparing to unpack .../040-libbpfcc_0.29.1+ds-1ubuntu4_ppc64el.deb ... 175s Unpacking libbpfcc:ppc64el (0.29.1+ds-1ubuntu4) ... 175s Selecting previously unselected package python3-bpfcc. 175s Preparing to unpack .../041-python3-bpfcc_0.29.1+ds-1ubuntu4_all.deb ... 175s Unpacking python3-bpfcc (0.29.1+ds-1ubuntu4) ... 175s Selecting previously unselected package ieee-data. 175s Preparing to unpack .../042-ieee-data_20220827.1_all.deb ... 175s Unpacking ieee-data (20220827.1) ... 175s Selecting previously unselected package python3-netaddr. 175s Preparing to unpack .../043-python3-netaddr_0.8.0-2ubuntu1_all.deb ... 175s Unpacking python3-netaddr (0.8.0-2ubuntu1) ... 175s Selecting previously unselected package bpfcc-tools. 175s Preparing to unpack .../044-bpfcc-tools_0.29.1+ds-1ubuntu4_all.deb ... 175s Unpacking bpfcc-tools (0.29.1+ds-1ubuntu4) ... 175s Selecting previously unselected package libclang1-18. 175s Preparing to unpack .../045-libclang1-18_1%3a18.1.2-1ubuntu2_ppc64el.deb ... 175s Unpacking libclang1-18 (1:18.1.2-1ubuntu2) ... 175s Selecting previously unselected package libdw1t64:ppc64el. 175s Preparing to unpack .../046-libdw1t64_0.190-1.1build2_ppc64el.deb ... 175s Unpacking libdw1t64:ppc64el (0.190-1.1build2) ... 175s Selecting previously unselected package bpftrace. 175s Preparing to unpack .../047-bpftrace_0.20.2-1ubuntu1_ppc64el.deb ... 175s Unpacking bpftrace (0.20.2-1ubuntu1) ... 175s Preparing to unpack .../048-cryptsetup-bin_2%3a2.7.0-1ubuntu2_ppc64el.deb ... 175s Unpacking cryptsetup-bin (2:2.7.0-1ubuntu2) over (2:2.7.0-1ubuntu1) ... 175s Preparing to unpack .../049-dpkg-dev_1.22.6ubuntu5_all.deb ... 175s Unpacking dpkg-dev (1.22.6ubuntu5) over (1.22.4ubuntu5) ... 175s Preparing to unpack .../050-libdpkg-perl_1.22.6ubuntu5_all.deb ... 175s Unpacking libdpkg-perl (1.22.6ubuntu5) over (1.22.4ubuntu5) ... 175s Selecting previously unselected package fonts-dejavu-mono. 175s Preparing to unpack .../051-fonts-dejavu-mono_2.37-8_all.deb ... 175s Unpacking fonts-dejavu-mono (2.37-8) ... 175s Selecting previously unselected package fonts-dejavu-core. 175s Preparing to unpack .../052-fonts-dejavu-core_2.37-8_all.deb ... 175s Unpacking fonts-dejavu-core (2.37-8) ... 175s Selecting previously unselected package fontconfig-config. 175s Preparing to unpack .../053-fontconfig-config_2.15.0-1.1ubuntu1_ppc64el.deb ... 176s Unpacking fontconfig-config (2.15.0-1.1ubuntu1) ... 176s Preparing to unpack .../054-libprotobuf-c1_1.4.1-1ubuntu3_ppc64el.deb ... 176s Unpacking libprotobuf-c1:ppc64el (1.4.1-1ubuntu3) over (1.4.1-1ubuntu2) ... 176s Preparing to unpack .../055-gnupg-l10n_2.4.4-2ubuntu15_all.deb ... 176s Unpacking gnupg-l10n (2.4.4-2ubuntu15) over (2.4.4-2ubuntu7) ... 176s Preparing to unpack .../056-libibverbs1_50.0-2build1_ppc64el.deb ... 176s Unpacking libibverbs1:ppc64el (50.0-2build1) over (50.0-2) ... 176s Preparing to unpack .../057-ibverbs-providers_50.0-2build1_ppc64el.deb ... 176s Unpacking ibverbs-providers:ppc64el (50.0-2build1) over (50.0-2) ... 176s Preparing to unpack .../058-jq_1.7.1-3_ppc64el.deb ... 176s Unpacking jq (1.7.1-3) over (1.7.1-2) ... 176s Preparing to unpack .../059-libjq1_1.7.1-3_ppc64el.deb ... 176s Unpacking libjq1:ppc64el (1.7.1-3) over (1.7.1-2) ... 176s Selecting previously unselected package libaio1t64:ppc64el. 176s Preparing to unpack .../060-libaio1t64_0.3.113-6_ppc64el.deb ... 176s Unpacking libaio1t64:ppc64el (0.3.113-6) ... 176s Selecting previously unselected package libatm1t64:ppc64el. 176s Preparing to unpack .../061-libatm1t64_1%3a2.5.1-5.1_ppc64el.deb ... 176s Unpacking libatm1t64:ppc64el (1:2.5.1-5.1) ... 176s Selecting previously unselected package libc-dev-bin. 176s Preparing to unpack .../062-libc-dev-bin_2.39-0ubuntu6_ppc64el.deb ... 176s Unpacking libc-dev-bin (2.39-0ubuntu6) ... 176s Selecting previously unselected package libfontconfig1:ppc64el. 176s Preparing to unpack .../063-libfontconfig1_2.15.0-1.1ubuntu1_ppc64el.deb ... 176s Unpacking libfontconfig1:ppc64el (2.15.0-1.1ubuntu1) ... 176s Selecting previously unselected package libjpeg-turbo8:ppc64el. 176s Preparing to unpack .../064-libjpeg-turbo8_2.1.5-2ubuntu1_ppc64el.deb ... 176s Unpacking libjpeg-turbo8:ppc64el (2.1.5-2ubuntu1) ... 176s Selecting previously unselected package libjpeg8:ppc64el. 176s Preparing to unpack .../065-libjpeg8_8c-2ubuntu11_ppc64el.deb ... 176s Unpacking libjpeg8:ppc64el (8c-2ubuntu11) ... 176s Selecting previously unselected package libdeflate0:ppc64el. 176s Preparing to unpack .../066-libdeflate0_1.19-1_ppc64el.deb ... 176s Unpacking libdeflate0:ppc64el (1.19-1) ... 176s Selecting previously unselected package libjbig0:ppc64el. 176s Preparing to unpack .../067-libjbig0_2.1-6.1ubuntu1_ppc64el.deb ... 176s Unpacking libjbig0:ppc64el (2.1-6.1ubuntu1) ... 176s Selecting previously unselected package liblerc4:ppc64el. 176s Preparing to unpack .../068-liblerc4_4.0.0+ds-4ubuntu1_ppc64el.deb ... 176s Unpacking liblerc4:ppc64el (4.0.0+ds-4ubuntu1) ... 176s Selecting previously unselected package libsharpyuv0:ppc64el. 176s Preparing to unpack .../069-libsharpyuv0_1.3.2-0.4build2_ppc64el.deb ... 176s Unpacking libsharpyuv0:ppc64el (1.3.2-0.4build2) ... 176s Selecting previously unselected package libwebp7:ppc64el. 176s Preparing to unpack .../070-libwebp7_1.3.2-0.4build2_ppc64el.deb ... 176s Unpacking libwebp7:ppc64el (1.3.2-0.4build2) ... 176s Selecting previously unselected package libtiff6:ppc64el. 176s Preparing to unpack .../071-libtiff6_4.5.1+git230720-4ubuntu1_ppc64el.deb ... 176s Unpacking libtiff6:ppc64el (4.5.1+git230720-4ubuntu1) ... 176s Selecting previously unselected package libxpm4:ppc64el. 176s Preparing to unpack .../072-libxpm4_1%3a3.5.17-1build1_ppc64el.deb ... 176s Unpacking libxpm4:ppc64el (1:3.5.17-1build1) ... 176s Selecting previously unselected package libgd3:ppc64el. 176s Preparing to unpack .../073-libgd3_2.3.3-9ubuntu3_ppc64el.deb ... 176s Unpacking libgd3:ppc64el (2.3.3-9ubuntu3) ... 176s Selecting previously unselected package libc-devtools. 176s Preparing to unpack .../074-libc-devtools_2.39-0ubuntu6_ppc64el.deb ... 176s Unpacking libc-devtools (2.39-0ubuntu6) ... 176s Selecting previously unselected package linux-libc-dev:ppc64el. 176s Preparing to unpack .../075-linux-libc-dev_6.8.0-20.20_ppc64el.deb ... 176s Unpacking linux-libc-dev:ppc64el (6.8.0-20.20) ... 176s Selecting previously unselected package libcrypt-dev:ppc64el. 176s Preparing to unpack .../076-libcrypt-dev_1%3a4.4.36-4_ppc64el.deb ... 176s Unpacking libcrypt-dev:ppc64el (1:4.4.36-4) ... 176s Selecting previously unselected package rpcsvc-proto. 176s Preparing to unpack .../077-rpcsvc-proto_1.4.2-0ubuntu6_ppc64el.deb ... 176s Unpacking rpcsvc-proto (1.4.2-0ubuntu6) ... 176s Selecting previously unselected package libc6-dev:ppc64el. 176s Preparing to unpack .../078-libc6-dev_2.39-0ubuntu6_ppc64el.deb ... 176s Unpacking libc6-dev:ppc64el (2.39-0ubuntu6) ... 176s Preparing to unpack .../079-libevent-core-2.1-7_2.1.12-stable-9build1_ppc64el.deb ... 176s Unpacking libevent-core-2.1-7:ppc64el (2.1.12-stable-9build1) over (2.1.12-stable-9) ... 176s Preparing to unpack .../080-libftdi1-2_1.5-6build4_ppc64el.deb ... 176s Unpacking libftdi1-2:ppc64el (1.5-6build4) over (1.5-6build3) ... 176s Preparing to unpack .../081-libldap-common_2.6.7+dfsg-1~exp1ubuntu6_all.deb ... 176s Unpacking libldap-common (2.6.7+dfsg-1~exp1ubuntu6) over (2.6.7+dfsg-1~exp1ubuntu1) ... 176s Selecting previously unselected package libunwind8:ppc64el. 176s Preparing to unpack .../082-libunwind8_1.6.2-3_ppc64el.deb ... 176s Unpacking libunwind8:ppc64el (1.6.2-3) ... 176s Selecting previously unselected package linux-modules-6.8.0-20-generic. 176s Preparing to unpack .../083-linux-modules-6.8.0-20-generic_6.8.0-20.20_ppc64el.deb ... 176s Unpacking linux-modules-6.8.0-20-generic (6.8.0-20.20) ... 177s Selecting previously unselected package linux-image-6.8.0-20-generic. 177s Preparing to unpack .../084-linux-image-6.8.0-20-generic_6.8.0-20.20_ppc64el.deb ... 177s Unpacking linux-image-6.8.0-20-generic (6.8.0-20.20) ... 178s Selecting previously unselected package linux-modules-extra-6.8.0-20-generic. 178s Preparing to unpack .../085-linux-modules-extra-6.8.0-20-generic_6.8.0-20.20_ppc64el.deb ... 178s Unpacking linux-modules-extra-6.8.0-20-generic (6.8.0-20.20) ... 179s Preparing to unpack .../086-linux-generic_6.8.0-20.20+1_ppc64el.deb ... 179s Unpacking linux-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 179s Preparing to unpack .../087-linux-image-generic_6.8.0-20.20+1_ppc64el.deb ... 179s Unpacking linux-image-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 179s Preparing to unpack .../088-linux-virtual_6.8.0-20.20+1_ppc64el.deb ... 179s Unpacking linux-virtual (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 179s Preparing to unpack .../089-linux-image-virtual_6.8.0-20.20+1_ppc64el.deb ... 179s Unpacking linux-image-virtual (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 179s Preparing to unpack .../090-linux-headers-virtual_6.8.0-20.20+1_ppc64el.deb ... 179s Unpacking linux-headers-virtual (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 179s Selecting previously unselected package linux-headers-6.8.0-20. 179s Preparing to unpack .../091-linux-headers-6.8.0-20_6.8.0-20.20_all.deb ... 179s Unpacking linux-headers-6.8.0-20 (6.8.0-20.20) ... 182s Selecting previously unselected package linux-headers-6.8.0-20-generic. 182s Preparing to unpack .../092-linux-headers-6.8.0-20-generic_6.8.0-20.20_ppc64el.deb ... 182s Unpacking linux-headers-6.8.0-20-generic (6.8.0-20.20) ... 183s Preparing to unpack .../093-linux-headers-generic_6.8.0-20.20+1_ppc64el.deb ... 183s Unpacking linux-headers-generic (6.8.0-20.20+1) over (6.8.0-11.11+1) ... 183s Selecting previously unselected package linux-tools-common. 183s Preparing to unpack .../094-linux-tools-common_6.8.0-20.20_all.deb ... 183s Unpacking linux-tools-common (6.8.0-20.20) ... 183s Selecting previously unselected package linux-tools-6.8.0-20. 183s Preparing to unpack .../095-linux-tools-6.8.0-20_6.8.0-20.20_ppc64el.deb ... 183s Unpacking linux-tools-6.8.0-20 (6.8.0-20.20) ... 183s Selecting previously unselected package linux-tools-6.8.0-20-generic. 183s Preparing to unpack .../096-linux-tools-6.8.0-20-generic_6.8.0-20.20_ppc64el.deb ... 183s Unpacking linux-tools-6.8.0-20-generic (6.8.0-20.20) ... 183s Selecting previously unselected package manpages-dev. 183s Preparing to unpack .../097-manpages-dev_6.05.01-1_all.deb ... 183s Unpacking manpages-dev (6.05.01-1) ... 184s Preparing to unpack .../098-python3-distutils_3.12.2-3ubuntu1.1_all.deb ... 184s Unpacking python3-distutils (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 184s Preparing to unpack .../099-python3-lib2to3_3.12.2-3ubuntu1.1_all.deb ... 184s Unpacking python3-lib2to3 (3.12.2-3ubuntu1.1) over (3.11.5-1) ... 184s Preparing to unpack .../100-python3-pyrsistent_0.20.0-1build1_ppc64el.deb ... 184s Unpacking python3-pyrsistent:ppc64el (0.20.0-1build1) over (0.20.0-1) ... 184s Preparing to unpack .../101-python3-typing-extensions_4.10.0-1_all.deb ... 184s Unpacking python3-typing-extensions (4.10.0-1) over (4.9.0-1) ... 184s Selecting previously unselected package ubuntu-kernel-accessories. 184s Preparing to unpack .../102-ubuntu-kernel-accessories_1.536build1_ppc64el.deb ... 184s Unpacking ubuntu-kernel-accessories (1.536build1) ... 184s Preparing to unpack .../103-kpartx_0.9.4-5ubuntu6_ppc64el.deb ... 184s Unpacking kpartx (0.9.4-5ubuntu6) over (0.9.4-5ubuntu3) ... 184s Setting up pinentry-curses (1.2.1-3ubuntu4) ... 184s Setting up motd-news-config (13ubuntu8) ... 184s Setting up libtext-iconv-perl:ppc64el (1.7-8build2) ... 184s Setting up libtext-charwidth-perl:ppc64el (0.04-11build2) ... 184s Setting up libsharpyuv0:ppc64el (1.3.2-0.4build2) ... 184s Setting up liburcu8t64:ppc64el (0.14.0-3.1) ... 184s Setting up tcpdump (4.99.4-3ubuntu2) ... 184s Setting up libibverbs1:ppc64el (50.0-2build1) ... 184s Setting up systemd-sysv (255.4-1ubuntu5) ... 184s Setting up ubuntu-kernel-accessories (1.536build1) ... 184s Setting up libapparmor1:ppc64el (4.0.0-beta3-0ubuntu2) ... 184s Setting up libatm1t64:ppc64el (1:2.5.1-5.1) ... 184s Setting up liblerc4:ppc64el (4.0.0+ds-4ubuntu1) ... 184s Setting up libgdbm6t64:ppc64el (1.23-5.1) ... 184s Setting up bsdextrautils (2.39.3-9ubuntu2) ... 184s Setting up libxpm4:ppc64el (1:3.5.17-1build1) ... 184s Setting up libgdbm-compat4t64:ppc64el (1.23-5.1) ... 184s Setting up xdg-user-dirs (0.18-1) ... 184s Setting up ibverbs-providers:ppc64el (50.0-2build1) ... 184s Setting up linux-headers-6.8.0-20 (6.8.0-20.20) ... 184s Setting up libmagic-mgc (1:5.45-3) ... 184s Setting up gawk (1:5.2.1-2build2) ... 184s Setting up libjq1:ppc64el (1.7.1-3) ... 184s Setting up manpages (6.05.01-1) ... 184s Setting up libtirpc-common (1.3.4+ds-1.1) ... 184s Setting up libbrotli1:ppc64el (1.1.0-2build1) ... 184s Setting up libsqlite3-0:ppc64el (3.45.1-1ubuntu1) ... 184s Setting up libsasl2-modules:ppc64el (2.1.28+dfsg1-5ubuntu1) ... 184s Setting up libuv1t64:ppc64el (1.48.0-1.1) ... 184s Setting up libmagic1t64:ppc64el (1:5.45-3) ... 184s Setting up rsyslog (8.2312.0-3ubuntu7) ... 184s info: The user `syslog' is already a member of `adm'. 186s Setting up binutils-common:ppc64el (2.42-4ubuntu1) ... 186s Setting up libpsl5t64:ppc64el (0.21.2-1.1) ... 186s Setting up libnghttp2-14:ppc64el (1.59.0-1build1) ... 186s Setting up libdeflate0:ppc64el (1.19-1) ... 186s Setting up linux-libc-dev:ppc64el (6.8.0-20.20) ... 186s Setting up bc (1.07.1-3ubuntu2) ... 186s Setting up libctf-nobfd0:ppc64el (2.42-4ubuntu1) ... 186s Setting up libnss-systemd:ppc64el (255.4-1ubuntu5) ... 186s Setting up krb5-locales (1.20.1-6ubuntu1) ... 186s Setting up libcom-err2:ppc64el (1.47.0-2.4~exp1ubuntu2) ... 186s Setting up file (1:5.45-3) ... 186s Setting up lshw (02.19.git.2021.06.19.996aaad9c7-2build2) ... 186s Setting up libldap-common (2.6.7+dfsg-1~exp1ubuntu6) ... 186s Setting up libunwind8:ppc64el (1.6.2-3) ... 186s Setting up libprotobuf-c1:ppc64el (1.4.1-1ubuntu3) ... 186s Setting up libjbig0:ppc64el (2.1-6.1ubuntu1) ... 186s Setting up xxd (2:9.1.0016-1ubuntu6) ... 186s Setting up libsframe1:ppc64el (2.42-4ubuntu1) ... 186s Setting up libelf1t64:ppc64el (0.190-1.1build2) ... 186s Setting up libkrb5support0:ppc64el (1.20.1-6ubuntu1) ... 186s Setting up libdw1t64:ppc64el (0.190-1.1build2) ... 186s Setting up linux-headers-6.8.0-20-generic (6.8.0-20.20) ... 186s Setting up eject (2.39.3-9ubuntu2) ... 186s Setting up apparmor (4.0.0-beta3-0ubuntu2) ... 186s Installing new version of config file /etc/apparmor.d/abstractions/authentication ... 186s Installing new version of config file /etc/apparmor.d/abstractions/crypto ... 186s Installing new version of config file /etc/apparmor.d/abstractions/kde-open5 ... 186s Installing new version of config file /etc/apparmor.d/abstractions/openssl ... 186s Installing new version of config file /etc/apparmor.d/code ... 186s Installing new version of config file /etc/apparmor.d/firefox ... 187s Reloading AppArmor profiles 187s Setting up libglib2.0-0t64:ppc64el (2.79.3-3ubuntu5) ... 187s No schema files found: doing nothing. 187s Setting up libglib2.0-data (2.79.3-3ubuntu5) ... 187s Setting up rpcsvc-proto (1.4.2-0ubuntu6) ... 187s Setting up vim-common (2:9.1.0016-1ubuntu6) ... 187s Setting up gcc-13-base:ppc64el (13.2.0-21ubuntu1) ... 187s Setting up libqrtr-glib0:ppc64el (1.2.2-1ubuntu3) ... 187s Setting up libslang2:ppc64el (2.3.3-3build1) ... 187s Setting up libnvme1t64 (1.8-3) ... 187s Setting up mtr-tiny (0.95-1.1build1) ... 187s Setting up gnupg-l10n (2.4.4-2ubuntu15) ... 187s Setting up librtmp1:ppc64el (2.4+20151223.gitfa8646d.1-2build6) ... 187s Setting up libdbus-1-3:ppc64el (1.14.10-4ubuntu2) ... 187s Setting up xz-utils (5.6.0-0.2) ... 187s Setting up perl-modules-5.38 (5.38.2-3.2) ... 187s Setting up libproc2-0:ppc64el (2:4.0.4-4ubuntu2) ... 187s Setting up fonts-dejavu-mono (2.37-8) ... 187s Setting up libpng16-16t64:ppc64el (1.6.43-3) ... 187s Setting up systemd-timesyncd (255.4-1ubuntu5) ... 188s Setting up libevent-core-2.1-7:ppc64el (2.1.12-stable-9build1) ... 188s Setting up libss2:ppc64el (1.47.0-2.4~exp1ubuntu2) ... 188s Setting up usb.ids (2024.03.18-1) ... 188s Setting up sudo (1.9.15p5-3ubuntu3) ... 188s Setting up fonts-dejavu-core (2.37-8) ... 188s Setting up dhcpcd-base (1:10.0.6-1ubuntu2) ... 188s Setting up gir1.2-glib-2.0:ppc64el (2.79.3-3ubuntu5) ... 188s Setting up libk5crypto3:ppc64el (1.20.1-6ubuntu1) ... 188s Setting up libjpeg-turbo8:ppc64el (2.1.5-2ubuntu1) ... 188s Setting up logsave (1.47.0-2.4~exp1ubuntu2) ... 188s Setting up libwebp7:ppc64el (1.3.2-0.4build2) ... 188s Setting up libfdisk1:ppc64el (2.39.3-9ubuntu2) ... 188s Setting up libdb5.3t64:ppc64el (5.3.28+dfsg2-6) ... 188s Setting up libdevmapper1.02.1:ppc64el (2:1.02.185-3ubuntu2) ... 188s Setting up libaio1t64:ppc64el (0.3.113-6) ... 188s Setting up python-apt-common (2.7.7) ... 188s Setting up mount (2.39.3-9ubuntu2) ... 188s Setting up dmsetup (2:1.02.185-3ubuntu2) ... 188s Setting up uuid-runtime (2.39.3-9ubuntu2) ... 189s uuidd.service is a disabled or a static unit not running, not starting it. 189s Setting up libmm-glib0:ppc64el (1.23.4-0ubuntu1) ... 189s Setting up groff-base (1.23.0-3build1) ... 189s Setting up libcrypt-dev:ppc64el (1:4.4.36-4) ... 189s Setting up libplymouth5:ppc64el (24.004.60-1ubuntu6) ... 189s Setting up dbus-session-bus-common (1.14.10-4ubuntu2) ... 189s Setting up jq (1.7.1-3) ... 189s Setting up procps (2:4.0.4-4ubuntu2) ... 189s Setting up gpgconf (2.4.4-2ubuntu15) ... 189s Setting up libcryptsetup12:ppc64el (2:2.7.0-1ubuntu2) ... 189s Setting up libgirepository-1.0-1:ppc64el (1.79.1-1ubuntu6) ... 189s Setting up libjson-glib-1.0-common (1.8.0-2build1) ... 189s Setting up libkrb5-3:ppc64el (1.20.1-6ubuntu1) ... 189s Setting up libpython3.11-minimal:ppc64el (3.11.8-1build4) ... 189s Setting up libusb-1.0-0:ppc64el (2:1.0.27-1) ... 189s Setting up libperl5.38t64:ppc64el (5.38.2-3.2) ... 189s Setting up tnftp (20230507-2build1) ... 189s Setting up libbinutils:ppc64el (2.42-4ubuntu1) ... 189s Setting up dbus-system-bus-common (1.14.10-4ubuntu2) ... 189s Setting up libfido2-1:ppc64el (1.14.0-1build1) ... 189s Setting up libc-dev-bin (2.39-0ubuntu6) ... 189s Setting up openssl (3.0.13-0ubuntu2) ... 189s Setting up linux-modules-6.8.0-20-generic (6.8.0-20.20) ... 192s Setting up linux-tools-common (6.8.0-20.20) ... 192s Setting up readline-common (8.2-4) ... 192s Setting up libxml2:ppc64el (2.9.14+dfsg-1.3ubuntu2) ... 192s Setting up libxmuu1:ppc64el (2:1.1.3-3build1) ... 192s Setting up dbus-bin (1.14.10-4ubuntu2) ... 192s Setting up info (7.1-3build1) ... 192s Setting up liblocale-gettext-perl (1.07-6ubuntu4) ... 192s Setting up gpg (2.4.4-2ubuntu15) ... 192s Setting up libgudev-1.0-0:ppc64el (1:238-3ubuntu2) ... 192s Setting up libpolkit-gobject-1-0:ppc64el (124-1ubuntu1) ... 192s Setting up libbpf1:ppc64el (1:1.3.0-2build1) ... 192s Setting up libmbim-glib4:ppc64el (1.31.2-0ubuntu2) ... 192s Setting up rsync (3.2.7-1build1) ... 193s rsync.service is a disabled or a static unit not running, not starting it. 193s Setting up libudisks2-0:ppc64el (2.10.1-6) ... 193s Setting up libkmod2:ppc64el (31+20240202-2ubuntu4) ... 193s Setting up bolt (0.9.6-2build1) ... 193s bolt.service is a disabled or a static unit not running, not starting it. 193s Setting up libllvm18:ppc64el (1:18.1.2-1ubuntu2) ... 193s Setting up gnupg-utils (2.4.4-2ubuntu15) ... 193s Setting up initramfs-tools-bin (0.142ubuntu23) ... 193s Setting up libctf0:ppc64el (2.42-4ubuntu1) ... 193s Setting up libjpeg8:ppc64el (8c-2ubuntu11) ... 193s Setting up cryptsetup-bin (2:2.7.0-1ubuntu2) ... 193s Setting up python3.11-minimal (3.11.8-1build4) ... 195s Setting up libclang1-18 (1:18.1.2-1ubuntu2) ... 195s Setting up manpages-dev (6.05.01-1) ... 195s Setting up linux-modules-extra-6.8.0-20-generic (6.8.0-20.20) ... 196s Setting up apt-utils (2.7.14) ... 196s Setting up gpg-agent (2.4.4-2ubuntu15) ... 197s Setting up libpython3.12-stdlib:ppc64el (3.12.2-4build3) ... 197s Setting up wget (1.21.4-1ubuntu2) ... 197s Setting up fontconfig-config (2.15.0-1.1ubuntu1) ... 197s Setting up libxmlb2:ppc64el (0.3.15-1build1) ... 197s Setting up libpython3.11-stdlib:ppc64el (3.11.8-1build4) ... 197s Setting up python3.12 (3.12.2-4build3) ... 199s Setting up gpgsm (2.4.4-2ubuntu15) ... 199s Setting up inetutils-telnet (2:2.5-3ubuntu3) ... 199s Setting up libreiserfscore0t64 (1:3.6.27-7.1) ... 199s Setting up e2fsprogs (1.47.0-2.4~exp1ubuntu2) ... 199s update-initramfs: deferring update (trigger activated) 199s e2scrub_all.service is a disabled or a static unit not running, not starting it. 199s Setting up linux-tools-6.8.0-20 (6.8.0-20.20) ... 199s Setting up libparted2t64:ppc64el (3.6-3.1build2) ... 199s Setting up linux-headers-generic (6.8.0-20.20+1) ... 199s Setting up dbus-daemon (1.14.10-4ubuntu2) ... 199s Setting up libmbim-proxy (1.31.2-0ubuntu2) ... 199s Setting up vim-tiny (2:9.1.0016-1ubuntu6) ... 199s Setting up kmod (31+20240202-2ubuntu4) ... 200s Setting up libnetplan1:ppc64el (1.0-1) ... 200s Setting up man-db (2.12.0-3build4) ... 200s Updating database of manual pages ... 203s man-db.service is a disabled or a static unit not running, not starting it. 203s Setting up fdisk (2.39.3-9ubuntu2) ... 203s Setting up libjson-glib-1.0-0:ppc64el (1.8.0-2build1) ... 203s Setting up libsasl2-modules-db:ppc64el (2.1.28+dfsg1-5ubuntu1) ... 203s Setting up libftdi1-2:ppc64el (1.5-6build4) ... 203s Setting up perl (5.38.2-3.2) ... 203s Setting up libfreetype6:ppc64el (2.13.2+dfsg-1build2) ... 203s Setting up linux-tools-6.8.0-20-generic (6.8.0-20.20) ... 203s Setting up gir1.2-girepository-2.0:ppc64el (1.79.1-1ubuntu6) ... 203s Setting up dbus (1.14.10-4ubuntu2) ... 203s A reboot is required to replace the running dbus-daemon. 203s Please reboot the system when convenient. 203s Setting up shared-mime-info (2.4-1build1) ... 203s Setting up libblockdev-utils3:ppc64el (3.1.0-1build1) ... 203s Setting up libgssapi-krb5-2:ppc64el (1.20.1-6ubuntu1) ... 203s Setting up udev (255.4-1ubuntu5) ... 204s Setting up ftp (20230507-2build1) ... 204s Setting up keyboxd (2.4.4-2ubuntu15) ... 204s Setting up libdpkg-perl (1.22.6ubuntu5) ... 204s Setting up libsasl2-2:ppc64el (2.1.28+dfsg1-5ubuntu1) ... 204s Setting up libssh-4:ppc64el (0.10.6-2build1) ... 204s Setting up libblockdev-nvme3:ppc64el (3.1.0-1build1) ... 204s Setting up libblockdev-fs3:ppc64el (3.1.0-1build1) ... 204s Setting up ieee-data (20220827.1) ... 204s Setting up libtiff6:ppc64el (4.5.1+git230720-4ubuntu1) ... 204s Setting up kpartx (0.9.4-5ubuntu6) ... 204s Setting up libpam-systemd:ppc64el (255.4-1ubuntu5) ... 204s Setting up libpolkit-agent-1-0:ppc64el (124-1ubuntu1) ... 204s Setting up libc6-dev:ppc64el (2.39-0ubuntu6) ... 204s Setting up libgpgme11t64:ppc64el (1.18.0-4.1ubuntu3) ... 204s Setting up libfontconfig1:ppc64el (2.15.0-1.1ubuntu1) ... 205s Setting up binutils-powerpc64le-linux-gnu (2.42-4ubuntu1) ... 205s Setting up netplan-generator (1.0-1) ... 205s Removing 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator' 205s Setting up initramfs-tools-core (0.142ubuntu23) ... 205s Setting up libclang-cpp18 (1:18.1.2-1ubuntu2) ... 205s Setting up libbpfcc:ppc64el (0.29.1+ds-1ubuntu4) ... 205s Setting up libarchive13t64:ppc64el (3.7.2-1.1ubuntu2) ... 205s Setting up libldap2:ppc64el (2.6.7+dfsg-1~exp1ubuntu6) ... 205s Setting up libpython3-stdlib:ppc64el (3.12.2-0ubuntu1) ... 205s Setting up systemd-resolved (255.4-1ubuntu5) ... 205s Setting up python3.11 (3.11.8-1build4) ... 206s Setting up telnet (0.17+2.5-3ubuntu3) ... 206s Setting up initramfs-tools (0.142ubuntu23) ... 206s update-initramfs: deferring update (trigger activated) 206s Setting up libblockdev-mdraid3:ppc64el (3.1.0-1build1) ... 206s Setting up linux-headers-virtual (6.8.0-20.20+1) ... 207s Setting up libcurl4t64:ppc64el (8.5.0-2ubuntu8) ... 207s Setting up bpftrace (0.20.2-1ubuntu1) ... 207s Setting up bind9-libs:ppc64el (1:9.18.24-0ubuntu3) ... 207s Setting up linux-image-6.8.0-20-generic (6.8.0-20.20) ... 209s I: /boot/vmlinux is now a symlink to vmlinux-6.8.0-20-generic 209s I: /boot/initrd.img is now a symlink to initrd.img-6.8.0-20-generic 209s Setting up libtirpc3t64:ppc64el (1.3.4+ds-1.1) ... 209s Setting up e2fsprogs-l10n (1.47.0-2.4~exp1ubuntu2) ... 209s Setting up libblockdev-swap3:ppc64el (3.1.0-1build1) ... 209s Setting up plymouth (24.004.60-1ubuntu6) ... 210s update-initramfs: Generating /boot/initrd.img-6.8.0-11-generic 210s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 216s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 216s update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults 217s Setting up iproute2 (6.1.0-1ubuntu5) ... 217s Setting up openssh-client (1:9.6p1-3ubuntu11) ... 217s Setting up libgusb2:ppc64el (0.4.8-1build1) ... 217s Setting up btrfs-progs (6.6.3-1.1build1) ... 217s Setting up libblockdev-loop3:ppc64el (3.1.0-1build1) ... 217s Setting up libcurl3t64-gnutls:ppc64el (8.5.0-2ubuntu8) ... 217s Setting up parted (3.6-3.1build2) ... 217s Setting up libqmi-glib5:ppc64el (1.35.2-0ubuntu1) ... 217s Setting up python3 (3.12.2-0ubuntu1) ... 217s Setting up binutils (2.42-4ubuntu1) ... 217s Setting up libblockdev3:ppc64el (3.1.0-1build1) ... 217s Setting up libjcat1:ppc64el (0.2.0-2build2) ... 217s Setting up multipath-tools (0.9.4-5ubuntu6) ... 218s Setting up dpkg-dev (1.22.6ubuntu5) ... 218s Setting up libblockdev-part3:ppc64el (3.1.0-1build1) ... 218s Setting up dirmngr (2.4.4-2ubuntu15) ... 218s Setting up dbus-user-session (1.14.10-4ubuntu2) ... 218s Setting up plymouth-theme-ubuntu-text (24.004.60-1ubuntu6) ... 218s update-initramfs: deferring update (trigger activated) 218s Setting up python3-cryptography (41.0.7-4build2) ... 218s Setting up python3-gi (3.47.0-3build1) ... 218s Setting up libgd3:ppc64el (2.3.3-9ubuntu3) ... 218s Setting up python3-typing-extensions (4.10.0-1) ... 219s Setting up lsof (4.95.0-1build2) ... 219s Setting up python3-pyrsistent:ppc64el (0.20.0-1build1) ... 219s Setting up python3-netaddr (0.8.0-2ubuntu1) ... 219s Setting up libnsl2:ppc64el (1.3.0-3build2) ... 219s Setting up gnupg (2.4.4-2ubuntu15) ... 219s Setting up python3-netplan (1.0-1) ... 219s Setting up curl (8.5.0-2ubuntu8) ... 219s Setting up libvolume-key1:ppc64el (0.3.12-7build1) ... 219s Setting up linux-image-virtual (6.8.0-20.20+1) ... 219s Setting up bind9-host (1:9.18.24-0ubuntu3) ... 219s Setting up python3-lib2to3 (3.12.2-3ubuntu1.1) ... 219s Setting up python3-bpfcc (0.29.1+ds-1ubuntu4) ... 219s Setting up libc-devtools (2.39-0ubuntu6) ... 219s Setting up python3-pkg-resources (68.1.2-2ubuntu1) ... 220s Setting up python3-distutils (3.12.2-3ubuntu1.1) ... 220s python3.12: can't get files for byte-compilation 220s Setting up openssh-sftp-server (1:9.6p1-3ubuntu11) ... 220s Setting up linux-image-generic (6.8.0-20.20+1) ... 220s Setting up python3-dbus (1.3.2-5build2) ... 220s Setting up python3-setuptools (68.1.2-2ubuntu1) ... 221s Setting up gpg-wks-client (2.4.4-2ubuntu15) ... 221s Setting up openssh-server (1:9.6p1-3ubuntu11) ... 221s Replacing config file /etc/ssh/sshd_config with new version 223s Created symlink /etc/systemd/system/ssh.service.requires/ssh.socket → /usr/lib/systemd/system/ssh.socket. 224s Setting up linux-generic (6.8.0-20.20+1) ... 224s Setting up libblockdev-crypto3:ppc64el (3.1.0-1build1) ... 224s Setting up python3-gdbm:ppc64el (3.12.2-3ubuntu1.1) ... 224s Setting up python3-apt (2.7.7) ... 224s Setting up libfwupd2:ppc64el (1.9.15-2) ... 224s Setting up python3-yaml (6.0.1-2build1) ... 224s Setting up libqmi-proxy (1.35.2-0ubuntu1) ... 224s Setting up netplan.io (1.0-1) ... 224s Setting up linux-virtual (6.8.0-20.20+1) ... 224s Setting up grub-common (2.12-1ubuntu5) ... 225s Setting up bpfcc-tools (0.29.1+ds-1ubuntu4) ... 225s Setting up bind9-dnsutils (1:9.18.24-0ubuntu3) ... 225s Setting up ubuntu-pro-client (31.2.2) ... 227s Setting up fwupd (1.9.15-2) ... 227s fwupd-offline-update.service is a disabled or a static unit not running, not starting it. 227s fwupd-refresh.service is a disabled or a static unit not running, not starting it. 227s fwupd.service is a disabled or a static unit not running, not starting it. 227s Setting up ubuntu-pro-client-l10n (31.2.2) ... 227s Setting up udisks2 (2.10.1-6) ... 228s Setting up grub2-common (2.12-1ubuntu5) ... 230s Setting up grub-ieee1275-bin (2.12-1ubuntu5) ... 230s Setting up grub-ieee1275 (2.12-1ubuntu5) ... 230s Installing for powerpc-ieee1275 platform. 230s Installation finished. No error reported. 230s Sourcing file `/etc/default/grub' 230s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 230s Generating grub configuration file ... 230s Found linux image: /boot/vmlinux-6.8.0-20-generic 230s Found linux image: /boot/vmlinux-6.8.0-11-generic 230s Found initrd image: /boot/initrd.img-6.8.0-11-generic 230s Warning: os-prober will not be executed to detect other bootable partitions. 230s Systems on them will not be added to the GRUB boot configuration. 230s Check GRUB_DISABLE_OS_PROBER documentation entry. 230s Adding boot menu entry for UEFI Firmware Settings ... 230s done 230s Processing triggers for ufw (0.36.2-5) ... 230s Processing triggers for systemd (255.4-1ubuntu5) ... 230s Processing triggers for debianutils (5.17) ... 230s Processing triggers for install-info (7.1-3build1) ... 230s Processing triggers for libc-bin (2.39-0ubuntu6) ... 230s Processing triggers for initramfs-tools (0.142ubuntu23) ... 230s update-initramfs: Generating /boot/initrd.img-6.8.0-11-generic 230s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 238s Processing triggers for linux-image-6.8.0-20-generic (6.8.0-20.20) ... 238s /etc/kernel/postinst.d/initramfs-tools: 238s update-initramfs: Generating /boot/initrd.img-6.8.0-20-generic 238s W: No lz4 in /usr/bin:/sbin:/bin, using gzip 242s /etc/kernel/postinst.d/zz-update-grub: 242s Sourcing file `/etc/default/grub' 242s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 242s Generating grub configuration file ... 242s Found linux image: /boot/vmlinux-6.8.0-20-generic 242s Found initrd image: /boot/initrd.img-6.8.0-20-generic 242s Found linux image: /boot/vmlinux-6.8.0-11-generic 242s Found initrd image: /boot/initrd.img-6.8.0-11-generic 242s Warning: os-prober will not be executed to detect other bootable partitions. 242s Systems on them will not be added to the GRUB boot configuration. 242s Check GRUB_DISABLE_OS_PROBER documentation entry. 242s Adding boot menu entry for UEFI Firmware Settings ... 242s done 243s Reading package lists... 244s Building dependency tree... 244s Reading state information... 244s The following packages will be REMOVED: 244s libaio1* libnetplan0* python3-distutils* python3-lib2to3* 244s 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded. 244s After this operation, 1613 kB disk space will be freed. 244s (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 ... 112169 files and directories currently installed.) 244s Removing libaio1:ppc64el (0.3.113-5) ... 244s Removing libnetplan0:ppc64el (0.107.1-3) ... 244s Removing python3-distutils (3.12.2-3ubuntu1.1) ... 244s Removing python3-lib2to3 (3.12.2-3ubuntu1.1) ... 244s Processing triggers for libc-bin (2.39-0ubuntu6) ... 245s autopkgtest [23:31:28]: rebooting testbed after setup commands that affected boot 423s autopkgtest-virt-ssh: WARNING: ssh connection failed. Retrying in 3 seconds... 429s autopkgtest [23:34:32]: testbed running kernel: Linux 6.8.0-20-generic #20-Ubuntu SMP Mon Mar 18 11:46:05 UTC 2024 433s autopkgtest [23:34:36]: @@@@@@@@@@@@@@@@@@@@ apt-source gopacket 436s Get:1 http://ftpmaster.internal/ubuntu noble-proposed/universe gopacket 1.1.19-4build1 (dsc) [2179 B] 436s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/universe gopacket 1.1.19-4build1 (tar) [951 kB] 436s Get:3 http://ftpmaster.internal/ubuntu noble-proposed/universe gopacket 1.1.19-4build1 (diff) [4148 B] 436s gpgv: Signature made Thu Mar 14 13:10:58 2024 UTC 436s gpgv: using RSA key 568BF22A66337CBFC9A6B9B72C83DBC8E9BD0E37 436s gpgv: Can't check signature: No public key 436s dpkg-source: warning: cannot verify inline signature for ./gopacket_1.1.19-4build1.dsc: no acceptable signature found 436s autopkgtest [23:34:38]: testing package gopacket version 1.1.19-4build1 436s autopkgtest [23:34:39]: build not needed 439s autopkgtest [23:34:42]: test dh-golang-autopkgtest: preparing testbed 441s Reading package lists... 441s Building dependency tree... 441s Reading state information... 441s Starting pkgProblemResolver with broken count: 0 441s Starting 2 pkgProblemResolver with broken count: 0 441s Done 442s The following additional packages will be installed: 442s autoconf automake autopoint autotools-dev build-essential cpp cpp-13 442s cpp-13-powerpc64le-linux-gnu cpp-powerpc64le-linux-gnu debhelper debugedit 442s dh-autoreconf dh-golang dh-strip-nondeterminism dwz g++ g++-13 442s g++-13-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu gcc gcc-13 442s gcc-13-powerpc64le-linux-gnu gcc-powerpc64le-linux-gnu gettext 442s golang-1.22-go golang-1.22-src golang-github-google-gopacket-dev golang-go 442s golang-golang-x-crypto-dev golang-golang-x-net-dev golang-golang-x-sys-dev 442s golang-golang-x-term-dev golang-golang-x-text-dev golang-src intltool-debian 442s libarchive-zip-perl libasan8 libatomic1 libcc1-0 libdbus-1-dev 442s libdebhelper-perl libfile-stripnondeterminism-perl libgcc-13-dev libgomp1 442s libibverbs-dev libisl23 libitm1 liblsan0 libmpc3 libnl-3-dev 442s libnl-route-3-dev libpcap0.8-dev libpcap0.8t64 libpkgconf3 libquadmath0 442s libstdc++-13-dev libsub-override-perl libtool libtsan2 libubsan1 m4 pkgconf 442s pkgconf-bin po-debconf sgml-base xml-core 442s Suggested packages: 442s autoconf-archive gnu-standards autoconf-doc cpp-doc gcc-13-locales 442s cpp-13-doc dh-make gcc-13-doc gcc-multilib flex bison gdb gcc-doc 442s gdb-powerpc64le-linux-gnu gettext-doc libasprintf-dev libgettextpo-dev bzr 442s | brz git mercurial subversion libstdc++-13-doc libtool-doc gfortran 442s | fortran95-compiler gcj-jdk m4-doc libmail-box-perl sgml-base-doc 442s Recommended packages: 442s libarchive-cpio-perl libltdl-dev libmail-sendmail-perl 442s The following packages will be REMOVED: 442s libpcap0.8 442s The following NEW packages will be installed: 442s autoconf automake autopkgtest-satdep autopoint autotools-dev build-essential 442s cpp cpp-13 cpp-13-powerpc64le-linux-gnu cpp-powerpc64le-linux-gnu debhelper 442s debugedit dh-autoreconf dh-golang dh-strip-nondeterminism dwz g++ g++-13 442s g++-13-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu gcc gcc-13 442s gcc-13-powerpc64le-linux-gnu gcc-powerpc64le-linux-gnu gettext 442s golang-1.22-go golang-1.22-src golang-github-google-gopacket-dev golang-go 442s golang-golang-x-crypto-dev golang-golang-x-net-dev golang-golang-x-sys-dev 442s golang-golang-x-term-dev golang-golang-x-text-dev golang-src intltool-debian 442s libarchive-zip-perl libasan8 libatomic1 libcc1-0 libdbus-1-dev 442s libdebhelper-perl libfile-stripnondeterminism-perl libgcc-13-dev libgomp1 442s libibverbs-dev libisl23 libitm1 liblsan0 libmpc3 libnl-3-dev 442s libnl-route-3-dev libpcap0.8-dev libpcap0.8t64 libpkgconf3 libquadmath0 442s libstdc++-13-dev libsub-override-perl libtool libtsan2 libubsan1 m4 pkgconf 442s pkgconf-bin po-debconf sgml-base xml-core 442s 0 upgraded, 67 newly installed, 1 to remove and 0 not upgraded. 442s Need to get 116 MB/116 MB of archives. 442s After this operation, 534 MB of additional disk space will be used. 442s Get:1 /tmp/autopkgtest.i5Qbyb/1-autopkgtest-satdep.deb autopkgtest-satdep ppc64el 0 [812 B] 442s Get:2 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpcap0.8t64 ppc64el 1.10.4-4.1ubuntu2 [177 kB] 442s Get:3 http://ftpmaster.internal/ubuntu noble/main ppc64el sgml-base all 1.31 [11.4 kB] 442s Get:4 http://ftpmaster.internal/ubuntu noble/main ppc64el m4 ppc64el 1.4.19-4 [275 kB] 442s Get:5 http://ftpmaster.internal/ubuntu noble/main ppc64el autoconf all 2.71-3 [339 kB] 442s Get:6 http://ftpmaster.internal/ubuntu noble/main ppc64el autotools-dev all 20220109.1 [44.9 kB] 442s Get:7 http://ftpmaster.internal/ubuntu noble/main ppc64el automake all 1:1.16.5-1.3ubuntu1 [558 kB] 443s Get:8 http://ftpmaster.internal/ubuntu noble/main ppc64el autopoint all 0.21-14ubuntu1 [422 kB] 443s Get:9 http://ftpmaster.internal/ubuntu noble/main ppc64el libisl23 ppc64el 0.26-3 [864 kB] 443s Get:10 http://ftpmaster.internal/ubuntu noble/main ppc64el libmpc3 ppc64el 1.3.1-1 [61.2 kB] 443s Get:11 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el cpp-13-powerpc64le-linux-gnu ppc64el 13.2.0-21ubuntu1 [10.7 MB] 445s Get:12 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el cpp-13 ppc64el 13.2.0-21ubuntu1 [1034 B] 445s Get:13 http://ftpmaster.internal/ubuntu noble/main ppc64el cpp-powerpc64le-linux-gnu ppc64el 4:13.2.0-7ubuntu1 [5330 B] 445s Get:14 http://ftpmaster.internal/ubuntu noble/main ppc64el cpp ppc64el 4:13.2.0-7ubuntu1 [22.5 kB] 445s Get:15 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libcc1-0 ppc64el 14-20240315-1ubuntu1 [48.1 kB] 445s Get:16 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgomp1 ppc64el 14-20240315-1ubuntu1 [161 kB] 445s Get:17 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libitm1 ppc64el 14-20240315-1ubuntu1 [32.2 kB] 445s Get:18 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libatomic1 ppc64el 14-20240315-1ubuntu1 [10.7 kB] 445s Get:19 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libasan8 ppc64el 14-20240315-1ubuntu1 [2973 kB] 445s Get:20 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el liblsan0 ppc64el 14-20240315-1ubuntu1 [1325 kB] 445s Get:21 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libtsan2 ppc64el 14-20240315-1ubuntu1 [2702 kB] 445s Get:22 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libubsan1 ppc64el 14-20240315-1ubuntu1 [1193 kB] 445s Get:23 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libquadmath0 ppc64el 14-20240315-1ubuntu1 [158 kB] 445s Get:24 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libgcc-13-dev ppc64el 13.2.0-21ubuntu1 [1579 kB] 445s Get:25 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gcc-13-powerpc64le-linux-gnu ppc64el 13.2.0-21ubuntu1 [20.6 MB] 446s Get:26 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el gcc-13 ppc64el 13.2.0-21ubuntu1 [479 kB] 446s Get:27 http://ftpmaster.internal/ubuntu noble/main ppc64el gcc-powerpc64le-linux-gnu ppc64el 4:13.2.0-7ubuntu1 [1224 B] 446s Get:28 http://ftpmaster.internal/ubuntu noble/main ppc64el gcc ppc64el 4:13.2.0-7ubuntu1 [5022 B] 446s Get:29 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libstdc++-13-dev ppc64el 13.2.0-21ubuntu1 [2510 kB] 446s Get:30 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el g++-13-powerpc64le-linux-gnu ppc64el 13.2.0-21ubuntu1 [12.1 MB] 447s Get:31 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el g++-13 ppc64el 13.2.0-21ubuntu1 [14.5 kB] 447s Get:32 http://ftpmaster.internal/ubuntu noble/main ppc64el g++-powerpc64le-linux-gnu ppc64el 4:13.2.0-7ubuntu1 [968 B] 447s Get:33 http://ftpmaster.internal/ubuntu noble/main ppc64el g++ ppc64el 4:13.2.0-7ubuntu1 [1086 B] 447s Get:34 http://ftpmaster.internal/ubuntu noble/main ppc64el build-essential ppc64el 12.10ubuntu1 [4936 B] 447s Get:35 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdebhelper-perl all 13.14.1ubuntu5 [89.8 kB] 447s Get:36 http://ftpmaster.internal/ubuntu noble/main ppc64el libtool all 2.4.7-7 [166 kB] 447s Get:37 http://ftpmaster.internal/ubuntu noble/main ppc64el dh-autoreconf all 20 [16.1 kB] 447s Get:38 http://ftpmaster.internal/ubuntu noble/main ppc64el libarchive-zip-perl all 1.68-1 [90.2 kB] 447s Get:39 http://ftpmaster.internal/ubuntu noble/main ppc64el libsub-override-perl all 0.10-1 [10.0 kB] 447s Get:40 http://ftpmaster.internal/ubuntu noble/main ppc64el libfile-stripnondeterminism-perl all 1.13.1-1 [18.1 kB] 447s Get:41 http://ftpmaster.internal/ubuntu noble/main ppc64el dh-strip-nondeterminism all 1.13.1-1 [5362 B] 447s Get:42 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el debugedit ppc64el 1:5.0-5build1 [51.4 kB] 447s Get:43 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el dwz ppc64el 0.15-1build5 [142 kB] 447s Get:44 http://ftpmaster.internal/ubuntu noble/main ppc64el gettext ppc64el 0.21-14ubuntu1 [979 kB] 447s Get:45 http://ftpmaster.internal/ubuntu noble/main ppc64el intltool-debian all 0.35.0+20060710.6 [23.2 kB] 447s Get:46 http://ftpmaster.internal/ubuntu noble/main ppc64el po-debconf all 1.0.21+nmu1 [233 kB] 447s Get:47 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el debhelper all 13.14.1ubuntu5 [869 kB] 447s Get:48 http://ftpmaster.internal/ubuntu noble/main ppc64el golang-1.22-src all 1.22.1-1 [19.7 MB] 448s Get:49 http://ftpmaster.internal/ubuntu noble/main ppc64el golang-1.22-go ppc64el 1.22.1-1 [23.5 MB] 449s Get:50 http://ftpmaster.internal/ubuntu noble/universe ppc64el golang-golang-x-sys-dev all 0.17.0-1 [424 kB] 449s Get:51 http://ftpmaster.internal/ubuntu noble/universe ppc64el golang-golang-x-term-dev all 0.17.0-1 [14.7 kB] 449s Get:52 http://ftpmaster.internal/ubuntu noble/universe ppc64el golang-golang-x-text-dev all 0.14.0-2 [4641 kB] 449s Get:53 http://ftpmaster.internal/ubuntu noble/universe ppc64el golang-golang-x-crypto-dev all 1:0.19.0-1 [1712 kB] 449s Get:54 http://ftpmaster.internal/ubuntu noble/universe ppc64el golang-golang-x-net-dev all 1:0.21.0+dfsg-1 [918 kB] 449s Get:55 http://ftpmaster.internal/ubuntu noble/main ppc64el libpkgconf3 ppc64el 1.8.1-2 [36.9 kB] 449s Get:56 http://ftpmaster.internal/ubuntu noble/main ppc64el pkgconf-bin ppc64el 1.8.1-2 [22.0 kB] 449s Get:57 http://ftpmaster.internal/ubuntu noble/main ppc64el pkgconf ppc64el 1.8.1-2 [16.7 kB] 449s Get:58 http://ftpmaster.internal/ubuntu noble/main ppc64el xml-core all 0.19 [20.3 kB] 449s Get:59 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libdbus-1-dev ppc64el 1.14.10-4ubuntu2 [242 kB] 449s Get:60 http://ftpmaster.internal/ubuntu noble/main ppc64el libnl-3-dev ppc64el 3.7.0-0.3 [130 kB] 449s Get:61 http://ftpmaster.internal/ubuntu noble/main ppc64el libnl-route-3-dev ppc64el 3.7.0-0.3 [258 kB] 449s Get:62 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libibverbs-dev ppc64el 50.0-2build1 [744 kB] 449s Get:63 http://ftpmaster.internal/ubuntu noble-proposed/main ppc64el libpcap0.8-dev ppc64el 1.10.4-4.1ubuntu2 [293 kB] 449s Get:64 http://ftpmaster.internal/ubuntu noble-proposed/universe ppc64el golang-github-google-gopacket-dev all 1.1.19-4build1 [667 kB] 449s Get:65 http://ftpmaster.internal/ubuntu noble/main ppc64el golang-src all 2:1.22~2 [4992 B] 449s Get:66 http://ftpmaster.internal/ubuntu noble/main ppc64el golang-go ppc64el 2:1.22~2 [43.9 kB] 449s Get:67 http://ftpmaster.internal/ubuntu noble/main ppc64el dh-golang all 1.62 [25.2 kB] 449s Fetched 116 MB in 7s (15.8 MB/s) 449s dpkg: libpcap0.8:ppc64el: dependency problems, but removing anyway as you requested: 449s tcpdump depends on libpcap0.8 (>= 1.9.1). 449s 449s (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 ... 111945 files and directories currently installed.) 449s Removing libpcap0.8:ppc64el (1.10.4-4ubuntu3) ... 449s Selecting previously unselected package libpcap0.8t64:ppc64el. 449s (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 ... 111934 files and directories currently installed.) 449s Preparing to unpack .../00-libpcap0.8t64_1.10.4-4.1ubuntu2_ppc64el.deb ... 449s Unpacking libpcap0.8t64:ppc64el (1.10.4-4.1ubuntu2) ... 450s Selecting previously unselected package sgml-base. 450s Preparing to unpack .../01-sgml-base_1.31_all.deb ... 450s Unpacking sgml-base (1.31) ... 450s Selecting previously unselected package m4. 450s Preparing to unpack .../02-m4_1.4.19-4_ppc64el.deb ... 450s Unpacking m4 (1.4.19-4) ... 450s Selecting previously unselected package autoconf. 450s Preparing to unpack .../03-autoconf_2.71-3_all.deb ... 450s Unpacking autoconf (2.71-3) ... 450s Selecting previously unselected package autotools-dev. 450s Preparing to unpack .../04-autotools-dev_20220109.1_all.deb ... 450s Unpacking autotools-dev (20220109.1) ... 450s Selecting previously unselected package automake. 450s Preparing to unpack .../05-automake_1%3a1.16.5-1.3ubuntu1_all.deb ... 450s Unpacking automake (1:1.16.5-1.3ubuntu1) ... 450s Selecting previously unselected package autopoint. 450s Preparing to unpack .../06-autopoint_0.21-14ubuntu1_all.deb ... 450s Unpacking autopoint (0.21-14ubuntu1) ... 450s Selecting previously unselected package libisl23:ppc64el. 450s Preparing to unpack .../07-libisl23_0.26-3_ppc64el.deb ... 450s Unpacking libisl23:ppc64el (0.26-3) ... 450s Selecting previously unselected package libmpc3:ppc64el. 450s Preparing to unpack .../08-libmpc3_1.3.1-1_ppc64el.deb ... 450s Unpacking libmpc3:ppc64el (1.3.1-1) ... 450s Selecting previously unselected package cpp-13-powerpc64le-linux-gnu. 450s Preparing to unpack .../09-cpp-13-powerpc64le-linux-gnu_13.2.0-21ubuntu1_ppc64el.deb ... 450s Unpacking cpp-13-powerpc64le-linux-gnu (13.2.0-21ubuntu1) ... 450s Selecting previously unselected package cpp-13. 450s Preparing to unpack .../10-cpp-13_13.2.0-21ubuntu1_ppc64el.deb ... 450s Unpacking cpp-13 (13.2.0-21ubuntu1) ... 450s Selecting previously unselected package cpp-powerpc64le-linux-gnu. 450s Preparing to unpack .../11-cpp-powerpc64le-linux-gnu_4%3a13.2.0-7ubuntu1_ppc64el.deb ... 450s Unpacking cpp-powerpc64le-linux-gnu (4:13.2.0-7ubuntu1) ... 450s Selecting previously unselected package cpp. 450s Preparing to unpack .../12-cpp_4%3a13.2.0-7ubuntu1_ppc64el.deb ... 450s Unpacking cpp (4:13.2.0-7ubuntu1) ... 450s Selecting previously unselected package libcc1-0:ppc64el. 450s Preparing to unpack .../13-libcc1-0_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libcc1-0:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libgomp1:ppc64el. 450s Preparing to unpack .../14-libgomp1_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libgomp1:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libitm1:ppc64el. 450s Preparing to unpack .../15-libitm1_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libitm1:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libatomic1:ppc64el. 450s Preparing to unpack .../16-libatomic1_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libatomic1:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libasan8:ppc64el. 450s Preparing to unpack .../17-libasan8_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libasan8:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package liblsan0:ppc64el. 450s Preparing to unpack .../18-liblsan0_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking liblsan0:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libtsan2:ppc64el. 450s Preparing to unpack .../19-libtsan2_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libtsan2:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libubsan1:ppc64el. 450s Preparing to unpack .../20-libubsan1_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libubsan1:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libquadmath0:ppc64el. 450s Preparing to unpack .../21-libquadmath0_14-20240315-1ubuntu1_ppc64el.deb ... 450s Unpacking libquadmath0:ppc64el (14-20240315-1ubuntu1) ... 450s Selecting previously unselected package libgcc-13-dev:ppc64el. 450s Preparing to unpack .../22-libgcc-13-dev_13.2.0-21ubuntu1_ppc64el.deb ... 450s Unpacking libgcc-13-dev:ppc64el (13.2.0-21ubuntu1) ... 450s Selecting previously unselected package gcc-13-powerpc64le-linux-gnu. 450s Preparing to unpack .../23-gcc-13-powerpc64le-linux-gnu_13.2.0-21ubuntu1_ppc64el.deb ... 450s Unpacking gcc-13-powerpc64le-linux-gnu (13.2.0-21ubuntu1) ... 451s Selecting previously unselected package gcc-13. 451s Preparing to unpack .../24-gcc-13_13.2.0-21ubuntu1_ppc64el.deb ... 451s Unpacking gcc-13 (13.2.0-21ubuntu1) ... 451s Selecting previously unselected package gcc-powerpc64le-linux-gnu. 451s Preparing to unpack .../25-gcc-powerpc64le-linux-gnu_4%3a13.2.0-7ubuntu1_ppc64el.deb ... 451s Unpacking gcc-powerpc64le-linux-gnu (4:13.2.0-7ubuntu1) ... 451s Selecting previously unselected package gcc. 451s Preparing to unpack .../26-gcc_4%3a13.2.0-7ubuntu1_ppc64el.deb ... 451s Unpacking gcc (4:13.2.0-7ubuntu1) ... 451s Selecting previously unselected package libstdc++-13-dev:ppc64el. 451s Preparing to unpack .../27-libstdc++-13-dev_13.2.0-21ubuntu1_ppc64el.deb ... 451s Unpacking libstdc++-13-dev:ppc64el (13.2.0-21ubuntu1) ... 451s Selecting previously unselected package g++-13-powerpc64le-linux-gnu. 451s Preparing to unpack .../28-g++-13-powerpc64le-linux-gnu_13.2.0-21ubuntu1_ppc64el.deb ... 451s Unpacking g++-13-powerpc64le-linux-gnu (13.2.0-21ubuntu1) ... 452s Selecting previously unselected package g++-13. 452s Preparing to unpack .../29-g++-13_13.2.0-21ubuntu1_ppc64el.deb ... 452s Unpacking g++-13 (13.2.0-21ubuntu1) ... 452s Selecting previously unselected package g++-powerpc64le-linux-gnu. 452s Preparing to unpack .../30-g++-powerpc64le-linux-gnu_4%3a13.2.0-7ubuntu1_ppc64el.deb ... 452s Unpacking g++-powerpc64le-linux-gnu (4:13.2.0-7ubuntu1) ... 452s Selecting previously unselected package g++. 452s Preparing to unpack .../31-g++_4%3a13.2.0-7ubuntu1_ppc64el.deb ... 452s Unpacking g++ (4:13.2.0-7ubuntu1) ... 452s Selecting previously unselected package build-essential. 452s Preparing to unpack .../32-build-essential_12.10ubuntu1_ppc64el.deb ... 452s Unpacking build-essential (12.10ubuntu1) ... 452s Selecting previously unselected package libdebhelper-perl. 452s Preparing to unpack .../33-libdebhelper-perl_13.14.1ubuntu5_all.deb ... 452s Unpacking libdebhelper-perl (13.14.1ubuntu5) ... 452s Selecting previously unselected package libtool. 452s Preparing to unpack .../34-libtool_2.4.7-7_all.deb ... 452s Unpacking libtool (2.4.7-7) ... 452s Selecting previously unselected package dh-autoreconf. 452s Preparing to unpack .../35-dh-autoreconf_20_all.deb ... 452s Unpacking dh-autoreconf (20) ... 452s Selecting previously unselected package libarchive-zip-perl. 452s Preparing to unpack .../36-libarchive-zip-perl_1.68-1_all.deb ... 452s Unpacking libarchive-zip-perl (1.68-1) ... 452s Selecting previously unselected package libsub-override-perl. 452s Preparing to unpack .../37-libsub-override-perl_0.10-1_all.deb ... 452s Unpacking libsub-override-perl (0.10-1) ... 452s Selecting previously unselected package libfile-stripnondeterminism-perl. 452s Preparing to unpack .../38-libfile-stripnondeterminism-perl_1.13.1-1_all.deb ... 452s Unpacking libfile-stripnondeterminism-perl (1.13.1-1) ... 452s Selecting previously unselected package dh-strip-nondeterminism. 452s Preparing to unpack .../39-dh-strip-nondeterminism_1.13.1-1_all.deb ... 452s Unpacking dh-strip-nondeterminism (1.13.1-1) ... 452s Selecting previously unselected package debugedit. 452s Preparing to unpack .../40-debugedit_1%3a5.0-5build1_ppc64el.deb ... 452s Unpacking debugedit (1:5.0-5build1) ... 452s Selecting previously unselected package dwz. 452s Preparing to unpack .../41-dwz_0.15-1build5_ppc64el.deb ... 452s Unpacking dwz (0.15-1build5) ... 452s Selecting previously unselected package gettext. 452s Preparing to unpack .../42-gettext_0.21-14ubuntu1_ppc64el.deb ... 452s Unpacking gettext (0.21-14ubuntu1) ... 452s Selecting previously unselected package intltool-debian. 452s Preparing to unpack .../43-intltool-debian_0.35.0+20060710.6_all.deb ... 452s Unpacking intltool-debian (0.35.0+20060710.6) ... 452s Selecting previously unselected package po-debconf. 452s Preparing to unpack .../44-po-debconf_1.0.21+nmu1_all.deb ... 452s Unpacking po-debconf (1.0.21+nmu1) ... 452s Selecting previously unselected package debhelper. 452s Preparing to unpack .../45-debhelper_13.14.1ubuntu5_all.deb ... 452s Unpacking debhelper (13.14.1ubuntu5) ... 452s Selecting previously unselected package golang-1.22-src. 452s Preparing to unpack .../46-golang-1.22-src_1.22.1-1_all.deb ... 452s Unpacking golang-1.22-src (1.22.1-1) ... 455s Selecting previously unselected package golang-1.22-go. 455s Preparing to unpack .../47-golang-1.22-go_1.22.1-1_ppc64el.deb ... 455s Unpacking golang-1.22-go (1.22.1-1) ... 455s Selecting previously unselected package golang-golang-x-sys-dev. 455s Preparing to unpack .../48-golang-golang-x-sys-dev_0.17.0-1_all.deb ... 455s Unpacking golang-golang-x-sys-dev (0.17.0-1) ... 455s Selecting previously unselected package golang-golang-x-term-dev. 455s Preparing to unpack .../49-golang-golang-x-term-dev_0.17.0-1_all.deb ... 455s Unpacking golang-golang-x-term-dev (0.17.0-1) ... 455s Selecting previously unselected package golang-golang-x-text-dev. 455s Preparing to unpack .../50-golang-golang-x-text-dev_0.14.0-2_all.deb ... 455s Unpacking golang-golang-x-text-dev (0.14.0-2) ... 456s Selecting previously unselected package golang-golang-x-crypto-dev. 456s Preparing to unpack .../51-golang-golang-x-crypto-dev_1%3a0.19.0-1_all.deb ... 456s Unpacking golang-golang-x-crypto-dev (1:0.19.0-1) ... 456s Selecting previously unselected package golang-golang-x-net-dev. 456s Preparing to unpack .../52-golang-golang-x-net-dev_1%3a0.21.0+dfsg-1_all.deb ... 456s Unpacking golang-golang-x-net-dev (1:0.21.0+dfsg-1) ... 456s Selecting previously unselected package libpkgconf3:ppc64el. 456s Preparing to unpack .../53-libpkgconf3_1.8.1-2_ppc64el.deb ... 456s Unpacking libpkgconf3:ppc64el (1.8.1-2) ... 456s Selecting previously unselected package pkgconf-bin. 456s Preparing to unpack .../54-pkgconf-bin_1.8.1-2_ppc64el.deb ... 456s Unpacking pkgconf-bin (1.8.1-2) ... 456s Selecting previously unselected package pkgconf:ppc64el. 456s Preparing to unpack .../55-pkgconf_1.8.1-2_ppc64el.deb ... 456s Unpacking pkgconf:ppc64el (1.8.1-2) ... 456s Selecting previously unselected package xml-core. 456s Preparing to unpack .../56-xml-core_0.19_all.deb ... 456s Unpacking xml-core (0.19) ... 456s Selecting previously unselected package libdbus-1-dev:ppc64el. 456s Preparing to unpack .../57-libdbus-1-dev_1.14.10-4ubuntu2_ppc64el.deb ... 456s Unpacking libdbus-1-dev:ppc64el (1.14.10-4ubuntu2) ... 456s Selecting previously unselected package libnl-3-dev:ppc64el. 456s Preparing to unpack .../58-libnl-3-dev_3.7.0-0.3_ppc64el.deb ... 456s Unpacking libnl-3-dev:ppc64el (3.7.0-0.3) ... 456s Selecting previously unselected package libnl-route-3-dev:ppc64el. 456s Preparing to unpack .../59-libnl-route-3-dev_3.7.0-0.3_ppc64el.deb ... 456s Unpacking libnl-route-3-dev:ppc64el (3.7.0-0.3) ... 456s Selecting previously unselected package libibverbs-dev:ppc64el. 456s Preparing to unpack .../60-libibverbs-dev_50.0-2build1_ppc64el.deb ... 456s Unpacking libibverbs-dev:ppc64el (50.0-2build1) ... 456s Selecting previously unselected package libpcap0.8-dev:ppc64el. 456s Preparing to unpack .../61-libpcap0.8-dev_1.10.4-4.1ubuntu2_ppc64el.deb ... 456s Unpacking libpcap0.8-dev:ppc64el (1.10.4-4.1ubuntu2) ... 456s Selecting previously unselected package golang-github-google-gopacket-dev. 456s Preparing to unpack .../62-golang-github-google-gopacket-dev_1.1.19-4build1_all.deb ... 456s Unpacking golang-github-google-gopacket-dev (1.1.19-4build1) ... 456s Selecting previously unselected package golang-src. 456s Preparing to unpack .../63-golang-src_2%3a1.22~2_all.deb ... 456s Unpacking golang-src (2:1.22~2) ... 456s Selecting previously unselected package golang-go:ppc64el. 456s Preparing to unpack .../64-golang-go_2%3a1.22~2_ppc64el.deb ... 456s Unpacking golang-go:ppc64el (2:1.22~2) ... 456s Selecting previously unselected package dh-golang. 456s Preparing to unpack .../65-dh-golang_1.62_all.deb ... 456s Unpacking dh-golang (1.62) ... 456s Selecting previously unselected package autopkgtest-satdep. 456s Preparing to unpack .../66-1-autopkgtest-satdep.deb ... 456s Unpacking autopkgtest-satdep (0) ... 456s Setting up libarchive-zip-perl (1.68-1) ... 456s Setting up libdebhelper-perl (13.14.1ubuntu5) ... 456s Setting up golang-golang-x-sys-dev (0.17.0-1) ... 456s Setting up m4 (1.4.19-4) ... 456s Setting up golang-golang-x-term-dev (0.17.0-1) ... 456s Setting up libgomp1:ppc64el (14-20240315-1ubuntu1) ... 456s Setting up autotools-dev (20220109.1) ... 456s Setting up libpkgconf3:ppc64el (1.8.1-2) ... 456s Setting up golang-1.22-src (1.22.1-1) ... 456s Setting up libquadmath0:ppc64el (14-20240315-1ubuntu1) ... 456s Setting up libmpc3:ppc64el (1.3.1-1) ... 457s Setting up libatomic1:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up autopoint (0.21-14ubuntu1) ... 457s Setting up pkgconf-bin (1.8.1-2) ... 457s Setting up autoconf (2.71-3) ... 457s Setting up libubsan1:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up dwz (0.15-1build5) ... 457s Setting up libnl-3-dev:ppc64el (3.7.0-0.3) ... 457s Setting up golang-golang-x-text-dev (0.14.0-2) ... 457s Setting up libasan8:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up debugedit (1:5.0-5build1) ... 457s Setting up libsub-override-perl (0.10-1) ... 457s Setting up libpcap0.8t64:ppc64el (1.10.4-4.1ubuntu2) ... 457s Setting up sgml-base (1.31) ... 457s Setting up golang-golang-x-crypto-dev (1:0.19.0-1) ... 457s Setting up libtsan2:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up libisl23:ppc64el (0.26-3) ... 457s Setting up cpp-13-powerpc64le-linux-gnu (13.2.0-21ubuntu1) ... 457s Setting up golang-src (2:1.22~2) ... 457s Setting up libcc1-0:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up liblsan0:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up libitm1:ppc64el (14-20240315-1ubuntu1) ... 457s Setting up cpp-powerpc64le-linux-gnu (4:13.2.0-7ubuntu1) ... 457s Setting up automake (1:1.16.5-1.3ubuntu1) ... 457s update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode 457s Setting up libfile-stripnondeterminism-perl (1.13.1-1) ... 457s Setting up gettext (0.21-14ubuntu1) ... 457s Setting up cpp-13 (13.2.0-21ubuntu1) ... 457s Setting up golang-1.22-go (1.22.1-1) ... 457s Setting up pkgconf:ppc64el (1.8.1-2) ... 457s Setting up intltool-debian (0.35.0+20060710.6) ... 457s Setting up libnl-route-3-dev:ppc64el (3.7.0-0.3) ... 457s Setting up golang-golang-x-net-dev (1:0.21.0+dfsg-1) ... 457s Setting up dh-strip-nondeterminism (1.13.1-1) ... 457s Setting up libgcc-13-dev:ppc64el (13.2.0-21ubuntu1) ... 457s Setting up cpp (4:13.2.0-7ubuntu1) ... 457s Setting up xml-core (0.19) ... 457s Setting up libstdc++-13-dev:ppc64el (13.2.0-21ubuntu1) ... 457s Setting up golang-go:ppc64el (2:1.22~2) ... 457s Setting up po-debconf (1.0.21+nmu1) ... 457s Setting up libibverbs-dev:ppc64el (50.0-2build1) ... 457s Setting up gcc-13-powerpc64le-linux-gnu (13.2.0-21ubuntu1) ... 457s Setting up gcc-13 (13.2.0-21ubuntu1) ... 457s Setting up libtool (2.4.7-7) ... 457s Setting up g++-13-powerpc64le-linux-gnu (13.2.0-21ubuntu1) ... 457s Setting up dh-autoreconf (20) ... 457s Setting up gcc-powerpc64le-linux-gnu (4:13.2.0-7ubuntu1) ... 457s Setting up g++-powerpc64le-linux-gnu (4:13.2.0-7ubuntu1) ... 457s Setting up g++-13 (13.2.0-21ubuntu1) ... 457s Setting up debhelper (13.14.1ubuntu5) ... 457s Setting up gcc (4:13.2.0-7ubuntu1) ... 457s Setting up g++ (4:13.2.0-7ubuntu1) ... 457s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 457s Setting up build-essential (12.10ubuntu1) ... 457s Setting up dh-golang (1.62) ... 457s Processing triggers for libc-bin (2.39-0ubuntu6) ... 457s Processing triggers for man-db (2.12.0-3build4) ... 459s Processing triggers for install-info (7.1-3build1) ... 459s Processing triggers for sgml-base (1.31) ... 459s Setting up libdbus-1-dev:ppc64el (1.14.10-4ubuntu2) ... 459s Setting up libpcap0.8-dev:ppc64el (1.10.4-4.1ubuntu2) ... 459s Setting up golang-github-google-gopacket-dev (1.1.19-4build1) ... 459s Setting up autopkgtest-satdep (0) ... 462s (Reading database ... 131793 files and directories currently installed.) 462s Removing autopkgtest-satdep (0) ... 463s autopkgtest [23:35:06]: test dh-golang-autopkgtest: /usr/bin/dh_golang_autopkgtest 463s autopkgtest [23:35:06]: test dh-golang-autopkgtest: [----------------------- 463s [info] Testing github.com/google/gopacket... 463s [info] Source code installed by binary package, overriding dh_auto_configure... 463s -e: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 463s dh build --buildsystem=golang 464s dh_update_autotools_config -O--buildsystem=golang 464s dh_autoreconf -O--buildsystem=golang 464s debian/rules override_dh_auto_configure 464s make[1]: Entering directory '/tmp/autopkgtest.i5Qbyb/autopkgtest_tmp' 464s -e: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 464s mkdir -p "obj-powerpc64le-linux-gnu" 464s # remove existing symlinks, since "cp -a" won't convert them 464s find "obj-powerpc64le-linux-gnu" -type l -exec rm "{}" \; 464s cp -a /usr/share/gocode/src "obj-powerpc64le-linux-gnu" 464s make[1]: Leaving directory '/tmp/autopkgtest.i5Qbyb/autopkgtest_tmp' 464s dh_auto_build -O--buildsystem=golang 464s dh_auto_build: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 464s cd obj-powerpc64le-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 465s internal/goarch 465s internal/abi 465s internal/unsafeheader 465s internal/cpu 465s internal/bytealg 465s internal/chacha8rand 465s internal/coverage/rtcov 465s internal/godebugs 465s internal/goexperiment 465s internal/goos 465s runtime/internal/atomic 465s runtime/internal/math 465s runtime/internal/sys 465s runtime/internal/syscall 465s runtime 470s internal/reflectlite 470s errors 470s internal/race 470s sync/atomic 470s sync 471s io 471s unicode 471s unicode/utf8 471s bytes 471s internal/itoa 471s math/bits 471s math 471s strconv 471s reflect 472s cmp 473s slices 473s sort 473s internal/fmtsort 473s internal/oserror 473s syscall 473s internal/syscall/unix 473s time 474s internal/poll 474s internal/safefilepath 474s internal/syscall/execenv 474s internal/testlog 474s path 474s io/fs 474s os 474s fmt 475s strings 475s encoding/hex 475s context 475s vendor/golang.org/x/net/dns/dnsmessage 475s internal/bisect 475s internal/godebug 476s internal/nettrace 476s internal/singleflight 476s internal/intern 476s net/netip 476s runtime/cgo 477s net 479s runtime/debug 479s github.com/google/gopacket 479s encoding/binary 479s golang.org/x/net/bpf 480s golang.org/x/sys/unix 481s github.com/google/gopacket/afpacket 481s github.com/google/gopacket/bytediff 481s hash 481s hash/crc32 481s github.com/google/gopacket/layers 484s github.com/google/gopacket/defrag/lcmdefrag 484s encoding 484s flag 485s container/list 485s log/internal 485s log 485s github.com/google/gopacket/ip4defrag 485s github.com/google/gopacket/dumpcommand 485s github.com/google/gopacket/macs 486s github.com/google/gopacket/pcap 488s bufio 488s compress/flate 488s compress/gzip 488s github.com/google/gopacket/pcapgo 488s github.com/google/gopacket/reassembly 488s github.com/google/gopacket/routing 488s github.com/google/gopacket/tcpassembly 488s github.com/google/gopacket/tcpassembly/tcpreader 488s dh_auto_test -O--buildsystem=golang 489s dh_auto_test: warning: LTO optimize is enable in buildflags. But cgo doesn't support it. LTO flags will be stripped in cgo. 489s cd obj-powerpc64le-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 508s === RUN TestDumpEmbedded 508s --- PASS: TestDumpEmbedded (0.00s) 508s === RUN TestConcatPacketSources 508s --- PASS: TestConcatPacketSources (0.00s) 508s === RUN TestToDuration 508s --- PASS: TestToDuration (0.00s) 508s === RUN TestExponentialSizeIncreasePrepend 508s --- PASS: TestExponentialSizeIncreasePrepend (0.00s) 508s === RUN TestExponentialSizeIncreaseAppend 508s --- PASS: TestExponentialSizeIncreaseAppend (0.00s) 508s === RUN ExampleSerializeBuffer 508s --- PASS: ExampleSerializeBuffer (0.00s) 508s PASS 508s ok github.com/google/gopacket 0.002s 511s === RUN TestParseOptions 511s 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:""} 511s err: block size 2 must be divisible by page size 65536 511s 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:""} 511s err: block size 524288 must be divisible by frame size 333 511s 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:""} 511s err: tpacket version InvalidVersion is invalid 511s 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:""} 511s err: tpacket version InvalidVersion is invalid 511s 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:""} 511s err: 511s --- PASS: TestParseOptions (0.00s) 511s PASS 511s ok github.com/google/gopacket/afpacket 0.004s 511s === RUN TestLCS 511s --- PASS: TestLCS (0.00s) 511s === RUN TestDiff 511s --- PASS: TestDiff (0.00s) 511s PASS 511s ok github.com/google/gopacket/bytediff 0.002s 514s === RUN TestOrderedLCMDefrag 514s --- PASS: TestOrderedLCMDefrag (0.00s) 514s === RUN TestUnorderedLCMDefrag 514s --- PASS: TestUnorderedLCMDefrag (0.00s) 514s === RUN TestNonLCMDefrag 514s --- PASS: TestNonLCMDefrag (0.00s) 514s PASS 514s ok github.com/google/gopacket/defrag/lcmdefrag 0.004s 514s ? github.com/google/gopacket/dumpcommand [no test files] 515s === RUN TestNotFrag 515s --- PASS: TestNotFrag (0.00s) 515s === RUN TestDefragPingMultipleFrags 515s --- PASS: TestDefragPingMultipleFrags (0.00s) 515s === RUN TestDefragPing1 515s --- PASS: TestDefragPing1 (0.00s) 515s === RUN TestDefragPing1and2 515s --- PASS: TestDefragPing1and2 (0.00s) 515s === RUN TestDefragTooSmall 515s --- PASS: TestDefragTooSmall (0.00s) 515s === RUN TestDefragFragmentOffset 515s --- PASS: TestDefragFragmentOffset (0.00s) 515s === RUN TestDefragDiscard 515s --- PASS: TestDefragDiscard (0.00s) 515s === RUN TestDefragMaxSize 515s --- PASS: TestDefragMaxSize (0.00s) 515s === RUN TestDefragIDField 515s --- PASS: TestDefragIDField (0.00s) 515s PASS 515s ok github.com/google/gopacket/ip4defrag 0.004s 520s === RUN TestASFPresencePongDecodeFromBytes 520s --- PASS: TestASFPresencePongDecodeFromBytes (0.00s) 520s === RUN TestASFPresencePongSupportsDCMI 520s --- PASS: TestASFPresencePongSupportsDCMI (0.00s) 520s === RUN TestASFPresencePongSerializeTo 520s --- PASS: TestASFPresencePongSerializeTo (0.00s) 520s === RUN TestASFDecodeFromBytes 520s --- PASS: TestASFDecodeFromBytes (0.00s) 520s === RUN TestASFSerializeTo 520s --- PASS: TestASFSerializeTo (0.00s) 520s === RUN TestBFDNoAuth 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 57 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 37 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 24 bytes 520s base_test.go:21: Got layer BFD, 24 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 71 bytes, truncated 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..24..] SrcPort=49152 DstPort=3784(bfd-control) Length=32 Checksum=29233} 520s - 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} 520s 520s --- PASS: TestBFDNoAuth (0.00s) 520s === RUN TestBFDAuthTypePassword 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 65 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 41 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 33 bytes 520s base_test.go:21: Got layer BFD, 33 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 79 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..33..] SrcPort=49152 DstPort=3784(bfd-control) Length=41 Checksum=29233} 520s - 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..]}} 520s 520s --- PASS: TestBFDAuthTypePassword (0.00s) 520s === RUN TestBFDAuthTypeKeyedMD5 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 80 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 520s base_test.go:21: Got layer BFD, 48 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 94 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=1024 DstPort=3784(bfd-control) Length=56 Checksum=27340} 520s - 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..]}} 520s 520s --- PASS: TestBFDAuthTypeKeyedMD5 (0.00s) 520s === RUN TestBFDAuthTypeMeticulousKeyedSHA1 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP BFD] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 60 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 52 bytes 520s base_test.go:21: Got layer BFD, 52 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 98 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..52..] SrcPort=1024 DstPort=3784(bfd-control) Length=60 Checksum=14218} 520s - 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..]}} 520s 520s --- PASS: TestBFDAuthTypeMeticulousKeyedSHA1 (0.00s) 520s === RUN TestFlowMapKey 520s --- PASS: TestFlowMapKey (0.00s) 520s === RUN TestDecodeSimpleTCPPacket 520s --- PASS: TestDecodeSimpleTCPPacket (0.00s) 520s === RUN TestDecodeSmallTCPPacketHasEmptyPayload 520s --- PASS: TestDecodeSmallTCPPacketHasEmptyPayload (0.00s) 520s === RUN TestDecodeVLANPacket 520s 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} 520s 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} 520s 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)} 520s 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)}} 520s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 TCP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 50 bytes 520s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 46 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 20 bytes 520s base_test.go:21: Got layer TCP, 20 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 64 bytes 520s - 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} 520s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 247, 8, 0] Payload=[..46..] Priority=0 DropEligible=false VLANIdentifier=503 Type=IPv4} 520s - 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=[]} 520s - 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=[]} 520s 520s --- PASS: TestDecodeVLANPacket (0.00s) 520s === RUN TestDecodeSCTPPackets 520s --- PASS: TestDecodeSCTPPackets (0.00s) 520s === RUN TestDecodeCiscoDiscovery 520s base_test.go:19: Checking packet layers, want [Ethernet LLC SNAP CiscoDiscovery CiscoDiscoveryInfo] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 451 bytes 520s base_test.go:21: Got layer LLC, 3 bytes, payload of 448 bytes 520s base_test.go:21: Got layer SNAP, 5 bytes, payload of 443 bytes 520s base_test.go:21: Got layer CiscoDiscovery, 4 bytes, payload of 439 bytes 520s base_test.go:21: Got layer CiscoDiscoveryInfo, 439 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 465 bytes 520s - 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} 520s - Layer 2 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..448..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 520s - Layer 3 (05 bytes) = SNAP {Contents=[..5..] Payload=[..443..] OrganizationalCode=[0, 0, 12] Type=CiscoDiscovery} 520s - Layer 4 (04 bytes) = CiscoDiscovery {Contents=[2, 180, 9, 160] Payload=[..439..] Version=2 TTL=180 Checksum=2464 Values=[..13..]} 520s - 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 520s IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA14, RELEASE SOFTWARE (fc1) 520s Technical Support: http://www.cisco.com/techsupport 520s Copyright (c) 1986-2010 by cisco Systems, Inc. 520s 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=[]} 520s 520s --- PASS: TestDecodeCiscoDiscovery (0.00s) 520s === RUN TestDecodeLinkLayerDiscovery 520s base_test.go:19: Checking packet layers, want [Ethernet LinkLayerDiscovery LinkLayerDiscoveryInfo] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 249 bytes 520s base_test.go:21: Got layer LinkLayerDiscovery, 249 bytes, payload of 0 bytes 520s base_test.go:21: Got layer LinkLayerDiscoveryInfo, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 263 bytes 520s - 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} 520s - 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..]} 520s - Layer 3 (00 bytes) = LinkLayerDiscoveryInfo {Contents=[] Payload=[] PortDescription=Summit300-48-Port 1001 520s base_test.go:19: Checking packet layers, want [Ethernet LinkLayerDiscovery LinkLayerDiscoveryInfo] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 254 bytes 520s base_test.go:21: Got layer LinkLayerDiscovery, 254 bytes, payload of 0 bytes 520s base_test.go:21: Got layer LinkLayerDiscoveryInfo, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 268 bytes 520s - 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} 520s - Layer 2 (254 bytes) = LinkLayerDiscovery {Contents=[..254..] Payload=[] ChassisID={ Subtype=MAC Address ID=[..6..]} PortID={ Subtype=Local ID=[49]} TTL=120 Values=[..10..]} 520s - 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=[]} 520s 520s --- PASS: TestDecodeLinkLayerDiscovery (0.00s) 520s === RUN TestDecodeNortelDiscovery 520s base_test.go:19: Checking packet layers, want [Ethernet LLC SNAP NortelDiscovery] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 19 bytes 520s base_test.go:21: Got layer LLC, 3 bytes, payload of 16 bytes 520s base_test.go:21: Got layer SNAP, 5 bytes, payload of 11 bytes 520s base_test.go:21: Got layer NortelDiscovery, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - Layer 2 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..16..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 520s - Layer 3 (05 bytes) = SNAP {Contents=[..5..] Payload=[..11..] OrganizationalCode=[0, 0, 129] Type=NortelDiscovery} 520s - 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} 520s 520s --- PASS: TestDecodeNortelDiscovery (0.00s) 520s === RUN TestDecodeIPv6Jumbogram 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop TCP Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 70040 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 70000 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 69992 bytes 520s base_test.go:21: Got layer TCP, 20 bytes, payload of 69972 bytes 520s base_test.go:21: Got layer Payload, 69972 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 70054 bytes 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - 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=[]} 520s - Layer 5 (69972 bytes) = Payload 69972 byte(s) 520s 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop TCP Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 70039 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 69999 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 69991 bytes 520s base_test.go:21: Got layer TCP, 20 bytes, payload of 69971 bytes 520s base_test.go:21: Got layer Payload, 69971 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 70053 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - 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=[]} 520s - Layer 5 (69971 bytes) = Payload 69971 byte(s) 520s 520s --- PASS: TestDecodeIPv6Jumbogram (0.00s) 520s === RUN TestDecodeUDPPacketTooSmall 520s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 UDP Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 52 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 32 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 24 bytes 520s base_test.go:21: Got layer Payload, 24 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 70 bytes, truncated 520s - 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} 520s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 247, 8, 0] Payload=[..52..] Priority=0 DropEligible=false VLANIdentifier=503 Type=IPv4} 520s - 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=[]} 520s - Layer 4 (08 bytes) = UDP {Contents=[..8..] Payload=[..24..] SrcPort=80(http) DstPort=80(http) Length=40 Checksum=19885} 520s - Layer 5 (24 bytes) = Payload 24 byte(s) 520s 520s --- PASS: TestDecodeUDPPacketTooSmall (0.00s) 520s === RUN TestDecodingLayerParserFullTCPPacket 520s --- PASS: TestDecodingLayerParserFullTCPPacket (0.00s) 520s === RUN TestDecodingLayerMap 520s --- PASS: TestDecodingLayerMap (0.00s) 520s === RUN TestDecodingLayerSparse 520s --- PASS: TestDecodingLayerSparse (0.00s) 520s === RUN TestDecodingLayerArray 520s --- PASS: TestDecodingLayerArray (0.00s) 520s === RUN TestICMP 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 28 bytes 520s base_test.go:21: Got layer Payload, 28 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 70 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..28..] TypeCode=DestinationUnreachable(CommAdminProhibited) Checksum=37998 Id=0 Seq=0} 520s - Layer 4 (28 bytes) = Payload 28 byte(s) 520s 520s --- PASS: TestICMP (0.00s) 520s === RUN TestICMP6 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 32 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 28 bytes 520s base_test.go:21: Got layer ICMPv6NeighborSolicitation, 28 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 86 bytes 520s - 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} 520s - 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} 520s - Layer 3 (04 bytes) = ICMPv6 {Contents=[135, 0, 30, 186] Payload=[..28..] TypeCode=NeighborSolicitation Checksum=7866 TypeBytes=[]} 520s - 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)]} 520s 520s --- PASS: TestICMP6 (0.00s) 520s === RUN TestMPLS 520s base_test.go:19: Checking packet layers, want [Ethernet MPLS IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 104 bytes 520s base_test.go:21: Got layer MPLS, 4 bytes, payload of 100 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 80 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 72 bytes 520s base_test.go:21: Got layer Payload, 72 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 118 bytes 520s - 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} 520s - Layer 2 (04 bytes) = MPLS {Contents=[0, 1, 209, 255] Payload=[..100..] Label=29 TrafficClass=0 StackBottom=true TTL=255} 520s - 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=[]} 520s - Layer 4 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=14966 Id=2618 Seq=1579} 520s - Layer 5 (72 bytes) = Payload 72 byte(s) 520s 520s --- PASS: TestMPLS (0.00s) 520s === RUN TestPPPGREIPv4IPv6VLAN 520s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv6 IPv4 GRE PPP IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 183 bytes 520s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 179 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 139 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 119 bytes 520s base_test.go:21: Got layer GRE, 16 bytes, payload of 103 bytes 520s base_test.go:21: Got layer PPP, 2 bytes, payload of 99 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 79 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 71 bytes 520s base_test.go:21: Got layer DNS, 71 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 197 bytes 520s - 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} 520s - Layer 2 (04 bytes) = Dot1Q {Contents=[0, 100, 134, 221] Payload=[..179..] Priority=0 DropEligible=false VLANIdentifier=100 Type=IPv6} 520s - 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} 520s - 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=[]} 520s - 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} 520s - Layer 6 (02 bytes) = PPP {Contents=[0, 33] Payload=[..99..] PPPType=IPv4 HasPPTPHeader=true} 520s - 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=[]} 520s - Layer 8 (08 bytes) = UDP {Contents=[..8..] Payload=[..71..] SrcPort=40768 DstPort=53(domain) Length=79 Checksum=64415} 520s - 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=[]} 520s 520s --- PASS: TestPPPGREIPv4IPv6VLAN (0.00s) 520s === RUN TestPPPoEICMPv6 520s base_test.go:19: Checking packet layers, want [Ethernet PPPoE PPP IPv6 ICMPv6 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 520s base_test.go:21: Got layer PPPoE, 6 bytes, payload of 66 bytes 520s base_test.go:21: Got layer PPP, 2 bytes, payload of 64 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 520s base_test.go:21: Got layer ICMPv6NeighborAdvertisement, 20 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 86 bytes 520s - 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} 520s - Layer 2 (06 bytes) = PPPoE {Contents=[..6..] Payload=[..66..] Version=1 Type=1 Code=PPP SessionId=17 Length=66} 520s - Layer 3 (02 bytes) = PPP {Contents=[0, 87] Payload=[..64..] PPPType=IPv6 HasPPTPHeader=false} 520s - 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} 520s - Layer 5 (04 bytes) = ICMPv6 {Contents=[136, 0, 80, 131] Payload=[..20..] TypeCode=NeighborAdvertisement Checksum=20611 TypeBytes=[]} 520s - Layer 6 (20 bytes) = ICMPv6NeighborAdvertisement {Contents=[..20..] Payload=[] Flags=128 TargetAddress=fe80::c801:eff:fe88:8 Options=[]} 520s 520s --- PASS: TestPPPoEICMPv6 (0.00s) 520s === RUN TestPFLogUDP 520s base_test.go:19: Checking packet layers, want [PFLog IPv4 UDP Payload] 520s base_test.go:21: Got layer PFLog, 64 bytes, payload of 44 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 24 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 16 bytes 520s base_test.go:21: Got layer Payload, 16 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 108 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..16..] SrcPort=61695 DstPort=8612(canon-bjnp2) Length=24 Checksum=10789} 520s - Layer 4 (16 bytes) = Payload 16 byte(s) 520s 520s --- PASS: TestPFLogUDP (0.00s) 520s === RUN TestRegressionDot1QPriority 520s --- PASS: TestRegressionDot1QPriority (0.00s) 520s === RUN TestPacketMPLSInMPLS 520s base_test.go:19: Checking packet layers, want [Ethernet MPLS MPLS IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 520s base_test.go:21: Got layer MPLS, 4 bytes, payload of 104 bytes 520s base_test.go:21: Got layer MPLS, 4 bytes, payload of 100 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 80 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 72 bytes 520s base_test.go:21: Got layer Payload, 72 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 122 bytes 520s - 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} 520s - Layer 2 (04 bytes) = MPLS {Contents=[0, 1, 32, 255] Payload=[..104..] Label=18 TrafficClass=0 StackBottom=false TTL=255} 520s - Layer 3 (04 bytes) = MPLS {Contents=[0, 1, 1, 255] Payload=[..100..] Label=16 TrafficClass=0 StackBottom=true TTL=255} 520s - 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=[]} 520s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=48401 Id=3941 Seq=4768} 520s - Layer 6 (72 bytes) = Payload 72 byte(s) 520s 520s --- PASS: TestPacketMPLSInMPLS (0.00s) 520s === RUN TestPacketIPv4Fragmented 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 Fragment] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 520s base_test.go:21: Got layer Fragment, 36 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 70 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (36 bytes) = Fragment 36 byte(s) 520s 520s --- PASS: TestPacketIPv4Fragmented (0.00s) 520s === RUN TestSCTPChunkBadLength 520s --- PASS: TestSCTPChunkBadLength (0.00s) 520s === RUN TestSTP 520s base_test.go:19: Checking packet layers, want [Ethernet LLC STP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 38 bytes 520s base_test.go:21: Got layer LLC, 3 bytes, payload of 35 bytes 520s base_test.go:21: Got layer STP, 35 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - Layer 2 (03 bytes) = LLC {Contents=[66, 66, 3] Payload=[..35..] DSAP=66 IG=false SSAP=66 CR=false Control=3} 520s - Layer 3 (35 bytes) = STP {Contents=[..35..] Payload=[]} 520s 520s --- PASS: TestSTP (0.00s) 520s === RUN TestDHCPv4EncodeRequest 520s --- PASS: TestDHCPv4EncodeRequest (0.00s) 520s === RUN TestDHCPv4EncodeResponse 520s --- PASS: TestDHCPv4EncodeResponse (0.00s) 520s === RUN TestDHCPv4DecodeOption 520s --- PASS: TestDHCPv4DecodeOption (0.00s) 520s === RUN TestDHCPv6EncodeRequest 520s --- PASS: TestDHCPv6EncodeRequest (0.00s) 520s === RUN TestDHCPv6EncodeReply 520s --- PASS: TestDHCPv6EncodeReply (0.00s) 520s === RUN TestPacketDNSRegression 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 68 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 48 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 40 bytes 520s base_test.go:21: Got layer DNS, 40 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 82 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..40..] SrcPort=57766 DstPort=53(domain) Length=48 Checksum=42391} 520s - 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=[]}]} 520s 520s --- PASS: TestPacketDNSRegression (0.00s) 520s === RUN TestParseDNSTypeTXT 520s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 520s base_test.go:21: Got layer Loopback, 4 bytes, payload of 115 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 95 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 87 bytes 520s base_test.go:21: Got layer DNS, 87 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 119 bytes 520s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..115..] Family=IPv4} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..87..] SrcPort=53(domain) DstPort=33202 Length=95 Checksum=56501} 520s - 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=[]}]} 520s 520s --- PASS: TestParseDNSTypeTXT (0.00s) 520s === RUN TestParseDNSBadVers 520s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 520s base_test.go:21: Got layer Loopback, 4 bytes, payload of 56 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 28 bytes 520s base_test.go:21: Got layer DNS, 28 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..56..] Family=IPv4} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..28..] SrcPort=53(domain) DstPort=64888 Length=36 Checksum=16577} 520s - 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=[]}]} 520s 520s --- PASS: TestParseDNSBadVers (0.00s) 520s === RUN TestParseDNSBadCookie 520s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 520s base_test.go:21: Got layer Loopback, 4 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer DNS, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 88 bytes 520s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..84..] Family=IPv4} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..56..] SrcPort=53(domain) DstPort=54954 Length=64 Checksum=65107} 520s - 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=[]}]} 520s 520s --- PASS: TestParseDNSBadCookie (0.00s) 520s === RUN TestParseDNSTypeURI 520s base_test.go:19: Checking packet layers, want [Loopback IPv4 UDP DNS] 520s base_test.go:21: Got layer Loopback, 4 bytes, payload of 111 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 91 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 83 bytes 520s base_test.go:21: Got layer DNS, 83 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 115 bytes 520s - Layer 1 (04 bytes) = Loopback {Contents=[2, 0, 0, 0] Payload=[..111..] Family=IPv4} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..83..] SrcPort=53(domain) DstPort=59347 Length=91 Checksum=65134} 520s - 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=[]}]} 520s 520s --- PASS: TestParseDNSTypeURI (0.00s) 520s === RUN TestParseDNSTypeOPT 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 88 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 68 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 60 bytes 520s base_test.go:21: Got layer DNS, 60 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 102 bytes, truncated 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..60..] SrcPort=54784 DstPort=53(domain) Length=70 Checksum=17584} 520s - 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=[]}]} 520s 520s --- PASS: TestParseDNSTypeOPT (0.00s) 520s === RUN TestDNSEncodeQuery 520s --- PASS: TestDNSEncodeQuery (0.00s) 520s === RUN TestDNSEncodeQueryWithOPT 520s --- PASS: TestDNSEncodeQueryWithOPT (0.00s) 520s === RUN TestDNSEncodeResponse 520s --- PASS: TestDNSEncodeResponse (0.00s) 520s === RUN TestDNSMalformedPacket 520s --- PASS: TestDNSMalformedPacket (0.00s) 520s === RUN TestDNSMalformedPacket2 520s --- PASS: TestDNSMalformedPacket2 (0.00s) 520s === RUN TestBlankNameRootQuery 520s --- PASS: TestBlankNameRootQuery (0.00s) 520s === RUN TestAnotherMalformedDNS 520s --- PASS: TestAnotherMalformedDNS (0.00s) 520s === RUN TestMalformedDNSAgain 520s --- PASS: TestMalformedDNSAgain (0.00s) 520s === RUN TestMalformedDNSOhGodMakeItStop 520s --- PASS: TestMalformedDNSOhGodMakeItStop (0.00s) 520s === RUN TestMalformedDNSOPT 520s --- PASS: TestMalformedDNSOPT (0.00s) 520s === RUN TestPacketDNSPanic7 520s --- PASS: TestPacketDNSPanic7 (0.00s) 520s === RUN TestDNSPacketWriteAnswer 520s 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=[]} 520s --- PASS: TestDNSPacketWriteAnswer (0.00s) 520s === RUN TestPacketDot11CtrlCTS 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 520s base_test.go:21: Got layer RadioTap, 25 bytes, payload of 14 bytes 520s base_test.go:21: Got layer Dot11, 10 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 39 bytes 520s - 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=} 520s - 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} 520s 520s --- PASS: TestPacketDot11CtrlCTS (0.00s) 520s === RUN TestPacketDot11MgmtBeacon 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11MgmtBeacon Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement Dot11InformationElement] 520s base_test.go:21: Got layer RadioTap, 18 bytes, payload of 221 bytes 520s base_test.go:21: Got layer Dot11, 24 bytes, payload of 193 bytes 520s base_test.go:21: Got layer Dot11MgmtBeacon, 193 bytes, payload of 181 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 5 bytes, payload of 176 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 10 bytes, payload of 166 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 3 bytes, payload of 163 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 6 bytes, payload of 157 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 3 bytes, payload of 154 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 26 bytes, payload of 128 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 32 bytes, payload of 96 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 28 bytes, payload of 68 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 28 bytes, payload of 40 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 24 bytes, payload of 16 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 6 bytes, payload of 10 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 10 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 239 bytes 520s - 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=} 520s - 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} 520s - Layer 3 (193 bytes) = Dot11MgmtBeacon {Contents=[..193..] Payload=[..181..] Timestamp=84761702784 Interval=100 Flags=1057} 520s - Layer 4 (05 bytes) = Dot11InformationElement 802.11 Information Element (ID: SSID parameter set, Length: 3, SSID: Wi2) 520s - 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) 520s - Layer 6 (03 bytes) = Dot11InformationElement 802.11 Information Element (ID: DS Parameter set, Length: 1, Info: 01) 520s - Layer 7 (06 bytes) = Dot11InformationElement 802.11 Information Element (ID: Traffic Indication Map (TIM), Length: 4, Info: 00010000) 520s - Layer 8 (03 bytes) = Dot11InformationElement 802.11 Information Element (ID: ERP Information, Length: 1, Info: 00) 520s - Layer 9 (26 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 24, OUI: 0050F202, Info: 0101810007A4000023A4000042435E0062322F00) 520s - Layer 10 (32 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 30, OUI: 00904C33, Info: 8C011BFFFF000000000000000000001000000000000000000000) 520s - Layer 11 (28 bytes) = Dot11InformationElement 802.11 Information Element (ID: HT Capabilities (802.11n D1.10), Length: 26, Info: 8C011BFFFF000000000000000000001000000000000000000000) 520s - Layer 12 (28 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 26, OUI: 00904C34, Info: 01000000000000000000000000000000000000000000) 520s - Layer 13 (24 bytes) = Dot11InformationElement 802.11 Information Element (ID: HT Information (802.11n D1.10), Length: 22, Info: 01000000000000000000000000000000000000000000) 520s - Layer 14 (06 bytes) = Dot11InformationElement 802.11 Information Element (ID: Extended Capabilities, Length: 4, Info: 00000000) 520s - Layer 15 (10 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 8, OUI: 00139201, Info: 00018500) 520s 520s --- PASS: TestPacketDot11MgmtBeacon (0.00s) 520s === RUN TestPacketDot11DataQOSData 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11DataQOSData Dot11Data LLC SNAP ARP] 520s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 66 bytes 520s base_test.go:21: Got layer Dot11, 26 bytes, payload of 36 bytes 520s base_test.go:21: Got layer Dot11DataQOSData, 0 bytes, payload of 36 bytes 520s base_test.go:21: Got layer Dot11Data, 0 bytes, payload of 36 bytes 520s base_test.go:21: Got layer LLC, 3 bytes, payload of 33 bytes 520s base_test.go:21: Got layer SNAP, 5 bytes, payload of 28 bytes 520s base_test.go:21: Got layer ARP, 28 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 96 bytes 520s - 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=} 520s - 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..]}} 520s - Layer 3 (00 bytes) = Dot11DataQOSData {Contents=[] Payload=[..36..]} 520s - Layer 4 (00 bytes) = Dot11Data {Contents=[] Payload=[..36..]} 520s - Layer 5 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..33..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 520s - Layer 6 (05 bytes) = SNAP {Contents=[..5..] Payload=[..28..] OrganizationalCode=[0, 0, 0] Type=ARP} 520s - 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]} 520s 520s --- PASS: TestPacketDot11DataQOSData (0.00s) 520s === RUN TestPacketDot11MgmtAction 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11MgmtAction] 520s base_test.go:21: Got layer RadioTap, 18 bytes, payload of 35 bytes 520s base_test.go:21: Got layer Dot11, 24 bytes, payload of 7 bytes 520s base_test.go:21: Got layer Dot11MgmtAction, 7 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 53 bytes 520s - 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=} 520s - 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} 520s - Layer 3 (07 bytes) = Dot11MgmtAction {Contents=[..7..] Payload=[]} 520s 520s --- PASS: TestPacketDot11MgmtAction (0.00s) 520s === RUN TestPacketDot11CtrlAck 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 520s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 14 bytes 520s base_test.go:21: Got layer Dot11, 10 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 46 bytes 520s - 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=} 520s - 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} 520s 520s --- PASS: TestPacketDot11CtrlAck (0.00s) 520s === RUN TestPacketDot11DataARP 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11Data LLC SNAP ARP] 520s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 64 bytes 520s base_test.go:21: Got layer Dot11, 24 bytes, payload of 36 bytes 520s base_test.go:21: Got layer Dot11Data, 0 bytes, payload of 36 bytes 520s base_test.go:21: Got layer LLC, 3 bytes, payload of 33 bytes 520s base_test.go:21: Got layer SNAP, 5 bytes, payload of 28 bytes 520s base_test.go:21: Got layer ARP, 28 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 92 bytes 520s - 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=} 520s - 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..]}} 520s - Layer 3 (00 bytes) = Dot11Data {Contents=[] Payload=[..36..]} 520s - Layer 4 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..33..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 520s - Layer 5 (05 bytes) = SNAP {Contents=[..5..] Payload=[..28..] OrganizationalCode=[0, 0, 0] Type=ARP} 520s - 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]} 520s 520s --- PASS: TestPacketDot11DataARP (0.00s) 520s === RUN TestPacketDot11DataIP 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11Data LLC SNAP IPv4 UDP DHCPv4] 520s base_test.go:21: Got layer RadioTap, 32 bytes, payload of 364 bytes 520s base_test.go:21: Got layer Dot11, 24 bytes, payload of 336 bytes 520s base_test.go:21: Got layer Dot11Data, 0 bytes, payload of 336 bytes 520s base_test.go:21: Got layer LLC, 3 bytes, payload of 333 bytes 520s base_test.go:21: Got layer SNAP, 5 bytes, payload of 328 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 308 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 300 bytes 520s base_test.go:21: Got layer DHCPv4, 300 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 392 bytes 520s - 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=} 520s - 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..]}} 520s - Layer 3 (00 bytes) = Dot11Data {Contents=[] Payload=[..336..]} 520s - Layer 4 (03 bytes) = LLC {Contents=[170, 170, 3] Payload=[..333..] DSAP=170 IG=false SSAP=170 CR=false Control=3} 520s - Layer 5 (05 bytes) = SNAP {Contents=[..5..] Payload=[..328..] OrganizationalCode=[0, 0, 0] Type=IPv4} 520s - 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=[]} 520s - Layer 7 (08 bytes) = UDP {Contents=[..8..] Payload=[..300..] SrcPort=68(bootpc) DstPort=67(bootps) Length=308 Checksum=11065} 520s - 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)]} 520s 520s --- PASS: TestPacketDot11DataIP (0.00s) 520s === RUN TestPacketP6196 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11DataQOSData Dot11WEP] 520s base_test.go:21: Got layer RadioTap, 48 bytes, payload of 143 bytes 520s base_test.go:21: Got layer Dot11, 26 bytes, payload of 113 bytes 520s base_test.go:21: Got layer Dot11DataQOSData, 0 bytes, payload of 113 bytes 520s base_test.go:21: Got layer Dot11WEP, 113 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 191 bytes 520s - 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=} 520s - 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..]}} 520s - Layer 3 (00 bytes) = Dot11DataQOSData {Contents=[] Payload=[..113..]} 520s - Layer 4 (113 bytes) = Dot11WEP {Contents=[..113..] Payload=[]} 520s 520s --- PASS: TestPacketP6196 (0.00s) 520s === RUN TestPacketDot11HTControl 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11 Dot11DataQOSData Dot11WEP] 520s base_test.go:21: Got layer RadioTap, 38 bytes, payload of 106 bytes 520s base_test.go:21: Got layer Dot11, 30 bytes, payload of 72 bytes 520s base_test.go:21: Got layer Dot11DataQOSData, 0 bytes, payload of 72 bytes 520s base_test.go:21: Got layer Dot11WEP, 72 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 140 bytes 520s - 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)} 520s - 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..]}} 520s - Layer 3 (00 bytes) = Dot11DataQOSData {Contents=[] Payload=[..72..]} 520s - Layer 4 (72 bytes) = Dot11WEP {Contents=[..72..] Payload=[]} 520s 520s --- PASS: TestPacketDot11HTControl (0.00s) 520s === RUN TestInformationElement 520s --- PASS: TestInformationElement (0.00s) 520s === RUN TestEncodeDecodeDot1Q 520s --- PASS: TestEncodeDecodeDot1Q (0.00s) 520s === RUN TestPacketEAPOLKey 520s base_test.go:19: Checking packet layers, want [EAPOL EAPOLKey Dot11InformationElement] 520s base_test.go:21: Got layer EAPOL, 4 bytes, payload of 117 bytes 520s base_test.go:21: Got layer EAPOLKey, 95 bytes, payload of 22 bytes 520s base_test.go:21: Got layer Dot11InformationElement, 22 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 121 bytes 520s - Layer 1 (04 bytes) = EAPOL {Contents=[2, 3, 0, 117] Payload=[..117..] Version=2 Type=EAPOLKey Length=117} 520s - 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=[]} 520s - Layer 3 (22 bytes) = Dot11InformationElement 802.11 Information Element (ID: Vendor, Length: 20, OUI: 000FAC04, Info: 592DA88096C461DA246C69001E877F3D) 520s 520s --- PASS: TestPacketEAPOLKey (0.00s) 520s === RUN TestNewIPEndpoint 520s --- PASS: TestNewIPEndpoint (0.00s) 520s === RUN TestDecodeAndEncode 520s --- PASS: TestDecodeAndEncode (0.00s) 520s === RUN TestDecodeGeneve1 520s base_test.go:19: Checking packet layers, want [Linux SLL IPv4 UDP Geneve Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Linux SLL, 16 bytes, payload of 134 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 114 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 106 bytes 520s base_test.go:21: Got layer Geneve, 8 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 150 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..106..] SrcPort=12631 DstPort=6081(geneve) Length=114 Checksum=0} 520s - Layer 4 (08 bytes) = Geneve {Contents=[..8..] Payload=[..98..] Version=0 OptionsLength=0 OAMPacket=false CriticalOption=false Protocol=TransparentEthernetBridging VNI=0 Options=[]} 520s - 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} 520s - 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=[]} 520s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=31199 Id=3322 Seq=25540} 520s - Layer 8 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestDecodeGeneve1 (0.00s) 520s === RUN TestDecodeGeneve2 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP Geneve Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 134 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 114 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 106 bytes 520s base_test.go:21: Got layer Geneve, 8 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 148 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..106..] SrcPort=16550 DstPort=6081(geneve) Length=114 Checksum=0} 520s - Layer 4 (08 bytes) = Geneve {Contents=[..8..] Payload=[..98..] Version=0 OptionsLength=0 OAMPacket=false CriticalOption=false Protocol=TransparentEthernetBridging VNI=10 Options=[]} 520s - 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} 520s - 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=[]} 520s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=56733 Id=32478 Seq=707} 520s - Layer 8 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestDecodeGeneve2 (0.00s) 520s === RUN TestDecodeGeneve3 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP Geneve Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 142 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 122 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 114 bytes 520s base_test.go:21: Got layer Geneve, 16 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 156 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..114..] SrcPort=12618 DstPort=6081(geneve) Length=122 Checksum=0} 520s - 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]}]} 520s - 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} 520s - 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=[]} 520s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=11348 Id=10578 Seq=23} 520s - Layer 8 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestDecodeGeneve3 (0.00s) 520s === RUN TestPacketGRE 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 88 bytes 520s base_test.go:21: Got layer GRE, 4 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 122 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s - 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=[]} 520s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=33476 Id=4724 Seq=1} 520s - Layer 6 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestPacketGRE (0.00s) 520s === RUN TestIPv4OverGREEncode 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 88 bytes 520s base_test.go:21: Got layer GRE, 4 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 122 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s - 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=[]} 520s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=33476 Id=4724 Seq=1} 520s - Layer 6 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestIPv4OverGREEncode (0.00s) 520s === RUN TestPacketEthernetOverGRE 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 122 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 102 bytes 520s base_test.go:21: Got layer GRE, 4 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 136 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s - 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} 520s - 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=[]} 520s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=16149 Id=3842 Seq=1} 520s - Layer 7 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestPacketEthernetOverGRE (0.00s) 520s === RUN TestEthernetOverGREEncode 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 GRE Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 122 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 102 bytes 520s base_test.go:21: Got layer GRE, 4 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 136 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s - 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} 520s - 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=[]} 520s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=16149 Id=3842 Seq=1} 520s - Layer 7 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestEthernetOverGREEncode (0.00s) 520s === RUN TestGREChecksum 520s gre_test.go:357: PACKET: 142 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s - 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=[]} 520s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=49108 Id=2 Seq=0} 520s - Layer 6 (72 bytes) = Payload 72 byte(s) 520s 520s gre_test.go:357: PACKET: 102 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s - 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=[]} 520s - Layer 5 (08 bytes) = UDP {Contents=[..8..] Payload=[..32..] SrcPort=41781 DstPort=33434(traceroute) Length=40 Checksum=55436} 520s - Layer 6 (32 bytes) = Payload 32 byte(s) 520s 520s --- PASS: TestGREChecksum (0.00s) 520s === RUN TestGTPPacket 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP GTPv1U IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 124 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 104 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 96 bytes 520s base_test.go:21: Got layer GTPv1U, 12 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 138 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..96..] SrcPort=2152(gtp-user) DstPort=2152(gtp-user) Length=104 Checksum=49604} 520s - 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=[]} 520s - 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=[]} 520s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoReply Checksum=14825 Id=0 Seq=10365} 520s - Layer 7 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestGTPPacket (0.00s) 520s === RUN TestGTPPacketWithEH 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP GTPv1U IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 128 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 108 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 100 bytes 520s base_test.go:21: Got layer GTPv1U, 16 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 142 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..100..] SrcPort=2152(gtp-user) DstPort=2152(gtp-user) Length=108 Checksum=49557} 520s - 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]}]} 520s - 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=[]} 520s - Layer 6 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoReply Checksum=58294 Id=0 Seq=10412} 520s - Layer 7 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestGTPPacketWithEH (0.00s) 520s === RUN TestPacketICMPv6NeighborAnnouncementFlags 520s --- PASS: TestPacketICMPv6NeighborAnnouncementFlags (0.00s) 520s === RUN TestPacketICMPv6RouterAnnouncementFlags 520s --- PASS: TestPacketICMPv6RouterAnnouncementFlags (0.00s) 520s === RUN TestPacketICMPv6 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 520s base_test.go:21: Got layer ICMPv6NeighborAdvertisement, 20 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 78 bytes 520s - 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} 520s - 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} 520s - Layer 3 (04 bytes) = ICMPv6 {Contents=[136, 0, 30, 214] Payload=[..20..] TypeCode=NeighborAdvertisement Checksum=7894 TypeBytes=[]} 520s - Layer 4 (20 bytes) = ICMPv6NeighborAdvertisement {Contents=[..20..] Payload=[] Flags=64 TargetAddress=2620:0:1005:0:26be:5ff:fe27:b17 Options=[]} 520s 520s --- PASS: TestPacketICMPv6 (0.00s) 520s === RUN TestPacketICMPv6WithHopByHop 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 176 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 128 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 128 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 124 bytes 520s base_test.go:21: Got layer MLDv2MulticastListenerReport, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 190 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - Layer 4 (04 bytes) = ICMPv6 {Contents=[143, 0, 158, 237] Payload=[..124..] TypeCode=143(0) Checksum=40685 TypeBytes=[]} 520s - 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:[]}] 520s 520s --- PASS: TestPacketICMPv6WithHopByHop (0.00s) 520s === RUN TestPacketICMPv6RouterAdvertisement 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 ICMPv6RouterAdvertisement] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 104 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 60 bytes 520s base_test.go:21: Got layer ICMPv6RouterAdvertisement, 60 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 118 bytes 520s - 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} 520s - 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} 520s - Layer 3 (04 bytes) = ICMPv6 {Contents=[134, 0, 196, 254] Payload=[..60..] TypeCode=RouterAdvertisement Checksum=50430 TypeBytes=[]} 520s - 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)]} 520s 520s --- PASS: TestPacketICMPv6RouterAdvertisement (0.00s) 520s === RUN TestPacketICMPv6NeighborSolicitation 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 ICMPv6 ICMPv6NeighborSolicitation] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 520s base_test.go:21: Got layer ICMPv6NeighborSolicitation, 20 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 78 bytes 520s - 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} 520s - 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} 520s - Layer 3 (04 bytes) = ICMPv6 {Contents=[135, 0, 185, 48] Payload=[..20..] TypeCode=NeighborSolicitation Checksum=47408 TypeBytes=[]} 520s - Layer 4 (20 bytes) = ICMPv6NeighborSolicitation {Contents=[..20..] Payload=[] TargetAddress=fe80::20c:29ff:fe0e:4c67 Options=[]} 520s 520s --- PASS: TestPacketICMPv6NeighborSolicitation (0.00s) 520s === RUN TestIGMPv1MembershipReportPacket 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 8 bytes 520s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMPv1 Membership Report MaxResponseTime=0s Checksum=3267 GroupAddress=224.0.1.60 Version=1} 520s 520s --- PASS: TestIGMPv1MembershipReportPacket (0.00s) 520s === RUN TestIGMPv2MembershipQuery 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 8 bytes 520s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMP Membership Query MaxResponseTime=10s Checksum=61083 GroupAddress=0.0.0.0 Version=2} 520s 520s --- PASS: TestIGMPv2MembershipQuery (0.00s) 520s === RUN TestIGMPv2MembershipReport 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 520s base_test.go:21: Got layer IPv4, 24 bytes, payload of 8 bytes 520s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (00 bytes) = IGMP {Contents=[] Payload=[] Type=IGMPv2 Membership Report MaxResponseTime=0s Checksum=64001 GroupAddress=239.255.255.253 Version=2} 520s 520s --- PASS: TestIGMPv2MembershipReport (0.00s) 520s === RUN TestIGMPv3MembershipQuery 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 520s base_test.go:21: Got layer IPv4, 24 bytes, payload of 12 bytes 520s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestIGMPv3MembershipQuery (0.00s) 520s === RUN TestIGMPv3MembershipReport2Records 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IGMP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 48 bytes 520s base_test.go:21: Got layer IPv4, 24 bytes, payload of 24 bytes 520s base_test.go:21: Got layer IGMP, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 62 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestIGMPv3MembershipReport2Records (0.00s) 520s === RUN TestGetIPOptLengthNoOpt 520s --- PASS: TestGetIPOptLengthNoOpt (0.00s) 520s === RUN TestGetIPOptLengthEndOfList 520s --- PASS: TestGetIPOptLengthEndOfList (0.00s) 520s === RUN TestGetIPOptLengthPaddingEndOfList 520s --- PASS: TestGetIPOptLengthPaddingEndOfList (0.00s) 520s === RUN TestGetIPOptLengthOptionEndOfList 520s --- PASS: TestGetIPOptLengthOptionEndOfList (0.00s) 520s === RUN TestIPOptResetDuringDecoding 520s --- PASS: TestIPOptResetDuringDecoding (0.00s) 520s === RUN TestChecksum 520s --- PASS: TestChecksum (0.00s) 520s === RUN TestIPv4InvalidOptionLength 520s --- PASS: TestIPv4InvalidOptionLength (0.00s) 520s === RUN TestIPv4Options 520s --- PASS: TestIPv4Options (0.00s) 520s === RUN TestSerializeIPv6HeaderTLVOptions 520s --- PASS: TestSerializeIPv6HeaderTLVOptions (0.00s) 520s === RUN TestPacketIPv6HopByHop0Serialize 520s --- PASS: TestPacketIPv6HopByHop0Serialize (0.00s) 520s === RUN TestPacketIPv6HopByHop0Decode 520s base_test.go:19: Checking packet layers, want [IPv6 IPv6HopByHop] 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 0 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 48 bytes, truncated 520s - 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]}]}} 520s - 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]}]} 520s 520s --- PASS: TestPacketIPv6HopByHop0Decode (0.00s) 520s === RUN TestPacketIPv6Destination0Serialize 520s --- PASS: TestPacketIPv6Destination0Serialize (0.00s) 520s === RUN TestPacketIPv6Destination0Decode 520s base_test.go:19: Checking packet layers, want [IPv6 IPv6Destination] 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 8 bytes 520s base_test.go:21: Got layer IPv6Destination, 8 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 48 bytes 520s - 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} 520s - 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]}]} 520s 520s --- PASS: TestPacketIPv6Destination0Decode (0.00s) 520s === RUN TestIPv6JumbogramSerialize 520s --- PASS: TestIPv6JumbogramSerialize (0.00s) 520s === RUN TestIPv6JumbogramDecode 520s base_test.go:19: Checking packet layers, want [IPv6 IPv6HopByHop Payload] 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 65544 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 65536 bytes 520s base_test.go:21: Got layer Payload, 65536 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 65584 bytes 520s - 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]}]}} 520s - 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]}]} 520s - Layer 3 (65536 bytes) = Payload 65536 byte(s) 520s 520s --- PASS: TestIPv6JumbogramDecode (0.00s) 520s === RUN TestPacketIPSecAHTransport 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IPSecAH ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 88 bytes 520s base_test.go:21: Got layer IPSecAH, 24 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 122 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (24 bytes) = IPSecAH {Contents=[..24..] Payload=[..64..] NextHeader=ICMPv4 HeaderLength=4 ActualLength=24 Reserved=0 SPI=257 Seq=1 AuthenticationData=[..12..]} 520s - Layer 4 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=64485 Id=1560 Seq=1} 520s - Layer 5 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestPacketIPSecAHTransport (0.00s) 520s === RUN TestPacketIPSecAHTunnel 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IPSecAH IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 128 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 108 bytes 520s base_test.go:21: Got layer IPSecAH, 24 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 142 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (24 bytes) = IPSecAH {Contents=[..24..] Payload=[..84..] NextHeader=IPv4 HeaderLength=4 ActualLength=24 Reserved=0 SPI=257 Seq=1 AuthenticationData=[..12..]} 520s - 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=[]} 520s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=55135 Id=31322 Seq=1} 520s - Layer 6 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestPacketIPSecAHTunnel (0.00s) 520s === RUN TestPacketIPSecESP 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 IPSecESP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 136 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 116 bytes 520s base_test.go:21: Got layer IPSecESP, 116 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 150 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (116 bytes) = IPSecESP {Contents=[..116..] Payload=[] SPI=110 Seq=19 Encrypted=[..108..]} 520s 520s --- PASS: TestPacketIPSecESP (0.00s) 520s === RUN TestLCMDecode 520s --- PASS: TestLCMDecode (0.00s) 520s === RUN TestPacketLLDP 520s base_test.go:19: Checking packet layers, want [Ethernet LinkLayerDiscovery LinkLayerDiscoveryInfo] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 222 bytes 520s base_test.go:21: Got layer LinkLayerDiscovery, 222 bytes, payload of 0 bytes 520s base_test.go:21: Got layer LinkLayerDiscoveryInfo, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 236 bytes 520s - 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} 520s - Layer 2 (222 bytes) = LinkLayerDiscovery {Contents=[..222..] Payload=[] ChassisID={ Subtype=Local ID=[..7..]} PortID={ Subtype=Local ID=[..8..]} TTL=20 Values=[..8..]} 520s - 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=[]} 520s 520s --- PASS: TestPacketLLDP (0.00s) 520s === RUN TestPacketMulticastListenerQueryMessageV1 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv1MulticastListenerQuery] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 24 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 520s base_test.go:21: Got layer MLDv1MulticastListenerQuery, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 86 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - Layer 4 (04 bytes) = ICMPv6 {Contents=[130, 0, 98, 58] Payload=[..20..] TypeCode=130(0) Checksum=25146 TypeBytes=[]} 520s - Layer 5 (00 bytes) = MLDv1MulticastListenerQuery Maximum Response Delay: 10000ms, Multicast Address: :: 520s 520s --- PASS: TestPacketMulticastListenerQueryMessageV1 (0.00s) 520s === RUN TestPacketMulticastListenerReportMessageV1 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv1MulticastListenerReport] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 24 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 520s base_test.go:21: Got layer MLDv1MulticastListenerReport, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 86 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - Layer 4 (04 bytes) = ICMPv6 {Contents=[131, 0, 98, 58] Payload=[..20..] TypeCode=131(0) Checksum=25146 TypeBytes=[]} 520s - Layer 5 (00 bytes) = MLDv1MulticastListenerReport Maximum Response Delay: 10000ms, Multicast Address: ff02::db8:1122:3344 520s 520s --- PASS: TestPacketMulticastListenerReportMessageV1 (0.00s) 520s === RUN TestPacketMulticastListenerDoneMessageV1 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv1MulticastListenerDone] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 72 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 24 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 24 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 20 bytes 520s base_test.go:21: Got layer MLDv1MulticastListenerDone, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 86 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - Layer 4 (04 bytes) = ICMPv6 {Contents=[132, 0, 98, 58] Payload=[..20..] TypeCode=132(0) Checksum=25146 TypeBytes=[]} 520s - Layer 5 (00 bytes) = MLDv1MulticastListenerDone Maximum Response Delay: 10000ms, Multicast Address: ff02::db8:1122:3344 520s 520s --- PASS: TestPacketMulticastListenerDoneMessageV1 (0.00s) 520s === RUN TestPacketMulticastListenerQueryMessageV2 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv2MulticastListenerQuery] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 28 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 28 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 24 bytes 520s base_test.go:21: Got layer MLDv2MulticastListenerQuery, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 90 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - Layer 4 (04 bytes) = ICMPv6 {Contents=[130, 0, 98, 58] Payload=[..24..] TypeCode=130(0) Checksum=25146 TypeBytes=[]} 520s - 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: [] 520s 520s --- PASS: TestPacketMulticastListenerQueryMessageV2 (0.00s) 520s === RUN TestPacketMulticastListenerReportMessageV2 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 IPv6HopByHop ICMPv6 MLDv2MulticastListenerReport] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 136 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 88 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 88 bytes 520s base_test.go:21: Got layer ICMPv6, 4 bytes, payload of 84 bytes 520s base_test.go:21: Got layer MLDv2MulticastListenerReport, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 150 bytes, truncated 520s - 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} 520s - 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]}]}} 520s - 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]}]} 520s - Layer 4 (04 bytes) = ICMPv6 {Contents=[143, 0, 42, 14] Payload=[..84..] TypeCode=143(0) Checksum=10766 TypeBytes=[]} 520s - 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:[]}] 520s 520s --- PASS: TestPacketMulticastListenerReportMessageV2 (0.00s) 520s === RUN TestPacketMPLS 520s base_test.go:19: Checking packet layers, want [Ethernet MPLS MPLS IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 108 bytes 520s base_test.go:21: Got layer MPLS, 4 bytes, payload of 104 bytes 520s base_test.go:21: Got layer MPLS, 4 bytes, payload of 100 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 80 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 72 bytes 520s base_test.go:21: Got layer Payload, 72 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 122 bytes 520s - 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} 520s - Layer 2 (04 bytes) = MPLS {Contents=[0, 1, 16, 254] Payload=[..104..] Label=17 TrafficClass=0 StackBottom=false TTL=254} 520s - Layer 3 (04 bytes) = MPLS {Contents=[0, 1, 49, 254] Payload=[..100..] Label=19 TrafficClass=0 StackBottom=true TTL=254} 520s - 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=[]} 520s - Layer 5 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..72..] TypeCode=EchoRequest Checksum=14955 Id=11 Seq=2} 520s - Layer 6 (72 bytes) = Payload 72 byte(s) 520s 520s --- PASS: TestPacketMPLS (0.00s) 520s === RUN TestNTPOne 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP NTP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 520s base_test.go:21: Got layer NTP, 48 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 90 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=123(ntp) DstPort=123(ntp) Length=56 Checksum=63698} 520s - 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=[]} 520s 520s --- PASS: TestNTPOne (0.00s) 520s === RUN TestNTPTwo 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP NTP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 520s base_test.go:21: Got layer NTP, 48 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 90 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=123(ntp) DstPort=123(ntp) Length=56 Checksum=2392} 520s - 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=[]} 520s 520s --- PASS: TestNTPTwo (0.00s) 520s === RUN TestNTPThree 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP NTP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 56 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 48 bytes 520s base_test.go:21: Got layer NTP, 48 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 90 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..48..] SrcPort=123(ntp) DstPort=123(ntp) Length=56 Checksum=17413} 520s - 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=[]} 520s 520s --- PASS: TestNTPThree (0.00s) 520s === RUN TestNTPIsomorphism 520s --- PASS: TestNTPIsomorphism (0.00s) 520s === RUN TestPacketOSPF2Hello 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 44 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 78 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2Hello (0.00s) 520s === RUN TestPacketOSPF3Hello 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 76 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 36 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 90 bytes 520s - 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} 520s - 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} 520s - 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} 520s 520s --- PASS: TestPacketOSPF3Hello (0.00s) 520s === RUN TestPacketOSPF2DBDesc 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 52 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 32 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 66 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2DBDesc (0.00s) 520s === RUN TestPacketOSPF3DBDesc 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 68 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 28 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 82 bytes 520s - 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} 520s - 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} 520s - 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} 520s 520s --- PASS: TestPacketOSPF3DBDesc (0.00s) 520s === RUN TestPacketOSPF2LSRequest 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 56 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 36 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 70 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2LSRequest (0.00s) 520s === RUN TestPacketOSPF3LSRequest 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 140 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 100 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 154 bytes 520s - 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} 520s - 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} 520s - 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} 520s 520s --- PASS: TestPacketOSPF3LSRequest (0.00s) 520s === RUN TestPacketOSPF2LSUpdate 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 312 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 292 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 326 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2LSUpdate (0.00s) 520s === RUN TestPacketOSPF2LSUpdateLSA2 520s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 128 bytes 520s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 124 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 104 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 142 bytes, truncated 520s - 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} 520s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 127, 8, 0] Payload=[..124..] Priority=0 DropEligible=false VLANIdentifier=383 Type=IPv4} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2LSUpdateLSA2 (0.00s) 520s === RUN TestPacketOSPF2LSUpdateLSA7 520s base_test.go:19: Checking packet layers, want [Ethernet Dot1Q IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 124 bytes 520s base_test.go:21: Got layer Dot1Q, 4 bytes, payload of 120 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 100 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 138 bytes, truncated 520s - 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} 520s - Layer 2 (04 bytes) = Dot1Q {Contents=[1, 127, 8, 0] Payload=[..120..] Priority=0 DropEligible=false VLANIdentifier=383 Type=IPv4} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2LSUpdateLSA7 (0.00s) 520s === RUN TestPacketOSPF3LSUpdate 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 328 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 288 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 342 bytes 520s - 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} 520s - 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} 520s - 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} 520s 520s --- PASS: TestPacketOSPF3LSUpdate (0.00s) 520s === RUN TestPacketOSPF2LSAck 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 64 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 44 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 78 bytes 520s - 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} 520s - 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=[]} 520s - 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} 520s 520s --- PASS: TestPacketOSPF2LSAck (0.00s) 520s === RUN TestPacketOSPF3LSAck 520s base_test.go:19: Checking packet layers, want [Ethernet IPv6 OSPF] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 176 bytes 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 136 bytes 520s base_test.go:21: Got layer OSPF, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 190 bytes 520s - 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} 520s - 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} 520s - 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} 520s 520s --- PASS: TestPacketOSPF3LSAck (0.00s) 520s === RUN TestPacketOSPFInvalidLSA 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 DecodeFailure] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 83 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 63 bytes 520s base_test.go:21: Got layer DecodeFailure, 63 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 97 bytes, truncated 520s - 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} 520s - 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=[]} 520s - Layer 3 (63 bytes) = DecodeFailure Packet decoding error: Cannot parse Link State Update packet: Could not extract Link State type. 520s 520s --- PASS: TestPacketOSPFInvalidLSA (0.00s) 520s === RUN TestPacketPrism 520s base_test.go:19: Checking packet layers, want [Prism monitor mode header Dot11 Dot11MgmtProbeReq] 520s base_test.go:21: Got layer Prism monitor mode header, 144 bytes, payload of 126 bytes 520s base_test.go:21: Got layer Dot11, 24 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Dot11MgmtProbeReq, 98 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 270 bytes 520s - 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} 520s - Layer 3 (98 bytes) = Dot11MgmtProbeReq {Contents=[..98..] Payload=[]} 520s 520s --- PASS: TestPacketPrism (0.00s) 520s === RUN TestPacketRadiotap0 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 520s base_test.go:21: Got layer RadioTap, 18 bytes, payload of 14 bytes 520s base_test.go:21: Got layer Dot11, 10 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 32 bytes 520s - 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=} 520s - 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} 520s 520s --- PASS: TestPacketRadiotap0 (0.00s) 520s === RUN TestPacketRadiotap1 520s base_test.go:19: Checking packet layers, want [RadioTap Dot11] 520s base_test.go:21: Got layer RadioTap, 21 bytes, payload of 28 bytes 520s base_test.go:21: Got layer Dot11, 24 bytes, payload of 0 bytes 520s base_test.go:21: Got layer Dot11DataNull, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 49 bytes 520s - 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=} 520s - 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=[]}} 520s - Layer 3 (00 bytes) = Dot11DataNull {Contents=[] Payload=[]} 520s 520s --- PASS: TestPacketRadiotap1 (0.00s) 520s === RUN TestRADIUSCode 520s === RUN TestRADIUSCode/Unknown(0) 520s === RUN TestRADIUSCode/Access-Request 520s === RUN TestRADIUSCode/Access-Accept 520s === RUN TestRADIUSCode/Access-Reject 520s === RUN TestRADIUSCode/Accounting-Request 520s === RUN TestRADIUSCode/Accounting-Response 520s === RUN TestRADIUSCode/Access-Challenge 520s === RUN TestRADIUSCode/Status-Server 520s === RUN TestRADIUSCode/Status-Client 520s === RUN TestRADIUSCode/Reserved 520s --- PASS: TestRADIUSCode (0.00s) 520s --- PASS: TestRADIUSCode/Unknown(0) (0.00s) 520s --- PASS: TestRADIUSCode/Access-Request (0.00s) 520s --- PASS: TestRADIUSCode/Access-Accept (0.00s) 520s --- PASS: TestRADIUSCode/Access-Reject (0.00s) 520s --- PASS: TestRADIUSCode/Accounting-Request (0.00s) 520s --- PASS: TestRADIUSCode/Accounting-Response (0.00s) 520s --- PASS: TestRADIUSCode/Access-Challenge (0.00s) 520s --- PASS: TestRADIUSCode/Status-Server (0.00s) 520s --- PASS: TestRADIUSCode/Status-Client (0.00s) 520s --- PASS: TestRADIUSCode/Reserved (0.00s) 520s === RUN TestRADIUSAttributeType 520s === RUN TestRADIUSAttributeType/Unknown(0) 520s === RUN TestRADIUSAttributeType/User-Name 520s === RUN TestRADIUSAttributeType/User-Password 520s === RUN TestRADIUSAttributeType/CHAP-Password 520s === RUN TestRADIUSAttributeType/NAS-IP-Address 520s === RUN TestRADIUSAttributeType/NAS-Port 520s === RUN TestRADIUSAttributeType/Service-Type 520s === RUN TestRADIUSAttributeType/Framed-Protocol 520s === RUN TestRADIUSAttributeType/Framed-IP-Address 520s === RUN TestRADIUSAttributeType/Framed-IP-Netmask 520s === RUN TestRADIUSAttributeType/Framed-Routing 520s === RUN TestRADIUSAttributeType/Filter-Id 520s === RUN TestRADIUSAttributeType/Framed-MTU 520s === RUN TestRADIUSAttributeType/Framed-Compression 520s === RUN TestRADIUSAttributeType/Login-IP-Host 520s === RUN TestRADIUSAttributeType/Login-Service 520s === RUN TestRADIUSAttributeType/Login-TCP-Port 520s === RUN TestRADIUSAttributeType/Reply-Message 520s === RUN TestRADIUSAttributeType/Callback-Number 520s === RUN TestRADIUSAttributeType/Callback-Id 520s === RUN TestRADIUSAttributeType/Framed-Route 520s === RUN TestRADIUSAttributeType/Framed-IPX-Network 520s === RUN TestRADIUSAttributeType/State 520s === RUN TestRADIUSAttributeType/Class 520s === RUN TestRADIUSAttributeType/Vendor-Specific 520s === RUN TestRADIUSAttributeType/Session-Timeout 520s === RUN TestRADIUSAttributeType/Idle-Timeout 520s === RUN TestRADIUSAttributeType/Termination-Action 520s === RUN TestRADIUSAttributeType/Called-Station-Id 520s === RUN TestRADIUSAttributeType/Calling-Station-Id 520s === RUN TestRADIUSAttributeType/NAS-Identifier 520s === RUN TestRADIUSAttributeType/Proxy-State 520s === RUN TestRADIUSAttributeType/Login-LAT-Service 520s === RUN TestRADIUSAttributeType/Login-LAT-Node 520s === RUN TestRADIUSAttributeType/Login-LAT-Group 520s === RUN TestRADIUSAttributeType/Framed-AppleTalk-Link 520s === RUN TestRADIUSAttributeType/Framed-AppleTalk-Network 520s === RUN TestRADIUSAttributeType/Framed-AppleTalk-Zone 520s === RUN TestRADIUSAttributeType/Acct-Status-Type 520s === RUN TestRADIUSAttributeType/Acct-Delay-Time 520s === RUN TestRADIUSAttributeType/Acct-Input-Octets 520s === RUN TestRADIUSAttributeType/Acct-Output-Octets 520s === RUN TestRADIUSAttributeType/Acct-Session-Id 520s === RUN TestRADIUSAttributeType/Acct-Authentic 520s === RUN TestRADIUSAttributeType/Acct-Session-Time 520s === RUN TestRADIUSAttributeType/Acct-Input-Packets 520s === RUN TestRADIUSAttributeType/Acct-Output-Packets 520s === RUN TestRADIUSAttributeType/Acct-Terminate-Cause 520s === RUN TestRADIUSAttributeType/Acct-Multi-Session-Id 520s === RUN TestRADIUSAttributeType/Acct-Link-Count 520s === RUN TestRADIUSAttributeType/Acct-Input-Gigawords 520s === RUN TestRADIUSAttributeType/Acct-Output-Gigawords 520s === RUN TestRADIUSAttributeType/Event-Timestamp 520s === RUN TestRADIUSAttributeType/CHAP-Challenge 520s === RUN TestRADIUSAttributeType/NAS-Port-Type 520s === RUN TestRADIUSAttributeType/Port-Limit 520s === RUN TestRADIUSAttributeType/Login-LAT-Port 520s === RUN TestRADIUSAttributeType/Tunnel-Type 520s === RUN TestRADIUSAttributeType/Tunnel-Medium-Type 520s === RUN TestRADIUSAttributeType/Tunnel-Client-Endpoint 520s === RUN TestRADIUSAttributeType/Tunnel-Server-Endpoint 520s === RUN TestRADIUSAttributeType/Acct-Tunnel-Connection 520s === RUN TestRADIUSAttributeType/Tunnel-Password 520s === RUN TestRADIUSAttributeType/ARAP-Password 520s === RUN TestRADIUSAttributeType/ARAP-Features 520s === RUN TestRADIUSAttributeType/ARAP-Zone-Access 520s === RUN TestRADIUSAttributeType/ARAP-Security 520s === RUN TestRADIUSAttributeType/ARAP-Security-Data 520s === RUN TestRADIUSAttributeType/Password-Retry 520s === RUN TestRADIUSAttributeType/Prompt 520s === RUN TestRADIUSAttributeType/Connect-Info 520s === RUN TestRADIUSAttributeType/Configuration-Token 520s === RUN TestRADIUSAttributeType/EAP-Message 520s === RUN TestRADIUSAttributeType/Message-Authenticator 520s === RUN TestRADIUSAttributeType/Tunnel-Private-Group-ID 520s === RUN TestRADIUSAttributeType/Tunnel-Assignment-ID 520s === RUN TestRADIUSAttributeType/Tunnel-Preference 520s === RUN TestRADIUSAttributeType/ARAP-Challenge-Response 520s === RUN TestRADIUSAttributeType/Acct-Interim-Interval 520s === RUN TestRADIUSAttributeType/Acct-Tunnel-Packets-Lost 520s === RUN TestRADIUSAttributeType/NAS-Port-Id 520s === RUN TestRADIUSAttributeType/Framed-Pool 520s === RUN TestRADIUSAttributeType/Tunnel-Client-Auth-ID 520s === RUN TestRADIUSAttributeType/Tunnel-Server-Auth-ID 520s --- PASS: TestRADIUSAttributeType (0.00s) 520s --- PASS: TestRADIUSAttributeType/Unknown(0) (0.00s) 520s --- PASS: TestRADIUSAttributeType/User-Name (0.00s) 520s --- PASS: TestRADIUSAttributeType/User-Password (0.00s) 520s --- PASS: TestRADIUSAttributeType/CHAP-Password (0.00s) 520s --- PASS: TestRADIUSAttributeType/NAS-IP-Address (0.00s) 520s --- PASS: TestRADIUSAttributeType/NAS-Port (0.00s) 520s --- PASS: TestRADIUSAttributeType/Service-Type (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-Protocol (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-IP-Address (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-IP-Netmask (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-Routing (0.00s) 520s --- PASS: TestRADIUSAttributeType/Filter-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-MTU (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-Compression (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-IP-Host (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-Service (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-TCP-Port (0.00s) 520s --- PASS: TestRADIUSAttributeType/Reply-Message (0.00s) 520s --- PASS: TestRADIUSAttributeType/Callback-Number (0.00s) 520s --- PASS: TestRADIUSAttributeType/Callback-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-Route (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-IPX-Network (0.00s) 520s --- PASS: TestRADIUSAttributeType/State (0.00s) 520s --- PASS: TestRADIUSAttributeType/Class (0.00s) 520s --- PASS: TestRADIUSAttributeType/Vendor-Specific (0.00s) 520s --- PASS: TestRADIUSAttributeType/Session-Timeout (0.00s) 520s --- PASS: TestRADIUSAttributeType/Idle-Timeout (0.00s) 520s --- PASS: TestRADIUSAttributeType/Termination-Action (0.00s) 520s --- PASS: TestRADIUSAttributeType/Called-Station-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/Calling-Station-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/NAS-Identifier (0.00s) 520s --- PASS: TestRADIUSAttributeType/Proxy-State (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-LAT-Service (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-LAT-Node (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-LAT-Group (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-AppleTalk-Link (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-AppleTalk-Network (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-AppleTalk-Zone (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Status-Type (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Delay-Time (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Input-Octets (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Output-Octets (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Session-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Authentic (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Session-Time (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Input-Packets (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Output-Packets (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Terminate-Cause (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Multi-Session-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Link-Count (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Input-Gigawords (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Output-Gigawords (0.00s) 520s --- PASS: TestRADIUSAttributeType/Event-Timestamp (0.00s) 520s --- PASS: TestRADIUSAttributeType/CHAP-Challenge (0.00s) 520s --- PASS: TestRADIUSAttributeType/NAS-Port-Type (0.00s) 520s --- PASS: TestRADIUSAttributeType/Port-Limit (0.00s) 520s --- PASS: TestRADIUSAttributeType/Login-LAT-Port (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Type (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Medium-Type (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Client-Endpoint (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Server-Endpoint (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Tunnel-Connection (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Password (0.00s) 520s --- PASS: TestRADIUSAttributeType/ARAP-Password (0.00s) 520s --- PASS: TestRADIUSAttributeType/ARAP-Features (0.00s) 520s --- PASS: TestRADIUSAttributeType/ARAP-Zone-Access (0.00s) 520s --- PASS: TestRADIUSAttributeType/ARAP-Security (0.00s) 520s --- PASS: TestRADIUSAttributeType/ARAP-Security-Data (0.00s) 520s --- PASS: TestRADIUSAttributeType/Password-Retry (0.00s) 520s --- PASS: TestRADIUSAttributeType/Prompt (0.00s) 520s --- PASS: TestRADIUSAttributeType/Connect-Info (0.00s) 520s --- PASS: TestRADIUSAttributeType/Configuration-Token (0.00s) 520s --- PASS: TestRADIUSAttributeType/EAP-Message (0.00s) 520s --- PASS: TestRADIUSAttributeType/Message-Authenticator (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Private-Group-ID (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Assignment-ID (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Preference (0.00s) 520s --- PASS: TestRADIUSAttributeType/ARAP-Challenge-Response (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Interim-Interval (0.00s) 520s --- PASS: TestRADIUSAttributeType/Acct-Tunnel-Packets-Lost (0.00s) 520s --- PASS: TestRADIUSAttributeType/NAS-Port-Id (0.00s) 520s --- PASS: TestRADIUSAttributeType/Framed-Pool (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Client-Auth-ID (0.00s) 520s --- PASS: TestRADIUSAttributeType/Tunnel-Server-Auth-ID (0.00s) 520s === RUN TestRADIUSRecordSize 520s === RUN TestRADIUSRecordSize/Minimum-1 520s === RUN TestRADIUSRecordSize/Maximum+1 520s --- PASS: TestRADIUSRecordSize (0.00s) 520s --- PASS: TestRADIUSRecordSize/Minimum-1 (0.00s) 520s --- PASS: TestRADIUSRecordSize/Maximum+1 (0.00s) 520s === RUN TestRADIUSLengthField 520s === RUN TestRADIUSLengthField/Minimum-1 520s === RUN TestRADIUSLengthField/Minimum+1 520s === RUN TestRADIUSLengthField/Maximum-1 520s === RUN TestRADIUSLengthField/Maximum+1 520s --- PASS: TestRADIUSLengthField (0.00s) 520s --- PASS: TestRADIUSLengthField/Minimum-1 (0.00s) 520s --- PASS: TestRADIUSLengthField/Minimum+1 (0.00s) 520s --- PASS: TestRADIUSLengthField/Maximum-1 (0.00s) 520s --- PASS: TestRADIUSLengthField/Maximum+1 (0.00s) 520s === RUN TestRADIUSAttributesLengthField 520s === RUN TestRADIUSAttributesLengthField/Minimum-1 520s === RUN TestRADIUSAttributesLengthField/Minimum-1#01 520s === RUN TestRADIUSAttributesLengthField/Minimum+1 520s === RUN TestRADIUSAttributesLengthField/Minimum+1#01 520s --- PASS: TestRADIUSAttributesLengthField (0.00s) 520s --- PASS: TestRADIUSAttributesLengthField/Minimum-1 (0.00s) 520s --- PASS: TestRADIUSAttributesLengthField/Minimum-1#01 (0.00s) 520s --- PASS: TestRADIUSAttributesLengthField/Minimum+1 (0.00s) 520s --- PASS: TestRADIUSAttributesLengthField/Minimum+1#01 (0.00s) 520s === RUN TestRADIUSAccessRequest 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP RADIUS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 103 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 83 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 75 bytes 520s base_test.go:21: Got layer RADIUS, 75 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 117 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..75..] SrcPort=55337 DstPort=1812(radius) Length=83 Checksum=22672} 520s - 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..]} 520s 520s --- PASS: TestRADIUSAccessRequest (0.00s) 520s === RUN TestRADIUSAccessAccept 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP RADIUS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 48 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 28 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 20 bytes 520s base_test.go:21: Got layer RADIUS, 20 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 62 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..20..] SrcPort=1812(radius) DstPort=55337 Length=28 Checksum=22617} 520s - 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=[]} 520s 520s --- PASS: TestRADIUSAccessAccept (0.00s) 520s === RUN TestRMCPDecodeFromBytes 520s --- PASS: TestRMCPDecodeFromBytes (0.00s) 520s === RUN TestRMCPTestSerializeTo 520s --- PASS: TestRMCPTestSerializeTo (0.00s) 520s === RUN TestDecodeUDPSFlow 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP SFlow] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 1468 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 1448 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 1440 bytes 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 1482 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..1440..] SrcPort=51031 DstPort=6343(sflow) Length=1448 Checksum=8763} 520s - 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}]}]} 520s 520s --- PASS: TestDecodeUDPSFlow (0.00s) 520s === RUN TestDecodeSFlowDatagram 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP SFlow] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 1468 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 1448 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 1440 bytes 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 1482 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..1440..] SrcPort=51031 DstPort=6343(sflow) Length=1448 Checksum=8763} 520s - 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}]}]} 520s 520s --- PASS: TestDecodeSFlowDatagram (0.00s) 520s === RUN TestPacketPacket0 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP SFlow] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 1160 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 1140 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 1132 bytes 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 1174 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..1132..] SrcPort=56504 DstPort=6343(sflow) Length=1140 Checksum=648} 520s - 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 520s - 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} 520s - 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=[]} 520s - 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=[]} 520s }]}, {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 520s - 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} 520s - 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=[]} 520s - 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=[]} 520s - Layer 4 (62 bytes) = Payload 62 byte(s) 520s }]}, {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 520s - 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} 520s - 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=[]} 520s - 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=[]} 520s }]}] CounterSamples=[]} 520s 520s --- PASS: TestPacketPacket0 (0.00s) 520s === RUN TestDecodeProcessorCounter 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 88 bytes 520s - 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}]}]} 520s 520s --- PASS: TestDecodeProcessorCounter (0.00s) 520s === RUN TestDecodeExtendedSwitchFlow 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 92 bytes 520s - 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=[]} 520s 520s --- PASS: TestDecodeExtendedSwitchFlow (0.00s) 520s === RUN TestDecodeExtendedRouterFlow 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 92 bytes 520s - 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=[]} 520s 520s --- PASS: TestDecodeExtendedRouterFlow (0.00s) 520s === RUN TestDecodeExtendedRouterFlowIPv6 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 104 bytes 520s - 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=[]} 520s 520s --- PASS: TestDecodeExtendedRouterFlowIPv6 (0.00s) 520s === RUN TestDecodeExtendedIpv4TunnelIngressFlow 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 108 bytes 520s - 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=[]} 520s 520s --- PASS: TestDecodeExtendedIpv4TunnelIngressFlow (0.00s) 520s === RUN TestDecodeExtendedIpv4TunnelEgressFlow 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 108 bytes 520s - 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=[]} 520s 520s --- PASS: TestDecodeExtendedIpv4TunnelEgressFlow (0.00s) 520s === RUN TestDecodeEthernetFrameFlow 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 532 bytes 520s - 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=[]} 520s 520s --- PASS: TestDecodeEthernetFrameFlow (0.00s) 520s === RUN TestDecodePortnameCounter 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 252 bytes 520s - 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}]}]} 520s 520s --- PASS: TestDecodePortnameCounter (0.00s) 520s === RUN TestDecodeVLANCounter 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 88 bytes 520s - 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}]}]} 520s 520s --- PASS: TestDecodeVLANCounter (0.00s) 520s === RUN TestDecodeLACPCounter 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 112 bytes 520s - 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}]}]} 520s 520s --- PASS: TestDecodeLACPCounter (0.00s) 520s === RUN TestDecodeOpenflowCounter 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 244 bytes 520s - 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}]}]} 520s 520s --- PASS: TestDecodeOpenflowCounter (0.00s) 520s === RUN TestDecodeAppResourcesOvsdbCounter 520s base_test.go:19: Checking packet layers, want [SFlow] 520s base_test.go:21: Got layer SFlow, 0 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 128 bytes 520s - 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}]}]} 520s 520s --- PASS: TestDecodeAppResourcesOvsdbCounter (0.00s) 520s === RUN TestSIPMain 520s --- PASS: TestSIPMain (0.00s) 520s === RUN TestTCPOptionKindString 520s --- PASS: TestTCPOptionKindString (0.00s) 520s === RUN TestTCPSerializePadding 520s --- PASS: TestTCPSerializePadding (0.00s) 520s === RUN TestPacketTCPOptionDecode 520s --- PASS: TestPacketTCPOptionDecode (0.00s) 520s === RUN TestIPv4UDPChecksum 520s base_test.go:19: Checking packet layers, want [IPv4 UDP] 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 8 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 28 bytes 520s - 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=[]} 520s - Layer 2 (08 bytes) = UDP {Contents=[..8..] Payload=[] SrcPort=12345(italk) DstPort=9999(distinct) Length=8 Checksum=48223} 520s 520s --- PASS: TestIPv4UDPChecksum (0.00s) 520s === RUN TestIPv6UDPChecksumWithIPv6DstOpts 520s base_test.go:19: Checking packet layers, want [IPv6 IPv6Destination UDP] 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 16 bytes 520s base_test.go:21: Got layer IPv6Destination, 8 bytes, payload of 8 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 56 bytes 520s - 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} 520s - 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]}]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[] SrcPort=12345(italk) DstPort=9999(distinct) Length=8 Checksum=19745} 520s 520s --- PASS: TestIPv6UDPChecksumWithIPv6DstOpts (0.00s) 520s === RUN TestIPv6JumbogramUDPChecksum 520s base_test.go:19: Checking packet layers, want [IPv6 IPv6HopByHop UDP Payload] 520s base_test.go:21: Got layer IPv6, 40 bytes, payload of 65552 bytes 520s base_test.go:21: Got layer IPv6HopByHop, 8 bytes, payload of 65544 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 65536 bytes 520s base_test.go:21: Got layer Payload, 65536 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 65592 bytes 520s - 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]}]}} 520s - 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]}]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..65536..] SrcPort=12345(italk) DstPort=9999(distinct) Length=0 Checksum=52648} 520s - Layer 4 (65536 bytes) = Payload 65536 byte(s) 520s 520s --- PASS: TestIPv6JumbogramUDPChecksum (0.00s) 520s === RUN TestParseTLSClientHello 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 TCP TLS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 254 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 234 bytes 520s base_test.go:21: Got layer TCP, 20 bytes, payload of 214 bytes 520s base_test.go:21: Got layer TLS, 214 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 268 bytes 520s - 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} 520s - 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=[]} 520s - 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=[]} 520s - Layer 4 (214 bytes) = TLS {Contents=[..214..] Payload=[] ChangeCipherSpec=[] Handshake=[{ContentType=Handshake Version=TLS 1.0 Length=209}] AppData=[] Alert=[]} 520s 520s --- PASS: TestParseTLSClientHello (0.00s) 520s === RUN TestTLSClientHelloDecodeFromBytes 520s --- PASS: TestTLSClientHelloDecodeFromBytes (0.00s) 520s === RUN TestParseTLSChangeCipherSpec 520s base_test.go:19: Checking packet layers, want [TLS] 520s base_test.go:21: Got layer TLS, 53 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 134 bytes 520s - 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=[]} 520s 520s --- PASS: TestParseTLSChangeCipherSpec (0.00s) 520s === RUN TestParseTLSAppData 520s base_test.go:19: Checking packet layers, want [TLS] 520s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 74 bytes 520s - 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=[]} 520s 520s --- PASS: TestParseTLSAppData (0.00s) 520s === RUN TestSerializeTLSAppData 520s base_test.go:19: Checking packet layers, want [TLS] 520s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 74 bytes 520s - 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=[]} 520s 520s --- PASS: TestSerializeTLSAppData (0.00s) 520s === RUN TestParseTLSMalformed 520s --- PASS: TestParseTLSMalformed (0.00s) 520s === RUN TestParseTLSTooShort 520s --- PASS: TestParseTLSTooShort (0.00s) 520s === RUN TestParseTLSLengthMismatch 520s --- PASS: TestParseTLSLengthMismatch (0.00s) 520s === RUN TestParseTLSAlertEncrypted 520s base_test.go:19: Checking packet layers, want [TLS] 520s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 37 bytes 520s - 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..]}]} 520s 520s --- PASS: TestParseTLSAlertEncrypted (0.00s) 520s === RUN TestSerializeTLSAlertEncrypted 520s base_test.go:19: Checking packet layers, want [TLS] 520s base_test.go:21: Got layer TLS, 37 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 37 bytes 520s - 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..]}]} 520s 520s --- PASS: TestSerializeTLSAlertEncrypted (0.00s) 520s === RUN TestUDPPacketDNS 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 230 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 210 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 202 bytes 520s base_test.go:21: Got layer DNS, 202 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 244 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..202..] SrcPort=53(domain) DstPort=35181 Length=210 Checksum=30026} 520s - 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=[]} 520s 520s --- PASS: TestUDPPacketDNS (0.00s) 520s === RUN TestDNSQueryA 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 60 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 40 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 32 bytes 520s base_test.go:21: Got layer DNS, 32 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 74 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..32..] SrcPort=49973 DstPort=53(domain) Length=40 Checksum=30162} 520s - 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=[]} 520s 520s --- PASS: TestDNSQueryA (0.00s) 520s === RUN TestDNSRRA 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 292 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 272 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 264 bytes 520s base_test.go:21: Got layer DNS, 264 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 306 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..264..] SrcPort=53(domain) DstPort=49973 Length=272 Checksum=30394} 520s - 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=[]}]} 520s 520s --- PASS: TestDNSRRA (0.00s) 520s === RUN TestDNSAAAA 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 224 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 204 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 196 bytes 520s base_test.go:21: Got layer DNS, 196 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 238 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..196..] SrcPort=53(domain) DstPort=56083 Length=204 Checksum=30326} 520s - 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=[]}]} 520s 520s --- PASS: TestDNSAAAA (0.00s) 520s === RUN TestDNSMXSOA 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP DNS] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 110 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 90 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 82 bytes 520s base_test.go:21: Got layer DNS, 82 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 124 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..82..] SrcPort=53(domain) DstPort=40032 Length=90 Checksum=30212} 520s - 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=[]} 520s 520s --- PASS: TestDNSMXSOA (0.00s) 520s === RUN TestDNSDoesNotMalloc 520s --- PASS: TestDNSDoesNotMalloc (0.00s) 520s === RUN TestPacketUSB0 520s base_test.go:19: Checking packet layers, want [USB USBInterrupt] 520s base_test.go:21: Got layer USB, 40 bytes, payload of 1 bytes 520s base_test.go:21: Got layer USBInterrupt, 1 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 65 bytes 520s - 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} 520s - Layer 2 (01 bytes) = USBInterrupt {Contents=[4] Payload=[]} 520s 520s --- PASS: TestPacketUSB0 (0.00s) 520s === RUN TestVRRPPacketPacket0 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 VRRP] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 46 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 20 bytes 520s base_test.go:21: Got layer VRRP, 20 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 60 bytes 520s - 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} 520s - 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=[]} 520s - 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]} 520s 520s --- PASS: TestVRRPPacketPacket0 (0.00s) 520s === RUN TestPacketVXLAN 520s base_test.go:19: Checking packet layers, want [Ethernet IPv4 UDP VXLAN Ethernet IPv4 ICMPv4 Payload] 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 134 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 114 bytes 520s base_test.go:21: Got layer UDP, 8 bytes, payload of 106 bytes 520s base_test.go:21: Got layer VXLAN, 8 bytes, payload of 98 bytes 520s base_test.go:21: Got layer Ethernet, 14 bytes, payload of 84 bytes 520s base_test.go:21: Got layer IPv4, 20 bytes, payload of 64 bytes 520s base_test.go:21: Got layer ICMPv4, 8 bytes, payload of 56 bytes 520s base_test.go:21: Got layer Payload, 56 bytes, payload of 0 bytes 520s base_test.go:24: PACKET: 148 bytes 520s - 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} 520s - 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=[]} 520s - Layer 3 (08 bytes) = UDP {Contents=[..8..] Payload=[..106..] SrcPort=45149 DstPort=4789(vxlan) Length=114 Checksum=0} 520s - Layer 4 (08 bytes) = VXLAN {Contents=[..8..] Payload=[..98..] ValidIDFlag=true VNI=255 GBPExtension=false GBPDontLearn=false GBPApplied=false GBPGroupPolicyID=0} 520s - 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} 520s - 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=[]} 520s - Layer 7 (08 bytes) = ICMPv4 {Contents=[..8..] Payload=[..56..] TypeCode=EchoRequest Checksum=63218 Id=1292 Seq=1} 520s - Layer 8 (56 bytes) = Payload 56 byte(s) 520s 520s --- PASS: TestPacketVXLAN (0.00s) 520s === RUN TestIsomorphicPacketVXLAN 520s --- PASS: TestIsomorphicPacketVXLAN (0.00s) 520s PASS 520s ok github.com/google/gopacket/layers 0.036s 522s testing: warning: no tests to run 522s PASS 522s ok github.com/google/gopacket/macs 0.003s [no tests to run] 524s === RUN TestPcapNonexistentFile 524s pcap_test.go:26: Error returned for nonexistent file: /path/to/nonexistent/file: No such file or directory 524s --- PASS: TestPcapNonexistentFile (0.00s) 524s === RUN TestPcapFileRead 524s pcap_test.go:86: 524s 524s 524s 524s Processing file test_loopback.pcap 524s 524s 524s 524s pcap_test.go:110: -- FULL PACKET DATA (560 bytes) ------------------------------------ 524s 00000000 1e 00 00 00 60 00 00 00 02 04 06 40 00 00 00 00 |....`......@....| 524s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 e5 af 1f 90 |................| 524s 00000030 08 97 16 66 0a 65 66 ef 80 18 28 e9 02 0c 00 00 |...f.ef...(.....| 524s 00000040 01 01 08 0a 05 c0 8c fc 05 c0 38 8c 47 45 54 20 |..........8.GET | 524s 00000050 2f 70 6b 67 2f 67 69 74 68 75 62 2e 63 6f 6d 2f |/pkg/github.com/| 524s 00000060 67 63 6f 6e 6e 65 6c 6c 2f 67 6f 70 61 63 6b 65 |gconnell/gopacke| 524s 00000070 74 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 |t/ HTTP/1.1..Hos| 524s 00000080 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 38 30 38 |t: localhost:808| 524s 00000090 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b |0..Connection: k| 524s 000000a0 65 65 70 2d 61 6c 69 76 65 0d 0a 43 61 63 68 65 |eep-alive..Cache| 524s 000000b0 2d 43 6f 6e 74 72 6f 6c 3a 20 6d 61 78 2d 61 67 |-Control: max-ag| 524s 000000c0 65 3d 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a |e=0..User-Agent:| 524s 000000d0 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 4d 61 | Mozilla/5.0 (Ma| 524s 000000e0 63 69 6e 74 6f 73 68 3b 20 49 6e 74 65 6c 20 4d |cintosh; Intel M| 524s 000000f0 61 63 20 4f 53 20 58 20 31 30 5f 38 5f 32 29 20 |ac OS X 10_8_2) | 524s 00000100 41 70 70 6c 65 57 65 62 4b 69 74 2f 35 33 37 2e |AppleWebKit/537.| 524s 00000110 31 31 20 28 4b 48 54 4d 4c 2c 20 6c 69 6b 65 20 |11 (KHTML, like | 524s 00000120 47 65 63 6b 6f 29 20 43 68 72 6f 6d 65 2f 32 33 |Gecko) Chrome/23| 524s 00000130 2e 30 2e 31 32 37 31 2e 31 30 31 20 53 61 66 61 |.0.1271.101 Safa| 524s 00000140 72 69 2f 35 33 37 2e 31 31 0d 0a 41 63 63 65 70 |ri/537.11..Accep| 524s 00000150 74 3a 20 74 65 78 74 2f 68 74 6d 6c 2c 61 70 70 |t: text/html,app| 524s 00000160 6c 69 63 61 74 69 6f 6e 2f 78 68 74 6d 6c 2b 78 |lication/xhtml+x| 524s 00000170 6d 6c 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 |ml,application/x| 524s 00000180 6d 6c 3b 71 3d 30 2e 39 2c 2a 2f 2a 3b 71 3d 30 |ml;q=0.9,*/*;q=0| 524s 00000190 2e 38 0d 0a 52 65 66 65 72 65 72 3a 20 68 74 74 |.8..Referer: htt| 524s 000001a0 70 3a 2f 2f 6c 6f 63 61 6c 68 6f 73 74 3a 38 30 |p://localhost:80| 524s 000001b0 38 30 2f 70 6b 67 2f 0d 0a 41 63 63 65 70 74 2d |80/pkg/..Accept-| 524s 000001c0 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 2c 64 |Encoding: gzip,d| 524s 000001d0 65 66 6c 61 74 65 2c 73 64 63 68 0d 0a 41 63 63 |eflate,sdch..Acc| 524s 000001e0 65 70 74 2d 4c 61 6e 67 75 61 67 65 3a 20 65 6e |ept-Language: en| 524s 000001f0 2d 55 53 2c 65 6e 3b 71 3d 30 2e 38 0d 0a 41 63 |-US,en;q=0.8..Ac| 524s 00000200 63 65 70 74 2d 43 68 61 72 73 65 74 3a 20 49 53 |cept-Charset: IS| 524s 00000210 4f 2d 38 38 35 39 2d 31 2c 75 74 66 2d 38 3b 71 |O-8859-1,utf-8;q| 524s 00000220 3d 30 2e 37 2c 2a 3b 71 3d 30 2e 33 0d 0a 0d 0a |=0.7,*;q=0.3....| 524s --- Layer 1 --- 524s Loopback {Contents=[30, 0, 0, 0] Payload=[..556..] Family=IPv6} 524s 00000000 1e 00 00 00 |....| 524s --- Layer 2 --- 524s IPv6 {Contents=[..40..] Payload=[..516..] Version=6 TrafficClass=0 FlowLabel=0 Length=516 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 524s 00000000 60 00 00 00 02 04 06 40 00 00 00 00 00 00 00 00 |`......@........| 524s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 01 |........| 524s --- Layer 3 --- 524s 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=[]} 524s 00000000 e5 af 1f 90 08 97 16 66 0a 65 66 ef 80 18 28 e9 |.......f.ef...(.| 524s 00000010 02 0c 00 00 01 01 08 0a 05 c0 8c fc 05 c0 38 8c |..............8.| 524s --- Layer 4 --- 524s Payload 484 byte(s) 524s 00000000 47 45 54 20 2f 70 6b 67 2f 67 69 74 68 75 62 2e |GET /pkg/github.| 524s 00000010 63 6f 6d 2f 67 63 6f 6e 6e 65 6c 6c 2f 67 6f 70 |com/gconnell/gop| 524s 00000020 61 63 6b 65 74 2f 20 48 54 54 50 2f 31 2e 31 0d |acket/ HTTP/1.1.| 524s 00000030 0a 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 |.Host: localhost| 524s 00000040 3a 38 30 38 30 0d 0a 43 6f 6e 6e 65 63 74 69 6f |:8080..Connectio| 524s 00000050 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 43 |n: keep-alive..C| 524s 00000060 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6d 61 |ache-Control: ma| 524s 00000070 78 2d 61 67 65 3d 30 0d 0a 55 73 65 72 2d 41 67 |x-age=0..User-Ag| 524s 00000080 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 |ent: Mozilla/5.0| 524s 00000090 20 28 4d 61 63 69 6e 74 6f 73 68 3b 20 49 6e 74 | (Macintosh; Int| 524s 000000a0 65 6c 20 4d 61 63 20 4f 53 20 58 20 31 30 5f 38 |el Mac OS X 10_8| 524s 000000b0 5f 32 29 20 41 70 70 6c 65 57 65 62 4b 69 74 2f |_2) AppleWebKit/| 524s 000000c0 35 33 37 2e 31 31 20 28 4b 48 54 4d 4c 2c 20 6c |537.11 (KHTML, l| 524s 000000d0 69 6b 65 20 47 65 63 6b 6f 29 20 43 68 72 6f 6d |ike Gecko) Chrom| 524s 000000e0 65 2f 32 33 2e 30 2e 31 32 37 31 2e 31 30 31 20 |e/23.0.1271.101 | 524s 000000f0 53 61 66 61 72 69 2f 35 33 37 2e 31 31 0d 0a 41 |Safari/537.11..A| 524s 00000100 63 63 65 70 74 3a 20 74 65 78 74 2f 68 74 6d 6c |ccept: text/html| 524s 00000110 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 68 74 |,application/xht| 524s 00000120 6d 6c 2b 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69 |ml+xml,applicati| 524s 00000130 6f 6e 2f 78 6d 6c 3b 71 3d 30 2e 39 2c 2a 2f 2a |on/xml;q=0.9,*/*| 524s 00000140 3b 71 3d 30 2e 38 0d 0a 52 65 66 65 72 65 72 3a |;q=0.8..Referer:| 524s 00000150 20 68 74 74 70 3a 2f 2f 6c 6f 63 61 6c 68 6f 73 | http://localhos| 524s 00000160 74 3a 38 30 38 30 2f 70 6b 67 2f 0d 0a 41 63 63 |t:8080/pkg/..Acc| 524s 00000170 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a |ept-Encoding: gz| 524s 00000180 69 70 2c 64 65 66 6c 61 74 65 2c 73 64 63 68 0d |ip,deflate,sdch.| 524s 00000190 0a 41 63 63 65 70 74 2d 4c 61 6e 67 75 61 67 65 |.Accept-Language| 524s 000001a0 3a 20 65 6e 2d 55 53 2c 65 6e 3b 71 3d 30 2e 38 |: en-US,en;q=0.8| 524s 000001b0 0d 0a 41 63 63 65 70 74 2d 43 68 61 72 73 65 74 |..Accept-Charset| 524s 000001c0 3a 20 49 53 4f 2d 38 38 35 39 2d 31 2c 75 74 66 |: ISO-8859-1,utf| 524s 000001d0 2d 38 3b 71 3d 30 2e 37 2c 2a 3b 71 3d 30 2e 33 |-8;q=0.7,*;q=0.3| 524s 000001e0 0d 0a 0d 0a |....| 524s 524s pcap_test.go:110: -- FULL PACKET DATA (76 bytes) ------------------------------------ 524s 00000000 1e 00 00 00 60 01 88 91 00 20 06 40 00 00 00 00 |....`.... .@....| 524s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 524s 00000030 0a 65 66 ef 08 97 18 4a 80 10 23 02 00 28 00 00 |.ef....J..#..(..| 524s 00000040 01 01 08 0a 05 c0 8c fc 05 c0 8c fc |............| 524s --- Layer 1 --- 524s Loopback {Contents=[30, 0, 0, 0] Payload=[..72..] Family=IPv6} 524s 00000000 1e 00 00 00 |....| 524s --- Layer 2 --- 524s IPv6 {Contents=[..40..] Payload=[..32..] Version=6 TrafficClass=0 FlowLabel=100497 Length=32 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 524s 00000000 60 01 88 91 00 20 06 40 00 00 00 00 00 00 00 00 |`.... .@........| 524s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 01 |........| 524s --- Layer 3 --- 524s 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=[]} 524s 00000000 1f 90 e5 af 0a 65 66 ef 08 97 18 4a 80 10 23 02 |.....ef....J..#.| 524s 00000010 00 28 00 00 01 01 08 0a 05 c0 8c fc 05 c0 8c fc |.(..............| 524s 524s pcap_test.go:110: -- FULL PACKET DATA (4172 bytes) ------------------------------------ 524s 00000000 1e 00 00 00 60 01 88 91 10 20 06 40 00 00 00 00 |....`.... .@....| 524s 00000010 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 00 00 00 00 01 1f 90 e5 af |................| 524s 00000030 0a 65 66 ef 08 97 18 4a 80 18 23 02 10 28 00 00 |.ef....J..#..(..| 524s 00000040 01 01 08 0a 05 c0 8d b6 05 c0 8c fc 48 54 54 50 |............HTTP| 524s 00000050 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 44 61 74 |/1.1 200 OK..Dat| 524s 00000060 65 3a 20 53 75 6e 2c 20 30 36 20 4a 61 6e 20 32 |e: Sun, 06 Jan 2| 524s 00000070 30 31 33 20 31 37 3a 32 32 3a 33 32 20 47 4d 54 |013 17:22:32 GMT| 524s 00000080 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 |..Transfer-Encod| 524s 00000090 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 43 6f |ing: chunked..Co| 524s 000000a0 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 |ntent-Type: text| 524s 000000b0 2f 68 74 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 |/html; charset=u| 524s 000000c0 74 66 2d 38 0d 0a 0d 0a 32 30 30 0d 0a 3c 21 44 |tf-8....200.......| 524s 00000130 20 20 3c 74 69 74 6c 65 3e 67 6f 70 61 63 6b 65 | gopacke| 524s 00000140 74 20 2d 20 54 68 65 20 47 6f 20 50 72 6f 67 72 |t - The Go Progr| 524s 00000150 61 6d 6d 69 6e 67 20 4c 61 6e 67 75 61 67 65 3c |amming Language<| 524s 00000160 2f 74 69 74 6c 65 3e 0a 0a 3c 6c 69 6e 6b 20 74 |/title>..<link t| 524s 00000170 79 70 65 3d 22 74 65 78 74 2f 63 73 73 22 20 72 |ype="text/css" r| 524s 00000180 65 6c 3d 22 73 74 79 6c 65 73 68 65 65 74 22 20 |el="stylesheet" | 524s 00000190 68 72 65 66 3d 22 2f 64 6f 63 2f 73 74 79 6c 65 |href="/doc/style| 524s 000001a0 2e 63 73 73 22 3e 0a 3c 73 63 72 69 70 74 20 74 |.css">.<script t| 524s 000001b0 79 70 65 3d 22 74 65 78 74 2f 6a 61 76 61 73 63 |ype="text/javasc| 524s 000001c0 72 69 70 74 22 20 73 72 63 3d 22 2f 64 6f 63 2f |ript" src="/doc/| 524s 000001d0 67 6f 64 6f 63 73 2e 6a 73 22 3e 3c 2f 73 63 72 |godocs.js"></scr| 524s 000001e0 69 70 74 3e 0a 0a 3c 2f 68 65 61 64 3e 0a 3c 62 |ipt>..</head>.<b| 524s 000001f0 6f 64 79 3e 0a 0a 3c 64 69 76 20 69 64 3d 22 74 |ody>..<div id="t| 524s 00000200 6f 70 62 61 72 22 3e 3c 64 69 76 20 63 6c 61 73 |opbar"><div clas| 524s 00000210 73 3d 22 63 6f 6e 74 61 69 6e 65 72 20 77 69 64 |s="container wid| 524s 00000220 65 22 3e 0a 0a 3c 66 6f 72 6d 20 6d 65 74 68 6f |e">..<form metho| 524s 00000230 64 3d 22 47 45 54 22 20 61 63 74 69 6f 6e 3d 22 |d="GET" action="| 524s 00000240 2f 73 65 61 72 63 68 22 3e 0a 3c 64 69 76 20 69 |/search">.<div i| 524s 00000250 64 3d 22 6d 65 6e 75 22 3e 0a 3c 61 20 68 72 65 |d="menu">.<a hre| 524s 00000260 66 3d 22 2f 64 6f 63 2f 22 3e 44 6f 63 75 6d 65 |f="/doc/">Docume| 524s 00000270 6e 74 73 3c 2f 61 3e 0a 3c 61 20 68 72 65 66 3d |nts</a>.<a href=| 524s 00000280 22 2f 72 65 66 2f 22 3e 52 65 66 65 72 65 6e 63 |"/ref/">Referenc| 524s 00000290 65 73 3c 2f 61 3e 0a 3c 61 20 68 72 65 66 3d 22 |es</a>.<a href="| 524s 000002a0 2f 70 6b 67 2f 22 3e 50 61 63 6b 61 67 65 73 3c |/pkg/">Packages<| 524s 000002b0 2f 61 3e 0a 3c 61 20 68 72 65 66 3d 22 2f 70 72 |/a>.<a href="/pr| 524s 000002c0 6f 6a 65 63 74 2f 22 3e 54 68 65 20 50 0d 0a 64 |oject/">The P..d| 524s 000002d0 65 0d 0a 72 6f 6a 65 63 74 3c 2f 61 3e 0a 3c 61 |e..roject</a>.<a| 524s 000002e0 20 68 72 65 66 3d 22 2f 68 65 6c 70 2f 22 3e 48 | href="/help/">H| 524s 000002f0 65 6c 70 3c 2f 61 3e 0a 3c 69 6e 70 75 74 20 74 |elp</a>.<input t| 524s 00000300 79 70 65 3d 22 74 65 78 74 22 20 69 64 3d 22 73 |ype="text" id="s| 524s 00000310 65 61 72 63 68 22 20 6e 61 6d 65 3d 22 71 22 20 |earch" name="q" | 524s 00000320 63 6c 61 73 73 3d 22 69 6e 61 63 74 69 76 65 22 |class="inactive"| 524s 00000330 20 76 61 6c 75 65 3d 22 53 65 61 72 63 68 22 3e | value="Search">| 524s 00000340 0a 3c 2f 64 69 76 3e 0a 3c 64 69 76 20 69 64 3d |.</div>.<div id=| 524s 00000350 22 68 65 61 64 69 6e 67 22 3e 3c 61 20 68 72 65 |"heading"><a hre| 524s 00000360 66 3d 22 2f 22 3e 54 68 65 20 47 6f 20 50 72 6f |f="/">The Go Pro| 524s 00000370 67 72 61 6d 6d 69 6e 67 20 4c 61 6e 67 75 61 67 |gramming Languag| 524s 00000380 65 3c 2f 61 3e 3c 2f 64 69 76 3e 0a 3c 2f 66 6f |e</a></div>.</fo| 524s 00000390 72 6d 3e 0a 0a 3c 2f 64 69 76 3e 3c 2f 64 69 76 |rm>..</div></div| 524s 000003a0 3e 0a 0a 3c 64 69 76 20 69 64 3d 22 70 61 67 65 |>..<div id="page| 524s 000003b0 22 0d 0a 64 0d 0a 20 63 6c 61 73 73 3d 22 77 69 |"..d.. class="wi| 524s 000003c0 64 65 22 0d 0a 33 0d 0a 3e 0a 0a 0d 0a 35 38 0d |de"..3..>....58.| 524s 000003d0 0a 0a 20 20 3c 64 69 76 20 69 64 3d 22 70 6c 75 |.. <div id="plu| 524s 000003e0 73 6f 6e 65 22 3e 3c 67 3a 70 6c 75 73 6f 6e 65 |sone"><g:plusone| 524s 000003f0 20 73 69 7a 65 3d 22 73 6d 61 6c 6c 22 20 61 6e | size="small" an| 524s 00000400 6e 6f 74 61 74 69 6f 6e 3d 22 6e 6f 6e 65 22 3e |notation="none">| 524s 00000410 3c 2f 67 3a 70 6c 75 73 6f 6e 65 3e 3c 2f 64 69 |</g:plusone></di| 524s 00000420 76 3e 0a 20 20 3c 68 31 3e 0d 0a 31 30 0d 0a 50 |v>. <h1>..10..P| 524s 00000430 61 63 6b 61 67 65 20 67 6f 70 61 63 6b 65 74 0d |ackage gopacket.| 524s 00000440 0a 36 0d 0a 3c 2f 68 31 3e 0a 0d 0a 31 0d 0a 0a |.6..</h1>...1...| 524s 00000450 0d 0a 32 0d 0a 0a 0a 0d 0a 31 37 0d 0a 0a 3c 64 |..2......17...<d| 524s 00000460 69 76 20 69 64 3d 22 6e 61 76 22 3e 3c 2f 64 69 |iv id="nav"></di| 524s 00000470 76 3e 0a 0a 0d 0a 31 0d 0a 0a 0d 0a 63 65 39 34 |v>....1.....ce94| 524s 00000480 0d 0a 3c 21 2d 2d 0a 09 43 6f 70 79 72 69 67 68 |..<!--..Copyrigh| 524s 00000490 74 20 32 30 30 39 20 54 68 65 20 47 6f 20 41 75 |t 2009 The Go Au| 524s 000004a0 74 68 6f 72 73 2e 20 41 6c 6c 20 72 69 67 68 74 |thors. All right| 524s 000004b0 73 20 72 65 73 65 72 76 65 64 2e 0a 09 55 73 65 |s reserved...Use| 524s 000004c0 20 6f 66 20 74 68 69 73 20 73 6f 75 72 63 65 20 | of this source | 524s 000004d0 63 6f 64 65 20 69 73 20 67 6f 76 65 72 6e 65 64 |code is governed| 524s 000004e0 20 62 79 20 61 20 42 53 44 2d 73 74 79 6c 65 0a | by a BSD-style.| 524s 000004f0 09 6c 69 63 65 6e 73 65 20 74 68 61 74 20 63 61 |.license that ca| 524s 00000500 6e 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 |n be found in th| 524s 00000510 65 20 4c 49 43 45 4e 53 45 20 66 69 6c 65 2e 0a |e LICENSE file..| 524s 00000520 2d 2d 3e 0a 3c 21 2d 2d 0a 09 4e 6f 74 65 3a 20 |-->.<!--..Note: | 524s 00000530 53 74 61 74 69 63 20 28 69 2e 65 2e 2c 20 6e 6f |Static (i.e., no| 524s 00000540 74 20 74 65 6d 70 6c 61 74 65 2d 67 65 6e 65 72 |t template-gener| 524s 00000550 61 74 65 64 29 20 68 72 65 66 20 61 6e 64 20 69 |ated) href and i| 524s 00000560 64 0a 09 61 74 74 72 69 62 75 74 65 73 20 73 74 |d..attributes st| 524s 00000570 61 72 74 20 77 69 74 68 20 22 70 6b 67 2d 22 20 |art with "pkg-" | 524s 00000580 74 6f 20 6d 61 6b 65 20 69 74 20 69 6d 70 6f 73 |to make it impos| 524s 00000590 73 69 62 6c 65 20 66 6f 72 0a 09 74 68 65 6d 20 |sible for..them | 524s 000005a0 74 6f 20 63 6f 6e 66 6c 69 63 74 20 77 69 74 68 |to conflict with| 524s 000005b0 20 67 65 6e 65 72 61 74 65 64 20 61 74 74 72 69 | generated attri| 524s 000005c0 62 75 74 65 73 20 28 73 6f 6d 65 20 6f 66 20 77 |butes (some of w| 524s 000005d0 68 69 63 68 0a 09 63 6f 72 72 65 73 70 6f 6e 64 |hich..correspond| 524s 000005e0 20 74 6f 20 47 6f 20 69 64 65 6e 74 69 66 69 65 | to Go identifie| 524s 000005f0 72 73 29 2e 0a 2d 2d 3e 0a 0a 09 0a 09 09 3c 64 |rs)..-->......<d| 524s 00000600 69 76 20 69 64 3d 22 73 68 6f 72 74 2d 6e 61 76 |iv id="short-nav| 524s 00000610 22 3e 0a 09 09 09 3c 64 6c 3e 0a 09 09 09 3c 64 |">....<dl>....<d| 524s 00000620 64 3e 3c 63 6f 64 65 3e 69 6d 70 6f 72 74 20 22 |d><code>import "| 524s 00000630 67 69 74 68 75 62 2e 63 6f 6d 2f 67 63 6f 6e 6e |github.com/gconn| 524s 00000640 65 6c 6c 2f 67 6f 70 61 63 6b 65 74 22 3c 2f 63 |ell/gopacket"</c| 524s 00000650 6f 64 65 3e 3c 2f 64 64 3e 0a 09 09 09 3c 2f 64 |ode></dd>....</d| 524s 00000660 6c 3e 0a 09 09 09 3c 64 6c 3e 0a 09 09 09 3c 64 |l>....<dl>....<d| 524s 00000670 64 3e 3c 61 20 68 72 65 66 3d 22 23 70 6b 67 2d |d><a href="#pkg-| 524s 00000680 6f 76 65 72 76 69 65 77 22 20 63 6c 61 73 73 3d |overview" class=| 524s 00000690 22 6f 76 65 72 76 69 65 77 4c 69 6e 6b 22 3e 4f |"overviewLink">O| 524s 000006a0 76 65 72 76 69 65 77 3c 2f 61 3e 3c 2f 64 64 3e |verview</a></dd>| 524s 000006b0 0a 09 09 09 3c 64 64 3e 3c 61 20 68 72 65 66 3d |....<dd><a href=| 524s 000006c0 22 23 70 6b 67 2d 69 6e 64 65 78 22 3e 49 6e 64 |"#pkg-index">Ind| 524s 000006d0 65 78 3c 2f 61 3e 3c 2f 64 64 3e 0a 09 09 09 0a |ex</a></dd>.....| 524s 000006e0 09 09 09 0a 09 09 09 0a 09 09 09 09 3c 64 64 3e |............<dd>| 524s 000006f0 3c 61 20 68 72 65 66 3d 22 23 70 6b 67 2d 73 75 |<a href="#pkg-su| 524s 00000700 62 64 69 72 65 63 74 6f 72 69 65 73 22 3e 53 75 |bdirectories">Su| 524s 00000710 62 64 69 72 65 63 74 6f 72 69 65 73 3c 2f 61 3e |bdirectories</a>| 524s 00000720 3c 2f 64 64 3e 0a 09 09 09 0a 09 09 09 3c 2f 64 |</dd>........</d| 524s 00000730 6c 3e 0a 09 09 3c 2f 64 69 76 3e 0a 09 09 3c 21 |l>...</div>...<!| 524s 00000740 2d 2d 20 54 68 65 20 70 61 63 6b 61 67 65 27 73 |-- The package's| 524s 00000750 20 4e 61 6d 65 20 69 73 20 70 72 69 6e 74 65 64 | Name is printed| 524s 00000760 20 61 73 20 74 69 74 6c 65 20 62 79 20 74 68 65 | as title by the| 524s 00000770 20 74 6f 70 2d 6c 65 76 65 6c 20 74 65 6d 70 6c | top-level templ| 524s 00000780 61 74 65 20 2d 2d 3e 0a 09 09 3c 64 69 76 20 69 |ate -->...<div i| 524s 00000790 64 3d 22 70 6b 67 2d 6f 76 65 72 76 69 65 77 22 |d="pkg-overview"| 524s 000007a0 20 63 6c 61 73 73 3d 22 74 6f 67 67 6c 65 56 69 | class="toggleVi| 524s 000007b0 73 69 62 6c 65 22 3e 0a 09 09 09 3c 64 69 76 20 |sible">....<div | 524s 000007c0 63 6c 61 73 73 3d 22 63 6f 6c 6c 61 70 73 65 64 |class="collapsed| 524s 000007d0 22 3e 0a 09 09 09 09 3c 68 32 20 63 6c 61 73 73 |">.....<h2 class| 524s 000007e0 3d 22 74 6f 67 67 6c 65 42 75 74 74 6f 6e 22 20 |="toggleButton" | 524s 000007f0 74 69 74 6c 65 3d 22 43 6c 69 63 6b 20 74 6f 20 |title="Click to | 524s 00000800 73 68 6f 77 20 4f 76 65 72 76 69 65 77 20 73 65 |show Overview se| 524s 00000810 63 74 69 6f 6e 22 3e 4f 76 65 72 76 69 65 77 20 |ction">Overview | 524s 00000820 e2 96 b9 3c 2f 68 32 3e 0a 09 09 09 3c 2f 64 69 |...</h2>....</di| 524s 00000830 76 3e 0a 09 09 09 3c 64 69 76 20 63 6c 61 73 73 |v>....<div class| 524s 00000840 3d 22 65 78 70 61 6e 64 65 64 22 3e 0a 09 09 09 |="expanded">....| 524s 00000850 09 3c 68 32 20 63 6c 61 73 73 3d 22 74 6f 67 67 |.<h2 class="togg| 524s 00000860 6c 65 42 75 74 74 6f 6e 22 20 74 69 74 6c 65 3d |leButton" title=| 524s 00000870 22 43 6c 69 63 6b 20 74 6f 20 68 69 64 65 20 4f |"Click to hide O| 524s 00000880 76 65 72 76 69 65 77 20 73 65 63 74 69 6f 6e 22 |verview section"| 524s 00000890 3e 4f 76 65 72 76 69 65 77 20 e2 96 be 3c 2f 68 |>Overview ...</h| 524s 000008a0 32 3e 0a 09 09 09 09 3c 70 3e 0a 50 61 63 6b 61 |2>.....<p>.Packa| 524s 000008b0 67 65 20 67 6f 70 61 63 6b 65 74 20 70 72 6f 76 |ge gopacket prov| 524s 000008c0 69 64 65 73 20 70 61 63 6b 65 74 20 64 65 63 6f |ides packet deco| 524s 000008d0 64 69 6e 67 20 66 6f 72 20 74 68 65 20 47 6f 20 |ding for the Go | 524s 000008e0 6c 61 6e 67 75 61 67 65 2e 0a 3c 2f 70 3e 0a 3c |language..</p>.<| 524s 000008f0 70 3e 0a 67 6f 70 61 63 6b 65 74 20 63 6f 6e 74 |p>.gopacket cont| 524s 00000900 61 69 6e 73 20 33 20 73 75 62 2d 70 61 63 6b 61 |ains 3 sub-packa| 524s 00000910 67 65 73 20 77 69 74 68 20 61 64 64 69 74 69 6f |ges with additio| 524s 00000920 6e 61 6c 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 |nal functionalit| 524s 00000930 79 20 79 6f 75 20 6d 61 79 20 66 69 6e 64 0a 75 |y you may find.u| 524s 00000940 73 65 66 75 6c 3a 0a 3c 2f 70 3e 0a 3c 70 72 65 |seful:.</p>.<pre| 524s 00000950 3e 2a 20 6c 61 79 65 72 73 3a 20 59 6f 75 26 23 |>* layers: You&#| 524s 00000960 33 39 3b 6c 6c 20 70 72 6f 62 61 62 6c 79 20 75 |39;ll probably u| 524s 00000970 73 65 20 74 68 69 73 20 65 76 65 72 79 20 74 69 |se this every ti| 524s 00000980 6d 65 2e 20 20 54 68 69 73 20 63 6f 6e 74 61 69 |me. This contai| 524s 00000990 6e 73 20 6f 66 20 74 68 65 20 6c 6f 67 69 63 0a |ns of the logic.| 524s 000009a0 20 20 20 20 62 75 69 6c 74 20 69 6e 74 6f 20 67 | built into g| 524s 000009b0 6f 70 61 63 6b 65 74 20 66 6f 72 20 64 65 63 6f |opacket for deco| 524s 000009c0 64 69 6e 67 20 70 61 63 6b 65 74 20 70 72 6f 74 |ding packet prot| 524s 000009d0 6f 63 6f 6c 73 2e 20 20 4e 6f 74 65 20 74 68 61 |ocols. Note tha| 524s 000009e0 74 20 61 6c 6c 20 65 78 61 6d 70 6c 65 0a 20 20 |t all example. | 524s 000009f0 20 20 63 6f 64 65 20 62 65 6c 6f 77 20 61 73 73 | code below ass| 524s 00000a00 75 6d 65 73 20 74 68 61 74 20 79 6f 75 20 68 61 |umes that you ha| 524s 00000a10 76 65 20 69 6d 70 6f 72 74 65 64 20 62 6f 74 68 |ve imported both| 524s 00000a20 20 67 6f 70 61 63 6b 65 74 20 61 6e 64 0a 20 20 | gopacket and. | 524s 00000a30 20 20 67 6f 70 61 63 6b 65 74 2f 6c 61 79 65 72 | gopacket/layer| 524s 00000a40 73 2e 0a 2a 20 70 63 61 70 3a 20 43 20 62 69 6e |s..* pcap: C bin| 524s 00000a50 64 69 6e 67 73 20 74 6f 20 75 73 65 20 6c 69 62 |dings to use lib| 524s 00000a60 70 63 61 70 20 74 6f 20 70 75 6c 6c 20 70 61 63 |pcap to pull pac| 524s 00000a70 6b 65 74 73 20 6f 66 66 20 74 68 65 20 77 69 72 |kets off the wir| 524s 00000a80 65 2e 0a 2a 20 70 66 72 69 6e 67 3a 20 43 20 62 |e..* pfring: C b| 524s 00000a90 69 6e 64 69 6e 67 73 20 74 6f 20 75 73 65 20 50 |indings to use P| 524s 00000aa0 46 5f 52 49 4e 47 20 74 6f 20 70 75 6c 6c 20 70 |F_RING to pull p| 524s 00000ab0 61 63 6b 65 74 73 20 6f 66 66 20 74 68 65 20 77 |ackets off the w| 524s 00000ac0 69 72 65 2e 0a 3c 2f 70 72 65 3e 0a 3c 68 33 20 |ire..</pre>.<h3 | 524s 00000ad0 69 64 3d 22 42 61 73 69 63 5f 55 73 61 67 65 22 |id="Basic_Usage"| 524s 00000ae0 3e 42 61 73 69 63 20 55 73 61 67 65 3c 2f 68 33 |>Basic Usage</h3| 524s 00000af0 3e 0a 3c 70 3e 0a 67 6f 70 61 63 6b 65 74 20 74 |>.<p>.gopacket t| 524s 00000b00 61 6b 65 73 20 69 6e 20 70 61 63 6b 65 74 20 64 |akes in packet d| 524s 00000b10 61 74 61 20 61 73 20 61 20 5b 5d 62 79 74 65 20 |ata as a []byte | 524s 00000b20 61 6e 64 20 64 65 63 6f 64 65 73 20 69 74 20 69 |and decodes it i| 524s 00000b30 6e 74 6f 20 61 20 70 61 63 6b 65 74 20 77 69 74 |nto a packet wit| 524s 00000b40 68 0a 61 20 6e 6f 6e 2d 7a 65 72 6f 20 6e 75 6d |h.a non-zero num| 524s 00000b50 62 65 72 20 6f 66 20 26 23 33 34 3b 6c 61 79 65 |ber of "laye| 524s 00000b60 72 73 26 23 33 34 3b 2e 20 20 45 61 63 68 20 6c |rs". Each l| 524s 00000b70 61 79 65 72 20 63 6f 72 72 65 73 70 6f 6e 64 73 |ayer corresponds| 524s 00000b80 20 74 6f 20 61 20 70 72 6f 74 6f 63 6f 6c 0a 77 | to a protocol.w| 524s 00000b90 69 74 68 69 6e 20 74 68 65 20 62 79 74 65 73 2e |ithin the bytes.| 524s 00000ba0 20 20 4f 6e 63 65 20 61 20 70 61 63 6b 65 74 20 | Once a packet | 524s 00000bb0 68 61 73 20 62 65 65 6e 20 64 65 63 6f 64 65 64 |has been decoded| 524s 00000bc0 2c 20 74 68 65 20 6c 61 79 65 72 73 20 6f 66 20 |, the layers of | 524s 00000bd0 74 68 65 20 70 61 63 6b 65 74 0a 63 61 6e 20 62 |the packet.can b| 524s 00000be0 65 20 72 65 71 75 65 73 74 65 64 20 66 72 6f 6d |e requested from| 524s 00000bf0 20 74 68 65 20 70 61 63 6b 65 74 2e 0a 3c 2f 70 | the packet..</p| 524s 00000c00 3e 0a 3c 70 72 65 3e 2f 2f 20 44 65 63 6f 64 65 |>.<pre>// Decode| 524s 00000c10 20 61 20 70 61 63 6b 65 74 0a 70 61 63 6b 65 74 | a packet.packet| 524s 00000c20 20 3a 3d 20 67 6f 70 61 63 6b 65 74 2e 4e 65 77 | := gopacket.New| 524s 00000c30 50 61 63 6b 65 74 28 6d 79 50 61 63 6b 65 74 44 |Packet(myPacketD| 524s 00000c40 61 74 61 2c 20 6c 61 79 65 72 73 2e 4c 61 79 65 |ata, layers.Laye| 524s 00000c50 72 54 79 70 65 45 74 68 65 72 6e 65 74 2c 20 67 |rTypeEthernet, g| 524s 00000c60 6f 70 61 63 6b 65 74 2e 44 65 66 61 75 6c 74 29 |opacket.Default)| 524s 00000c70 0a 2f 2f 20 47 65 74 20 74 68 65 20 54 43 50 20 |.// Get the TCP | 524s 00000c80 6c 61 79 65 72 20 66 72 6f 6d 20 74 68 69 73 20 |layer from this | 524s 00000c90 70 61 63 6b 65 74 0a 69 66 20 74 63 70 4c 61 79 |packet.if tcpLay| 524s 00000ca0 65 72 20 3a 3d 20 70 61 63 6b 65 74 2e 4c 61 79 |er := packet.Lay| 524s 00000cb0 65 72 28 6c 61 79 65 72 73 2e 4c 61 79 65 72 54 |er(layers.LayerT| 524s 00000cc0 79 70 65 54 43 50 29 3b 20 74 63 70 4c 61 79 65 |ypeTCP); tcpLaye| 524s 00000cd0 72 20 21 3d 20 6e 69 6c 20 7b 0a 20 20 66 6d 74 |r != nil {. fmt| 524s 00000ce0 2e 50 72 69 6e 74 6c 6e 28 26 23 33 34 3b 54 68 |.Println("Th| 524s 00000cf0 69 73 20 69 73 20 61 20 54 43 50 20 70 61 63 6b |is is a TCP pack| 524s 00000d00 65 74 21 26 23 33 34 3b 29 0a 20 20 2f 2f 20 47 |et!"). // G| 524s 00000d10 65 74 20 61 63 74 75 61 6c 20 54 43 50 20 64 61 |et actual TCP da| 524s 00000d20 74 61 20 66 72 6f 6d 20 74 68 69 73 20 6c 61 79 |ta from this lay| 524s 00000d30 65 72 0a 20 20 74 63 70 2c 20 5f 20 3a 3d 20 74 |er. tcp, _ := t| 524s 00000d40 63 70 4c 61 79 65 72 2e 28 2a 6c 61 79 65 72 73 |cpLayer.(*layers| 524s 00000d50 2e 54 43 50 29 0a 20 20 66 6d 74 2e 50 72 69 6e |.TCP). fmt.Prin| 524s 00000d60 74 66 28 26 23 33 34 3b 46 72 6f 6d 20 73 72 63 |tf("From src| 524s 00000d70 20 70 6f 72 74 20 25 64 20 74 6f 20 64 73 74 20 | port %d to dst | 524s 00000d80 70 6f 72 74 20 25 64 5c 6e 26 23 33 34 3b 2c 20 |port %d\n", | 524s 00000d90 74 63 70 2e 53 72 63 50 6f 72 74 2c 20 74 63 70 |tcp.SrcPort, tcp| 524s 00000da0 2e 44 73 74 50 6f 72 74 29 0a 7d 0a 2f 2f 20 49 |.DstPort).}.// I| 524s 00000db0 74 65 72 61 74 65 20 6f 76 65 72 20 61 6c 6c 20 |terate over all | 524s 00000dc0 6c 61 79 65 72 73 2c 20 70 72 69 6e 74 69 6e 67 |layers, printing| 524s 00000dd0 20 6f 75 74 20 65 61 63 68 20 6c 61 79 65 72 20 | out each layer | 524s 00000de0 74 79 70 65 0a 66 6f 72 20 6c 61 79 65 72 20 3a |type.for layer :| 524s 00000df0 3d 20 72 61 6e 67 65 20 70 61 63 6b 65 74 2e 4c |= range packet.L| 524s 00000e00 61 79 65 72 73 28 29 20 7b 0a 20 20 66 6d 74 2e |ayers() {. fmt.| 524s 00000e10 50 72 69 6e 74 6c 6e 28 26 23 33 34 3b 50 41 43 |Println("PAC| 524s 00000e20 4b 45 54 20 4c 41 59 45 52 3a 26 23 33 34 3b 2c |KET LAYER:",| 524s 00000e30 20 6c 61 79 65 72 2e 4c 61 79 65 72 54 79 70 65 | layer.LayerType| 524s 00000e40 28 29 29 0a 7d 0a 3c 2f 70 72 65 3e 0a 3c 70 3e |()).}.</pre>.<p>| 524s 00000e50 0a 50 61 63 6b 65 74 73 20 63 61 6e 20 62 65 20 |.Packets can be | 524s 00000e60 64 65 63 6f 64 65 64 20 66 72 6f 6d 20 61 20 6e |decoded from a n| 524s 00000e70 75 6d 62 65 72 20 6f 66 20 73 74 61 72 74 69 6e |umber of startin| 524s 00000e80 67 20 70 6f 69 6e 74 73 2e 20 20 4d 61 6e 79 20 |g points. Many | 524s 00000e90 6f 66 20 6f 75 72 20 62 61 73 65 0a 74 79 70 65 |of our base.type| 524s 00000ea0 73 20 69 6d 70 6c 65 6d 65 6e 74 20 44 65 63 6f |s implement Deco| 524s 00000eb0 64 65 72 2c 20 77 68 69 63 68 20 61 6c 6c 6f 77 |der, which allow| 524s 00000ec0 20 75 73 20 74 6f 20 64 65 63 6f 64 65 20 70 61 | us to decode pa| 524s 00000ed0 63 6b 65 74 73 20 66 6f 72 20 77 68 69 63 68 0a |ckets for which.| 524s 00000ee0 77 65 20 64 6f 6e 26 23 33 39 3b 74 20 68 61 76 |we don't hav| 524s 00000ef0 65 20 66 75 6c 6c 20 64 61 74 61 2e 0a 3c 2f 70 |e full data..</p| 524s 00000f00 3e 0a 3c 70 72 65 3e 2f 2f 20 44 65 63 6f 64 65 |>.<pre>// Decode| 524s 00000f10 20 61 6e 20 65 74 68 65 72 6e 65 74 20 70 61 63 | an ethernet pac| 524s 00000f20 6b 65 74 0a 65 74 68 50 20 3a 3d 20 67 6f 70 61 |ket.ethP := gopa| 524s 00000f30 63 6b 65 74 2e 4e 65 77 50 61 63 6b 65 74 28 70 |cket.NewPacket(p| 524s 00000f40 31 2c 20 6c 61 79 65 72 73 2e 4c 61 79 65 72 54 |1, layers.LayerT| 524s 00000f50 79 70 65 45 74 68 65 72 6e 65 74 2c 20 67 6f 70 |ypeEthernet, gop| 524s 00000f60 61 63 6b 65 74 2e 44 65 66 61 75 6c 74 29 0a 2f |acket.Default)./| 524s 00000f70 2f 20 44 65 63 6f 64 65 20 61 6e 20 49 50 76 36 |/ Decode an IPv6| 524s 00000f80 20 68 65 61 64 65 72 20 61 6e 64 20 65 76 65 72 | header and ever| 524s 00000f90 79 74 68 69 6e 67 20 69 74 20 63 6f 6e 74 61 69 |ything it contai| 524s 00000fa0 6e 73 0a 69 70 50 20 3a 3d 20 67 6f 70 61 63 6b |ns.ipP := gopack| 524s 00000fb0 65 74 2e 4e 65 77 50 61 63 6b 65 74 28 70 32 2c |et.NewPacket(p2,| 524s 00000fc0 20 6c 61 79 65 72 73 2e 4c 61 79 65 72 54 79 70 | layers.LayerTyp| 524s 00000fd0 65 49 50 76 36 2c 20 67 6f 70 61 63 6b 65 74 2e |eIPv6, gopacket.| 524s 00000fe0 44 65 66 61 75 6c 74 29 0a 2f 2f 20 44 65 63 6f |Default).// Deco| 524s 00000ff0 64 65 20 61 20 54 43 50 20 68 65 61 64 65 72 20 |de a TCP header | 524s 00001000 61 6e 64 20 69 74 73 20 70 61 79 6c 6f 61 64 0a |and its payload.| 524s 00001010 74 63 70 50 20 3a 3d 20 67 6f 70 61 63 6b 65 74 |tcpP := gopacket| 524s 00001020 2e 4e 65 77 50 61 63 6b 65 74 28 70 33 2c 20 6c |.NewPacket(p3, l| 524s 00001030 61 79 65 72 73 2e 4c 61 79 65 72 54 79 70 65 54 |ayers.LayerTypeT| 524s 00001040 43 50 2c 20 67 6f 70 61 63 6b 65 74 |CP, gopacket| 524s --- Layer 1 --- 524s Loopback {Contents=[30, 0, 0, 0] Payload=[..4168..] Family=IPv6} 524s 00000000 1e 00 00 00 |....| 524s --- Layer 2 --- 524s IPv6 {Contents=[..40..] Payload=[..4128..] Version=6 TrafficClass=0 FlowLabel=100497 Length=4128 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 524s 00000000 60 01 88 91 10 20 06 40 00 00 00 00 00 00 00 00 |`.... .@........| 524s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 01 |........| 524s --- Layer 3 --- 524s 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=[]} 524s 00000000 1f 90 e5 af 0a 65 66 ef 08 97 18 4a 80 18 23 02 |.....ef....J..#.| 524s 00000010 10 28 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |.(..............| 524s --- Layer 4 --- 524s Payload 4096 byte(s) 524s 00000000 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.| 524s 00000010 0a 44 61 74 65 3a 20 53 75 6e 2c 20 30 36 20 4a |.Date: Sun, 06 J| 524s 00000020 61 6e 20 32 30 31 33 20 31 37 3a 32 32 3a 33 32 |an 2013 17:22:32| 524s 00000030 20 47 4d 54 0d 0a 54 72 61 6e 73 66 65 72 2d 45 | GMT..Transfer-E| 524s 00000040 6e 63 6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 |ncoding: chunked| 524s 00000050 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 |..Content-Type: | 524s 00000060 74 65 78 74 2f 68 74 6d 6c 3b 20 63 68 61 72 73 |text/html; chars| 524s 00000070 65 74 3d 75 74 66 2d 38 0d 0a 0d 0a 32 30 30 0d |et=utf-8....200.| 524s 00000080 0a 3c 21 44 4f 43 54 59 50 45 20 68 74 6d 6c 3e |.<!DOCTYPE html>| 524s 00000090 0a 3c 68 74 6d 6c 3e 0a 3c 68 65 61 64 3e 0a 3c |.<html>.<head>.<| 524s 000000a0 6d 65 74 61 20 68 74 74 70 2d 65 71 75 69 76 3d |meta http-equiv=| 524s 000000b0 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 20 63 |"Content-Type" c| 524s 000000c0 6f 6e 74 65 6e 74 3d 22 74 65 78 74 2f 68 74 6d |ontent="text/htm| 524s 000000d0 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 |l; charset=utf-8| 524s 000000e0 22 3e 0a 0a 20 20 3c 74 69 74 6c 65 3e 67 6f 70 |">.. <title>gop| 524s 000000f0 61 63 6b 65 74 20 2d 20 54 68 65 20 47 6f 20 50 |acket - The Go P| 524s 00000100 72 6f 67 72 61 6d 6d 69 6e 67 20 4c 61 6e 67 75 |rogramming Langu| 524s 00000110 61 67 65 3c 2f 74 69 74 6c 65 3e 0a 0a 3c 6c 69 |age...<| 524s 00000190 2f 73 63 72 69 70 74 3e 0a 0a 3c 2f 68 65 61 64 |/script>.....
.The Go| 524s 00000320 20 50 72 6f 67 72 61 6d 6d 69 6e 67 20 4c 61 6e | Programming Lan| 524s 00000330 67 75 61 67 65 3c 2f 61 3e 3c 2f 64 69 76 3e 0a |guage
.| 524s 00000340 3c 2f 66 6f 72 6d 3e 0a 0a 3c 2f 64 69 76 3e 3c |..<| 524s 00000350 2f 64 69 76 3e 0a 0a 3c 64 69 76 20 69 64 3d 22 |/div>..
...| 524s 00000380 0a 35 38 0d 0a 0a 20 20 3c 64 69 76 20 69 64 3d |.58...
| 524s 000003d0 3c 2f 64 69 76 3e 0a 20 20 3c 68 31 3e 0d 0a 31 |
.

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

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

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

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

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

.....

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

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

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

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

.

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

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

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

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

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

.

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

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

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

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

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

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

.

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

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

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

.

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

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

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

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

.

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

....

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

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

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

.

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

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

.

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

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

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

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

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

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

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

.

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

.

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

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

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

.

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

.

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

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

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

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

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

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

.

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

.

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

.

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

..| 524s 00004000 09 09 09 3c |...<| 524s --- Layer 1 --- 524s Loopback {Contents=[30, 0, 0, 0] Payload=[..16384..] Family=IPv6} 524s 00000000 1e 00 00 00 |....| 524s --- Layer 2 --- 524s IPv6 {Contents=[..40..] Payload=[..16344..] Version=6 TrafficClass=0 FlowLabel=100497 Length=16344 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 524s 00000000 60 01 88 91 3f d8 06 40 00 00 00 00 00 00 00 00 |`...?..@........| 524s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 01 |........| 524s --- Layer 3 --- 524s 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=[]} 524s 00000000 1f 90 e5 af 0a 65 b6 a7 08 97 18 4a 80 10 23 02 |.....e.....J..#.| 524s 00000010 3f e0 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |?...............| 524s --- Layer 4 --- 524s Payload 16312 byte(s) 524s 00000000 3e 56 61 72 69 61 62 6c 65 73 3c 2f 68 32 3e 0a |>Variables

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

type ErrorLayer

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

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

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

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

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

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

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

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

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

func NewFlow

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func NewPacket

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

........| 524s 00003ff0 09 09 09 0a 0a 09 09 09 0a 0a 09 09 09 0a 0a 09 |................| 524s 00004000 09 09 0a 09 |....| 524s --- Layer 1 --- 524s Loopback {Contents=[30, 0, 0, 0] Payload=[..16384..] Family=IPv6} 524s 00000000 1e 00 00 00 |....| 524s --- Layer 2 --- 524s IPv6 {Contents=[..40..] Payload=[..16344..] Version=6 TrafficClass=0 FlowLabel=100497 Length=16344 NextHeader=TCP HopLimit=64 SrcIP=::1 DstIP=::1 HopByHop=nil} 524s 00000000 60 01 88 91 3f d8 06 40 00 00 00 00 00 00 00 00 |`...?..@........| 524s 00000010 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 |................| 524s 00000020 00 00 00 00 00 00 00 01 |........| 524s --- Layer 3 --- 524s 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=[]} 524s 00000000 1f 90 e5 af 0a 65 f6 5f 08 97 18 4a 80 10 23 02 |.....e._...J..#.| 524s 00000010 3f e0 00 00 01 01 08 0a 05 c0 8d b6 05 c0 8c fc |?...............| 524s --- Layer 4 --- 524s Payload 16312 byte(s) 524s 00000000 70 72 65 3e 66 75 6e 63 20 4e 65 77 4c 61 79 65 |pre>func NewLaye| 524s 00000010 72 43 6c 61 73 73 4d 61 70 28 74 79 70 65 73 20 |rClassMap(types | 524s 00000020 5b 5d 4c 61 79 65 72 54 79 70 65 29 20 4c 61 79 |[]LayerType) Lay| 524s 00000030 65 72 43 6c 61 73 73 4d 61 70 3c 2f 70 72 65 3e |erClassMap

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

type LinkLayer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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