12 ms·
IIRC, Silicon Graphics (the company) used to maintain a registry for "magic numbers" designating each file's type. Customers could contact SGI to be issued a ma
by DoofusOfDeath 8y ago
IIRC, Silicon Graphics (the company) used to maintain a registry for "magic numbers" designating each file's type. Customers could contact SGI to be issued a magic number for whatever file formats they were cooking up.
I wonder if there's merit to recreating such a thing under ICANN, where the issued serial numbers are useful for file types, wire protocols, etc.
Then anyone needing to reliably interpret a packet could (1) look for the format serial number at some well-known location, and then (2) consult the well-publicized registry for whatever information has been provided regarding the format.
- wmf 8y agoMagic numbers are better than nothing, but "next protocol" fields accomplish the same thing without magic. Usually the steward of each protocol maintains a registry of protocol IDs. For example, IEEE maintains a list of Ethernet protocols: http://standards-oui.ieee.org/ethertype/eth.txt http://standards-oui.ieee.org/ethertype/eth.txt and IANA tracks IP protocols: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml https://www.iana.org/assignments/protocol-numbers/protocol-n... and TCP/UDP port numbers: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml https://www.iana.org/assignments/service-names-port-numbers/... and MIME types are used for HTTP and email: https://www.iana.org/assignments/media-types/media-types.xhtml https://www.iana.org/assignments/media-types/media-types.xht... In classic Mac OS and BeOS, file inodes carried file types so you didn't have to guess about file types either.
- AnimalMuppet 8y agoIIRC, it was magic numbers and offsets. And you could run the charmingly-named magic program on a file to find out if the system knew what it was...
- Gibbon1 8y agoIf you want something like that, using an IEEE OUI/CID would be a good start. https://standards.ieee.org/content/dam/ieee-standards/standards/web/documents/tutorials/eui.pdf https://standards.ieee.org/content/dam/ieee-standards/standa...
- richardwhiuk 8y agohttps://github.com/file/file/tree/master/magic/Magdir https://github.com/file/file/tree/master/magic/Magdir exists for file types.