Tristan B. Velloza Kildaire on Nostr: Remember when traversing the resultants of `getifaddrs()`. If a particular interface ...
Remember when traversing the resultants of `getifaddrs()`. If a particular interface has an unspec then you will have a nulled-out `ifa_addr`.
Learnt this the hard way, took a while to find that. Photos related, as you can see, it makes sense it cannot be filled as there is no AF_PACKET-familied address on a TUN adapter.
Also, using ImportC here to effortlessly use C code in D - with no link-time linking. All at the source level.
#c #linux #d
Published at
2024-01-15 12:00:00Event JSON
{
"id": "34c665308d3e0155955d340b70ed1c593ca1a52e0beba0eaab94d42f929a2356",
"pubkey": "8dda1f9d2b468a4a41a625ea6dad76c33b4f56cae92c707eb0fee2ce0c574ce5",
"created_at": 1705320000,
"kind": 1,
"tags": [
[
"t",
"c"
],
[
"t",
"d"
],
[
"t",
"linux"
],
[
"proxy",
"https://gleasonator.com/objects/11ec6a94-194e-4b5e-9686-cb9d2acce606",
"activitypub"
]
],
"content": "Remember when traversing the resultants of `getifaddrs()`. If a particular interface has an unspec then you will have a nulled-out `ifa_addr`.\n\nLearnt this the hard way, took a while to find that. Photos related, as you can see, it makes sense it cannot be filled as there is no AF_PACKET-familied address on a TUN adapter.\n\nAlso, using ImportC here to effortlessly use C code in D - with no link-time linking. All at the source level.\n\n#c #linux #d\n\nhttps://media.gleasonator.com/d152a0bf774acd085c947640c589b368d76fde24c441691f356ae0f80a12446c.jpg\n\nhttps://media.gleasonator.com/41ba48b2403d2cd04f8e204c360ad89f27a414afa3b7f1d84f6e76d154318ece.jpg",
"sig": "de68c597e7ee7bdc5089275a744c9bb431ddfde91837cb27aa97a0fa40ff8a002aa387581b0dbbacc34646b2a036e40e492981ac849398f902d5b6ce13cf4e10"
}