It is enough to switch down the corresponding alias network interface:
N.B.: All checks have been removed for better legibility, but it is very important to check returned code after each request.
// We consider the existence of the variable (unsigned char *) "aliasInterfaceName" ("eth0:myAlias" for instance).
struct ifreq ifr;
sd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
memset(&ifr, 0, sizeof(struct ifreq));
strncpy(ifr.lifr_name, aliasInterfaceName, sizeof(ifr.ifr_name));
ifr.ifr_flags = ~IFF_UP;
ioctl(sd, SIOCSIFFLAGS, &ifr);