Annotation of embedaddon/freevrrpd/test.c, revision 1.1.1.1

1.1       misho       1: #include <stdio.h>
                      2: #include <stdlib.h>
                      3: #include <netgraph.h>
                      4: 
                      5: int main(int argc, char **argv) {
                      6:        struct ngm_connect ngc;
                      7:        int ngs;
                      8:        int csp, dsp;
                      9:        char path[256];
                     10:        
                     11:        ngs = NgMkSockNode("prout", &csp, &dsp);
                     12:        snprintf(path, sizeof(path), "fv_vrid1_eiface:");
                     13:        snprintf(ngc.path, sizeof(ngc.path), "em0bridge:");
                     14:        snprintf(ngc.ourhook, sizeof(ngc.ourhook), "ether");
                     15:        snprintf(ngc.peerhook, sizeof(ngc.peerhook), "link2");
                     16:        if (NgSendMsg(csp, path, NGM_GENERIC_COOKIE, NGM_CONNECT, &ngc, sizeof(ngc)) < 0)
                     17:                perror("NgSendMsg");
                     18: 
                     19:        return 0;
                     20: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>