DeviceOffline(3z)
π 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
- fedora 43: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- fedora 44: z88dk 1.10.1-33.20150709cvs.fc43 Β· ClArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms