Using raw socket with io-pkt in 6.4


I am trying to use raw socket with io-pkt in qnx 6.4, does any one know how to bind the socket to the specific interface? for example in linux we can use the “sll_ifindex” field in the structure “sockaddr_ll” for the bind() api to bind the socket to the specific interface, how do we do this in qnx? I can’t find any document about doing this in qnx. Does any one know the qnx way?

Thanks in advance for your help!

example in linux:
int send_packet(struct interface_info *iff)
int ssock_fd;
int numc, len;
struct sockaddr_ll send_info;

/* PF_PACKET requires generic sockaddr_ll structure */

memset(&send_info, 0, sizeof(send_info));
send_info.sll_family = AF_PACKET;
send_info.sll_ifindex = iff->ifindex;

/* … omitted… */

ssock_fd = socket(PF_PACKET, SOCK_RAW, 0);

if (bind(ssock_fd, (struct sockaddr *)&send_info, len) < 0) {