Date: Wed, 6 Mar 2019 13:53:22 +0100 From: Goran =?utf-8?B?TWVracSH?= <meka@tilda.center> To: "Andrey V. Elsukov" <bu7cher@yandex.ru> Cc: freebsd-net@freebsd.org Subject: Re: UDP broadcast Message-ID: <20190306125322.f6v6cir4qtpfz2g5@hal9000.home.meka.rs> In-Reply-To: <d4e82410-d79e-e8b7-8ae9-d282691416af@yandex.ru> References: <20190305224610.frw5ov5bn6f3xaqg@hal9000.home.meka.rs> <d4e82410-d79e-e8b7-8ae9-d282691416af@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--tu22a7aba6iwggue Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 06, 2019 at 03:37:04PM +0300, Andrey V. Elsukov wrote: > On 06.03.2019 01:46, Goran Meki=C4=87 wrote: > I think it is because netcat does not send real broadcast, you can add > -e flag to tcpdump and compare ethernet destination addresses. We might be on track here. I get this on router (first is nc from my machine, second is android app): tcpdump -e -nnSX -v -i bridge0 'dst 255.255.255.255 or src 192.168.5.80' tcpdump: listening on bridge0, link-type EN10MB (Ethernet), capture size 26= 2144 bytes 13:42:47.313189 bc:ae:c5:e1:31:d0 > 02:c9:63:0b:f4:00, ethertype IPv4 (0x08= 00), length 60: (tos 0x0, ttl 64, id 65271, offset 0, flags [none], proto U= DP (17), length 36) 192.168.5.94.26375 > 255.255.255.255.10024: UDP, length 8 0x0000: 4500 0024 fef7 0000 4011 b5cb c0a8 055e E..$....@......^ 0x0010: ffff ffff 6707 2728 0010 9ec8 2f69 6e66 ....g.'(..../inf 0x0020: 6f00 0000 0000 0000 0000 0000 0000 o............. 13:43:12.540319 bc:a5:8b:ad:71:4c > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x08= 00), length 50: (tos 0x0, ttl 64, id 26278, offset 0, flags [DF], proto UDP= (17), length 36) 192.168.5.79.34717 > 255.255.255.255.10024: UDP, length 8 0x0000: 4500 0024 66a6 4000 4011 0e2c c0a8 054f E..$f.@.@..,...O 0x0010: ffff ffff 879d 2728 0010 7e41 2f69 6e66 ......'(..~A/inf 0x0020: 6f00 0000 o... I checked, and 02:c9:63:0b:f4:00 is my router MAC, so I suppose the ff:ff:ff:ff:ff:ff should be what I see. Of course, I tried to write a simple C program that does the same, but just using 255.255.255.255 as IP address gives the same result as nc. Do I need to use raw sockets, perheps? Regards, meka --tu22a7aba6iwggue Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAlx/wr8ACgkQWj1Tknov rLZWZw/9ECk7/cYktYr+lenNj2dGcqBjpErXGcrq47tWtwzuBtOZAOFpeK7Do5EJ 5eoSMbLgJ1FEY6G904caeHcT70/XWCLH66IrgAKZORatOWHz8hB5/YFO6tZh4zGg cFHzodn733wZY4hvRAhiq2yIWbID3Pow5wpxGLlBDpa4YOLzXslCOKDjJLSai6en 1biIU7ADEZXTmureZafz1YwuakgtT93rcpgzUod3Df8Lb88iMvG6DK/iIumUl27d eP80MiazIlqQG5NTSD47NPvOVUH+3cDekXRxX7LqIwRNrkifdLosuBRLKDhiSFXd UE6FMyl2MSm/uLCarV2xetGO9QS3aGv4fDUwSueU4zJFSJ0GkMVHp+CXXmakt1Cf dDiTt7nV9hxADOffVKRoJw/cQRGMAim9FNEPBD51MxShtcRjAAsvE8WUAi1TBOEj Z0ENAkRsmrTHMkKklU2wnRkWhxFp9wAQkn9REhNaAiwiZD4NvdGMC96n31crY5Bj 0m2PGF+/1iFK0QrnnE9u6Wb9eFJxfF7rKDsFH5NMfrz1NkQGATWRjBvTB3tcKjCG aEfz3JuL60zdazt3b0Nas1I83a35bkZ4je+O8UuDCrb7SdXvyZPebUU3ujGL6Jvm z0Y1mVgRyFlbyW3caY8Gerzu3FrcW4nBLOo1u5AWI8AjCO5Anzc= =3gOP -----END PGP SIGNATURE----- --tu22a7aba6iwggue--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190306125322.f6v6cir4qtpfz2g5>