- findalldevs_if = (struct rpcap_findalldevs_if *) &sendbuf[sendbufidx];
-
- if (sock_bufferize(NULL, sizeof(struct rpcap_findalldevs_if), NULL,
- &sendbufidx, RPCAP_NETBUF_SIZE, SOCKBUF_CHECKONLY, errmsgbuf, PCAP_ERRBUF_SIZE) == -1)
- goto error;
-
- memset(findalldevs_if, 0, sizeof(struct rpcap_findalldevs_if));
+ // Note: the findalldevs_if entries are *not* neatly
+ // aligned on 4-byte boundaries, because they're
+ // preceded by strings that aren't padded to 4-byte
+ // boundaries, so we cannot just cast output buffer
+ // boundaries to struct rpcap_findalldevs_if pointers
+ // and store into them - we must fill in a structure and
+ // then copy the structure to the buffer, as not all
+ // systems support unaligned access (some, such as
+ // SPARC, crash; others, such as Arm, may just ignore
+ // the lower-order bits).
+ struct rpcap_findalldevs_if findalldevs_if;