L2PING(8)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– L2PING β€” bestie edition πŸ’–

okay so real talk, this is the l2ping utility from section 8 of the manual (that's the system manager's manual, for the sysadmin girlies πŸ’…). It's about sending L2CAP ECHO_REQUEST packets to remote devices and it's honestly iconic for checking if your bluetooth bestie is alive.

✨ SYNOPSIS ✨

l2ping [-fhn] -a remote [-c count] [-i wait] [-S source] [-s size]

🌸 DESCRIPTION 🌸

So what does l2ping actually do? It uses the L2CAP ECHO_REQUEST datagram to elicit an L2CAP ECHO_RESPONSE datagram from a remote device. Basically you poke the device and it pokes back, and that's how you know it's there. no cap. 🫢

The options are as follows, bestie:

πŸŽ€ OPTIONS πŸŽ€

  • -a remote β€” Specify the remote device to ping. The remote device can be specified by either its BD_ADDR or name. If name was specified then the l2ping utility will attempt to resolve the name via bt_gethostbyname(3). it's giving "who are we pinging today bestie" energy πŸ’–
  • -c count β€” Number of packets to send. If this option is not specified, l2ping will operate until interrupted (so basically forever until you hit Ctrl+C, lowkey unhinged of it). 😭
  • -f β€” Do not wait between sending each packet. impatient queen behavior, and we love it πŸ”₯
  • -h β€” Display usage message and exit. the classic "help me help you" move ✨
  • -i wait β€” Wait wait seconds between sending each packet. The default is to wait for one second between each packet. This option is ignored if -f has been specified. so like, -f simply does not care about your vibes here πŸ’€
  • -n β€” Numeric output only. No attempt will be made to look up symbolic names for host addresses. no name-dropping, strict 1s and 0s only πŸŽ€
  • -S source β€” Specify the local device which should be used to send L2CAP ECHO_REQUEST datagrams. The local device can be specified by either its BD_ADDR or name. If name was specified then the l2ping utility will attempt to resolve the name via bt_gethostbyname(3). this is your "from" address, main character energy πŸ‘‘
  • -s size β€” Specify the number of payload bytes to be sent. The default size is 44 bytes. It is calculated as minimum L2CAP MTU (48 bytes) minus the size of the L2CAP signalling command header (4 bytes). The maximum size is 65531 bytes. It is calculated as maximum L2CAP MTU (65535 bytes) minus four bytes of payload reserved for l2ping internal use. Use this option with caution. Some implementations may not like large sizes and may hang or even crash. 🚨
bestie I am BEGGING you, be careful with -s. Large sizes can literally make other implementations hang or crash. this is not a drill πŸ’€ fr fr please use this option with caution.

🌈 EXIT STATUS 🌈

The l2ping utility exits 0 on success, and >0 if an error occurs. we stan a clear exit status situation 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

bluetooth(3), netgraph(3), netgraph(4), ng_l2cap(4), l2control(8)

πŸ‘‘ AUTHORS πŸ‘‘

Maksim Yevmenkin <emax@FreeBSD.org> β€” thank you king for this utility πŸ™Œ

πŸ’€ BUGS πŸ’€

Could collect more statistic. Could check for duplicated, corrupted and lost packets. ngl it could be doing a lil more, but it's doing its best πŸ₯Ί


okay that's the whole vibe check bestie πŸ’– this page is from the Debian version, dated March 29, 2011 (yes it's a lil vintage, but so are we sometimes 🌸), and it's from the System Manager's Manual section 8. slay and happy pinging βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from