]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Fixed WinPCap support.
authorToni Wilen <twilen@winuae.net>
Thu, 18 Jun 2015 17:35:53 +0000 (20:35 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 18 Jun 2015 17:35:53 +0000 (20:35 +0300)
ethernet.cpp
od-win32/win32_uaenet.cpp

index 2acf8503572d1aa232fa865ea1af69878ff16341..e62740fa6b3582ed3670a03e27ac37795c1c0fea 100644 (file)
@@ -31,7 +31,7 @@ static struct netdriverdata slirpd =
        UAENET_SLIRP,
        _T("slirp"), _T("SLIRP User Mode NAT"),
        1500,
-       { 0x00,0x80,0x10,50,51,52 },
+       { 0x00,0x00,0x00,50,51,52 },
        1
 };
 static struct netdriverdata slirpd2 =
@@ -39,7 +39,7 @@ static struct netdriverdata slirpd2 =
        UAENET_SLIRP_INBOUND,
        _T("slirp_inbound"), _T("SLIRP + Open ports (21-23,80)"),
        1500,
-       { 0x00,0x80,0x10,50,51,52 },
+       { 0x00,0x00,0x00,50,51,52 },
        1
 };
 
@@ -210,8 +210,8 @@ bool ethernet_enumerate (struct netdriverdata **nddp, const TCHAR *name)
 #ifdef WITH_UAENET_PCAP
        nd = uaenet_enumerate (NULL);
        if (nd) {
-               for (int i = 0; i < nd[i].active; i++) {
-                       nddp[j++] = nd;
+               for (int i = 0; nd[i].active; i++) {
+                       nddp[j++] = &nd[i];
                }
        }
 #endif
index 7ea7a43ec07541d41232567daa16c51c450e25a3..37483baddf6b95faed1fcf4aef7f8dc7f71bb7d0 100644 (file)
@@ -288,6 +288,9 @@ void uaenet_enumerate_free (void)
 static struct netdriverdata *enumit (const TCHAR *name)
 {
        int cnt;
+       
+       if (name == NULL)
+               return tds;
        for (cnt = 0; cnt < MAX_TOTAL_NET_DEVICES; cnt++) {
                TCHAR mac[20];
                struct netdriverdata *tc = tds + cnt;