How do I pass in the skt member of 'struct cam' to function sock_create() which has arg that requires a pointer to a pointer?Code:// sock_create signature ... int sock_create(int family, int type, int protocol, struct socket **res); struct bam { union am *lay; }; struct cam { struct socket *skt; };
Code:struct bam *bm; struct cam *cm; // ... cm = (struct cam *)bm->lay; // cm->skt wrong here, but not sure how to pass in. ret = sock_create(AF_INET, SOCK_STREAM, IPPROTO_TCP, cm->skt);