this code below is supposed to capture all packets on in/out on eth0/loopback. it captures everything perfectly except for outgoing packets from my ip address to the internet. all loopback traffic is captured as well as all incoming traffic, just no outgoing. here is the relevant code. note: all the function calls succeed as i check the return and i also watch with strace to verify.
Code:
//all the network structures
        struct sockaddr_in      sa;     struct packet_mreq      req;    //for setsockopt() into PROMISC
        struct ip       *ip;    struct tcphdr   *tcp;   struct icmp     *icmp;  struct udphdr   *udp;
        struct ethhdr   *eth;   struct ifreq    ireq;   //for ioctl() getting interface index

        //clear memory and setup structures
        bzero(recvbuf, ETH_FRAME_LEN),  bzero(&req, sizeof(req)), bzero(&sa, salen), bzero(&ireq, sizeof(ireq));

        sa.sin_family = AF_INET;
        sa.sin_addr.s_addr = htonl(INADDR_ANY);
        req.mr_type = PACKET_MR_PROMISC;        //promis mode for the socket
        strcpy(ireq.ifr_name, "eth0");          //interface being configured

        //make the socket 
        if( (sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP))) <= 1) //create socket
                err_quit();

        if( (ioctl(sock, SIOCGIFINDEX, &ireq)) == -1)           //get eth0 interface index
                err_quit();     //bad reqest
        else
                req.mr_ifindex = ireq.ifr_ifindex;      //eth0 index

        //put eth0 into promisc mode
        if( (setsockopt(sock, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &req, sizeof(req))) == -1)
                err_quit();

        //now add teh loopback
        strcpy(ireq.ifr_name, "lo");
        if( (ioctl(sock, SIOCGIFINDEX, &ireq)) == -1)
                err_quit();
        else
                req.mr_ifindex = ireq.ifr_ifindex;
        if( (setsockopt(sock, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &req, sizeof(req))) == -1)
                err_quit();

        while( (result = recvfrom(sock, recvbuf, ETH_FRAME_LEN, 0, (struct sockaddr *) &sa, &salen)) > 1)
        {
                //get MAC addresses