Hi all, I'm trying to set up a test environment for my application (using CAN sockets) based on LXC, but I'm stuck now because it seems that opening this kind of sockets inside the container does not work...
The following program works nice on a real host (printing "fd = 3"), but fails on the container with: "errno = 97, msg = Address family not supported by protocol" I'm quite stuck with it right now, so if anyone has any idea how to make it work, I'd greatly appreciate it. Luke ------------------ #include <stdio.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <linux/can.h> #include <linux/can/raw.h> int main() { //int fd = socket(PF_INET, SOCK_RAW, AF_INET); int fd = socket(PF_CAN, SOCK_RAW, CAN_RAW); if (fd == -1) { printf("errno = %d, msg = %s\n", errno, strerror(errno)); } else { printf("fd = %d\n", fd); close(fd); } return 0; } ------------------ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users