DeviceOffline(3z)

πŸ“¦ version 1.10.1, in fedora 43, fedora 44

πŸ’– DeviceOffline(3z) πŸ’–

okay so this is a page from the z88dk Programmer's Manual, section 3z, and it's all about a lil function called DeviceOffline(). bestie it is short, so let's get into it 🫢


✨ NAME ✨

DeviceOffline β€” turn the network device online

not me reading that twice πŸ’€ that's literally what the page says, no notes, moving on

🌸 SYNOPSIS 🌸

#include <net/misc.h>

void DeviceOffline(int flag);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the DeviceOffline() function turns the packet driver offline, which frees up whatever resources it was hogging so another application can use them. sharing is caring, periodt πŸ’…

like, real example: for the built in SLIP driver, turning the device online means it stops polling the serial port for incoming bytes and stops sending queued packets β€” which means another program (e.g. Terminal) can have the serial port instead. iconic behaviour honestly πŸŽ€

the flag parameter tells it how the device should be turned offline. with current device drivers this has no significance. however, the vibe they're envisioning for the future is:

  • NOHANGUP β€” the device will simply suspend sending and receiving packets.
  • HANGUP β€” the device will hangup the line and terminate the telephone connection. 😭 dramatic but okay

⭐ RETURN VALUE ⭐

None. that's it. nothing comes back. empty handed but cute ✨


πŸ‘‘ SEE ALSO πŸ‘‘

DeviceOnline(3z)


πŸ’œ AUTHOR πŸ’œ

Dominic Morris <dom@jb.man.ac.uk>


okay that's the whole page bestie, you ate it, go forth and free up those serial ports πŸŒˆπŸ’–

z88dk Programmer's Manual Β· 18 February 2000 Β· DeviceOffline(3z) 4ever πŸ’…

πŸ“¦ where this page comes from