From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: DOSemu networking made easy Date: Mon, 24 Jun 2013 20:12:10 +0400 Message-ID: <51C86FDA.7050009@list.ru> References: <51C82F2C.5@viste-family.net> <51C84847.60903@list.ru> <51C84EB4.3070000@viste-family.net> <51C85F24.9050809@list.ru> <51C86809.5040001@viste-family.net> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=list.ru; s=mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=jgNcLUMBbkSe4lIpD1QHZskqXJj4Wkgrw2NZYqlWuZo=; b=AlUuOqxWpNF5cLctLG7yKufJWXkw0kVDDWMIFNdrgyQXz8RaCemLb2GOgHqWs+p27zj1n+hDHKGFudF0RdXeV3neZzqBb14LH+mElXGgvFwYDv3otfgU+OTwAG6Fv7AaFsdqC4WRUuynu/qQzPcfaaPEt1IM1a536o471RhTZLM=; In-Reply-To: <51C86809.5040001@viste-family.net> Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="utf-8" To: Mateusz Viste Cc: linux-msdos@vger.kernel.org, dosemu-devel , "Eric W. Biederman" Aha, thanks for an explanation! Now I've started to understand what is this all about. :) Lets add dosemu-devel and Eric Biederman into CC. The beginning is here: http://marc.info/?l=3Dlinux-msdos&m=3D137207433306065&w=3D2 24.06.2013 19:38, Mateusz Viste =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > It would be really cool to have this incorporated into DOSemu, so for > example a network configuration could be something like: > > $_pktdriver =3D (on) > $_vnet =3D "slirp" > $_netdev =3D "/usr/bin/slirp" > > And such configuration would provide working network connectivity in > any situation, without the user having to care about anything (as lon= g > as the host would have network itself). > > I even looked at DOSemu source code, and locating the point where > DOSemu opens the TAP interface wasn't a big deal, and it would be eas= y > to implement any other alternative channel there, but I could not > locate the code where DOSemu sends/recv ethernet frames into/from the > TAP. If anybody tells me where in the code this happens, I might try > to look further. Sure: in pktnew.c please find the following: --- if (write(pkt_fd, SEG_ADR((char *), ds, si), LWORD(ecx)) >=3D 0= ) { pd_printf("Write to net was ok\n"); return 1; --- and the following: --- size =3D read(fd, pkt_buf, PKT_BUF_SIZE); if (size < 0) { p_stats->errors_in++; /* select() somehow lied */ return 0; --- and that's it. :) -- To unsubscribe from this list: send the line "unsubscribe linux-msdos" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html