EAB3 skin Register
English Amiga Board


1 2 
support.WinUAE>slirp network emulation backend
Toni Wilen 17:08 22 June 2013
slirp user mode networking is now merged (from Basilisk II, qemu version is too qemu specific)

http://www.winuae.net/files/b/winuae.zip (pre-beta, if interested of testing)

- It is sort of emulated NAT, only connections from emulated environment to servers work. (inbound won't work).
- ICMP won't work. (ping does nothing)
- Does not require admin privileges or installation of drivers.
- If not using DHCP, IP must be set to 10.0.2.15, gateway 10.0.2.2, dns 10.0.2.3, mask 255.255.255.0. (DHCP gives exact same addresses). These IP addresses are virtual, they don't exist outside of emulation.
- Supported by A2065 and uaenet emulations.
- Uses winsocket API = does not cause mysterious packet losses due to security software.

It takes raw ethernet frame from emulated network hardware, parses it, re-creates identical enough network calls using host's standard socket API and returns back raw ethernet frames. (Lots of emulations here, emulated Amiga runs network stack that creates ethernet frames, ethernet frames are parsed by slirp, host creates ethernet frames again)

Check for example qemu documentation for more details.

Logging: -slirplog x (x=1 to 7)
Advertisement:


Leandro Jardim 18:03 22 June 2013
Originally Posted by Toni Wilen:
... It takes raw ethernet frame from emulated network hardware, parses it, re-creates identical enough network calls using host's standard socket API and returns back raw ethernet frames. (Lots of emulations here, emulated Amiga runs network stack that creates ethernet frames, ethernet frames are parsed by slirp, host creates ethernet frames again)] ...
Fantastic, Toni! More emulation is always best! I will wait for this and for the graphics board emulation that you promised (another fantastic thing).

You are the man!
amiga_1 15:01 23 June 2013
@Toni:

Can you make it use Windows "hosts" file ??
Toni Wilen 16:07 23 June 2013
Originally Posted by amiga_1:
Can you make it use Windows "hosts" file ??
For what? Amiga-side DNS queries still use it normally.
amiga_1 17:14 23 June 2013
Originally Posted by Toni Wilen:
For what? Amiga-side DNS queries still use it normally.

I have "blocked" some sites (re-directing them to 127.0.0.0) on Windows-side, and I don't want them to be accessed under Amiga-side.

I went online with Miami Deluxe, and the "blocked" sites are accessed, thus the Windows hosts file is bypassed, it seems!
Toni Wilen 18:52 23 June 2013
I thought it used normal DNS API but it "only" (after ethernet frame has been parsed) checks if TCP or UDP is going to 10.0.2.3 (DNS IP), it gets redirected to your real DNS server.

Sorry, I am not going to touch slirp code. (except to get it to compile with MSVC)
amiga_1 18:57 23 June 2013
Originally Posted by Toni Wilen:
I thought it used normal DNS API but it "only" (after ethernet frame has been parsed) checks if TCP or UDP is going to 10.0.2.3 (DNS IP), it gets redirected to your real DNS server.

Sorry, I am not going to touch slirp code. (except to get it to compile with MSVC)

Ok, can you at least making it work with Admin privileges ONLY ?
Toni Wilen 19:01 23 June 2013
Originally Posted by amiga_1:
Ok, can you at least making it work with Admin privileges ONLY ?
Of course not. Thats the whole point of slirp!

EDIT: Block them using some firewall because using hosts "blocking" won't block if someone wants to use IP address directly.
Noth 17:21 25 January 2014
Hi Toni, is their a way to open a port on the host to forward a connection (typically the telnet port 23/tcp) to the guest system in WinUAE? It'd be nice to access AMIX and friends via a not so braindead console... (AMIX's virtual consoles don't allow the cursor to move back and forth or check the history of the commands...).
Toni Wilen 17:36 25 January 2014
You need to use winpcap method. SLIRP is outbound only, method used by SLIRP can't work for inbound connections.
Noth 19:22 25 January 2014
Originally Posted by Toni Wilen:
You need to use winpcap method. SLIRP is outbound only, method used by SLIRP can't work for inbound connections.
Which is unlikely to work for those of us using WINE I suppose... Oh well, doesn't matter. Thanks for the answer.
Noth 19:22 25 January 2014
Originally Posted by Toni Wilen:
You need to use winpcap method. SLIRP is outbound only, method used by SLIRP can't work for inbound connections.
SLiRP is meant to be able to do portforwarding... neozeed mentions it all over his blog. Could it be added in a later release of WinUAE if the code is available?
Toni Wilen 19:28 25 January 2014
Originally Posted by Noth:
Which is unlikely to work for those of us using WINE I suppose... Oh well, doesn't matter. Thanks for the answer.
Yeah, it needs Windows driver.

What about serial port console?
Noth 17:16 20 February 2014
Tried the serial port console but no matter what I can't get a login prompt. Can't we have a port forwarded in SLiRP to be able to telnet in? it would be so much easier...
Toni Wilen 15:25 21 February 2014
SLIRP is not done by me and it is designed to be NAT only. I am not sure if it can be made to listen for incoming connections without major changes.
Noth 20:52 21 February 2014
Paging Neozeed!
neozeed 05:41 24 February 2014
hey sorry for going dark life took a major turn...

I saw the slirp and was really excited, although for some reason I've been having issues with it.. I'll get to that later.

Doing inbound TCP connections is really simple with the slirp network library.

It's a one liner too!

struct in_addr guest_addr;
inet_aton("10.0.2.15",&guest_addr);


slirp_redir(0,42323,guest_addr,23);

This would take TCP port 42323 on the host machine, and redirect it to port 23.

I'm going to re-install and see if I can come back with something more meangful about slirp, but I was able to ping 10.0.2.2 in the VM just fine, and when I try to connect to my BBS, it "works" but nothing is displayed on the amiga side... oddly enough watching me on the bbs, it worked fine..... I did try AmiTCP 2,3 and the 4.0 ... AmigaDOS 2.1...

But like I said I need to re-install fresh and see what I can do for a bug report.


-- edit

well it seems slirp works better with OS 3.1 & AmiTCP 4 ... Oh well, I can now use telser so I'm happy!
Toni Wilen 11:02 24 February 2014
Originally Posted by neozeed:
slirp_redir(0,42323,guest_addr,23);
If it really is that simple, how should it be implemented in WinUAE? Automatically add some common standard ports? Custom ports can be added via config file but basic ports should have simple on/off checkbox.

21, 22, 23, 80, 443? Anything else? Should there be some number added to host side port? (for example 80 becomes 8000 + 80 = 8080), low (<1024) ports may not be available and may require higher privileges.
neozeed 13:37 24 February 2014
Originally Posted by Toni Wilen:
If it really is that simple, how should it be implemented in WinUAE? Automatically add some common standard ports? Custom ports can be added via config file but basic ports should have simple on/off checkbox.

21, 22, 23, 80, 443? Anything else? Should there be some number added to host side port? (for example 80 becomes 8000 + 80 = 8080), low (<1024) ports may not be available and may require higher privileges.
On Qemu it was some fun syntax of -redir protocolort:hostort which could be repeated over and over again... I cheated on the SIMH Vax/PDP thing by just hardcoding some high ports to 23/80 as that was all I was interested in.. I suppose if you add in a listbox that lets people to add in a few things that'd be nice... the problem with picking arbitrary ports for people is that you can't run more than one instance of winuae... or what if I want to run an amiga email server (Im sure one exists somewhere) and I want port 25, not port 23.. etc etc......

I know you can issue multiple slirp_redir's... so I guess the other thing to do is maybe only allow for one or two port redirections..? Although yeah high ports are better as not everyone is an administrator on their computer.

I don't know why AmiTCP 2.2 & 3.02b has such a hard time teletting, but I'm glad I found a version of 4 that works!
Toni Wilen 17:49 24 February 2014
slirp_redir command line option added, not fully tested, I didn't have any good test cases but at least host-side socket gets opened. Multiple entries support.

slirp_redir=proto:host port:internal port:internal ip (for example slirp_redir=tcp:10023:23:10.0.2.15 for telnet)

http://www.winuae.net/files/b/winuae.zip

btw, at least slirp version used in winuae has annoying problem, it does not have any routine to release all currently open sockets and free all other resources. (Which would be really useful when emulated system gets reset.)

GUI won't have any port selections, "common ports on/off" checkbox is the only solution I am bothered to implement in GUI. Everything else: manual config file.

1 2 


Page generated in 0.08621 seconds with 13 queries