I have written a lot of C before, but I do not understand this syntax:
static const char *names[] = { [BOND_MODE_ROUNDROBIN] = "load balancing (round-robin)", [BOND_MODE_ACTIVEBACKUP] = "fault-tolerance (active-backup)", [BOND_MODE_XOR] = "load balancing (xor)", [BOND_MODE_BROADCAST] = "fault-tolerance (broadcast)", [BOND_MODE_8023AD] = "IEEE 802.3ad Dynamic link aggregation", [BOND_MODE_TLB] = "transmit load balancing", [BOND_MODE_ALB] = "adaptive load balancing", };
The [...] = is what looks strange to me. (By the way, BOND_MODE_ROUNDROBIN , and the rest are macros that simply expand to integers.)
c syntax linux
Alex d
source share