Closed flaviojs closed 1 year ago
Indeed, not having to rely on Cygwin would be great.
for mmap it look like this might a solution: http://code.google.com/p/mman-win32/
I just tried compiling an application that includes uuid/uuid.h and x86_64-w64-mingw32-gcc complains that "uuid/uuid.h": No such file or directory. Is this because libuuid(3) isn't supported by mingw?
I have it building on MinGW. Oddly enough the 'stable' branch runs the MIPS64 JIT quite nicely, while the unstable branch runs the PPC32 JIT. Libuuid will conflict with windows built in uuid support so the fix there is it rename libuuid's uuid_t to something like uu_uuid_t and all references to it in Dynamips. Of course, don't forget to rename the library file, otherwise you'll overwrite the system libuuid.a !
There is some stuff to mess around with sockets in the hypervisor, as Win32 can't treat a socket like a stdio device, but I have it to the point where dynagen 0.11 can talk to dynamips.
I put my stuff here: http://sourceforge.net/projects/dynamips-mingw/
Also I have it compiling with TDM-GCC-64, although none of the JIT works. But it does work interpreted!
@neozeed we have recently remove the libuuid dependency. Have you made progress?
I never had issues once I renamed uuid to uu_uuid. But now that I see it's updated, I can pull and re-merge my stuff.
Oh yeah, and doing winpcap dynamically is SO much more nicer, than having it statically linked in. It makes doing demos much more easier without having to install things.
Sounds good, let me know how that goes.
Thanks :)
I've got a first pass.... and I still ended up cutting it in half, MIPS from stable, and PowerPC from unstable. Both seem to be somewhat behaved. I've booted 7200 MIPS, and 1700 PPC IOS ok. The pcap code needs to be made more dynamic for UNIX. I've done it before, I just have to find it and put it in there.
I've separated all the bits that are missing from MinGW into the contrib folder.
Also I've been going in circles on the vty code, so for now Im just using an older version of that file. It works 'well enough for now'. Just go into the 'merge' directory and run make, as it's all MinGW32. I guess I should rename merge to mingw..
Looks like you did a good job :+1: I will be away for the next couple of week, so I won't be able to test before a while. I will post back when I do.
Thanks again! :)
I forgot, I had to make the unix & vde transports optional as a #ifdef UNIX_ETH & VDE_ETH since Win32 has no good analogue.
Awesome
On Fri, Apr 8, 2016 at 2:25 AM neozeed notifications@github.com wrote:
I forgot, I had to make the unix & vde transports optional as a #ifdef UNIX_ETH & VDE_ETH since Win32 has no good analogue.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/GNS3/dynamips/issues/18#issuecomment-207147925
I really really need to revisit all of this. You know how live (new kids) and overwhelming jobs go. :|
On a long trip I was reading that book infrastructure as code, and Ive been trying to get to that point for years but it's nice to see it just spelt out. And time to re-tackle dynamips.
No worries. I am very interested for a version of Dynamips compiled with MinGW.
On Tue, Nov 29, 2016, 18:17 neozeed notifications@github.com wrote:
I really really need to revisit all of this. You know how live (new kids) and overwhelming jobs go. :|
On a long trip I was reading that book infrastructure as code, and Ive been trying to get to that point for years but it's nice to see it just spelt out. And time to re-tackle dynamips.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/GNS3/dynamips/issues/18#issuecomment-263494955, or mute the thread https://github.com/notifications/unsubscribe-auth/AEiE5jwYJpEmpEFM3vjiHDmCJrK_4reJks5rC9GVgaJpZM4A_yL3 .
dynamips doesn't compile in MinGW. Currently it can compile in Cygwin by relying on it's posix-ness.
Tasks:
lock files
use https://github.com/epi/xedisk/wiki/File-locking as reference
missing header
sys/mmap.h
memory mapped files, can be replaced with
windows.h
(WinXP+)mmap -> CreateFileMapping + MapViewOfFile
munmap -> UnmapViewOfFile
msync -> FlushViewOfFile (asynchronous, so not exactly what we need)
consider moving
memzone_*
functions fromutils.c
to a separate filememzone.c
missing header
uuid/uuid.h
external library, can be replaced with
Rpc.h
(Win2000+)create compatible functions
uuid_t <-> UUID - convert Data1 with
htonl/ntohl
, convert Data2 and Data3 withhtons/ntohs
uuid_generate -> UuidCreateNil + UuidCreate
uuid_parse -> UuidFromString
uuid_unparse -> UuidToString
uuid_compare -> UuidCompare
missing headers
sys/socket.h
+sys/un.h
+arpa/inet.h
+netdb.h
+netinet/in.h
sockets, can be replaced with
winsock2.h
+ws2tcpip.h
(WinXP+ or WinVista+)most IPv6 stuff is WinVista+,
try to implement it for WinXP+?(WinXP is EOL now)struct sockaddr_un
doesn't exist, filter out code that needs itother missing headers
arpa/inet.h
- dev_vtty.c, gen_eth.c, hv_atmsw.c, hv_atm_bridge.c, hv_c1700.c, hv_c2600.c, hv_c2691.c, hv_c3600.c, hv_c3725.c, hv_c3745.c, hv_c7200.c, hv_ethsw.c, hv_frsw.c, hv_nio.c, hv_nio_bridge.c, hv_store.c, hv_vm_debug.c, net.c, net_io.c, net_io_filter.c, parser.c, timer.c, utils.c, hv_vm.c, hypervisor.carpa/telnet.h
- dev_vtty.cdlfcn.h
- plugin.cnetdb.h
- dev_vtty.c, gen_eth.c, net.c, net_io.c, net_io_filter.c, timer.c, utils.cnetinet/in.h
- gen_eth.c, net_io.c, net_io_filter.c, timer.c, utils.h(!!)netinet/tcp.h
- dev_vtty.csys/ioctl.h
- gen_eth.c, hv_atmsw.c, hv_atm_bridge.c, hv_c1700.c, hv_c2600.c, hv_c2691.c, hv_c3600.c, hv_c3725.c, hv_c3745.c, hv_c7200.c, hv_ethsw.c, hv_frsw.c, hv_nio.c, hv_nio_bridge.c, hv_store.c, hv_vm_debug.c, net.c, net_io.c, net_io_filter.c, parser.c, utils.c, hv_vm.c, hypervisor.csys/mman.h
- utils.csys/select.h
- atm.c, atm_bridge.c, atm_vsar.c, eth_switch.c, frame_relay.c, net_io_bridge.csys/socket.h
- cisco_eeprom.c, dev_vtty.c, gen_eth.c, hv_atmsw.c, hv_atm_bridge.c, hv_c1700.c, hv_c2600.c, hv_c2691.c, hv_c3600.c, hv_c3725.c, hv_c3745.c, hv_c7200.c, hv_ethsw.c, hv_frsw.c, hv_nio.c, hv_nio_bridge.c, hv_store.c, hv_vm_debug.c, net.c, net_io.c, net_io.h(!!), net_io_filter.c, net_io_filter.h(!!), parser.c, ptask.h(!!), timer.c, utils.c, hv_vm.c, hypervisor.csys/uio.h
- atm_vsar.csys/un.h
- net_io.c, net_io.h(!!), net_io_filter.c, net_io_filter.h(!!), ptask.h(!!)sys/wait.h
- gen_eth.c, net_io.c, net_io_filter.c, registry.ctermios.h
- dev_c1700_iofpga.c, dev_c2600_iofpga.c, dev_c2691_iofpga.c, dev_c3600_iofpga.c, dev_c3725_iofpga.c, dev_c3745_iofpga.c, dev_c6msfc1_iofpga.c, dev_c6sup1_iofpga.c, dev_c7200_iofpga.c, dev_ds1620.c, dev_ns16552.c, dev_sb1.c, dev_sb1_io.c, dev_vtty.cconsider adding a global include, like
all.h
, to be included before anything else.all OS/compiler juggling can be put in there, as well as common includes.
currently
utils.h
serves that purpose, along with providing utility functions.check all
long
sin windows it's always 32-bits, in linux it's either 32-bits or 64-bits (size of pointer)
make it compile with CMake (optional)- cmake is supported now