Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
11 crawler(s) on-line.
 124 guest(s) on-line.
 1 member(s) on-line.


 OlafS25

You are an anonymous user.
Register Now!
 OlafS25:  2 mins ago
 NutsAboutAmiga:  6 mins ago
 Gunnar:  10 mins ago
 MickJT:  25 mins ago
 A1200:  49 mins ago
 outlawal2:  1 hr 23 mins ago
 AndreasM:  1 hr 26 mins ago
 sibbi:  1 hr 35 mins ago
 saimo:  1 hr 49 mins ago
 DiscreetFX:  1 hr 50 mins ago

/  Forum Index
   /  General Technology (No Console Threads)
      /  IPv6
Register To Post

Goto page ( Previous Page 1 | 2 | 3 Next Page )
PosterThread
NutsAboutAmiga 
Re: IPv6
Posted on 15-Jun-2012 19:26:26
#21 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@olsen

Hi, I'm getting an error 3 what am I doing wrong?



#include <exec/errors.h>
#include <exec/emulation.h>

#include <stdlib.h>
#include <stdio.h>
#include <proto/exec.h>
#include <proto/dos.h>

#include <devices/sana2.h>


ULONG copy_to_buff_ppc(struct Hook *hook,struct IOSana2Req *sana2req,struct SANA2HookMsg *sana2hookmsg)
{
return 1;
};


static LONG copy_to_buff_68k(void)
{
ULONG *regs;
uint32 packet_len;
uint8 *to, *from;

regs = (ULONG *)(((struct ExecBase *)SysBase)->EmuWS);

packet_len = regs[REG68K_D0/ 4];
to = (uint8 *) regs[REG68K_A0/ 4];
from = (uint8 *) regs[REG68K_A1/ 4];

printf("old copy_to_buff_68k(void)\n");


return 1;
}

static LONG copy_from_buff_68k(void)
{
ULONG *regs;
uint32 packet_len;
uint8 *to;
uint8 *wds;

regs = (ULONG *)(((struct ExecBase *)SysBase)->EmuWS);

packet_len = regs[REG68K_D0/ 4];
to = (uint8 *) regs[REG68K_A0/ 4];
wds = (uint8 *) regs[REG68K_A1/ 4];

printf("old copy_from_buff_68k(void)\n");

return 1;
}


static CONST ULONG buffer_tags[] =
{
S2_CopyToBuff, (uint32)©_to_buff_68k,
S2_CopyFromBuff, (uint32)©_from_buff_68k,
TAG_END
};

int main()
{
ULONG hook_tags[] = {
S2_CopyToBuff, (ULONG) copy_to_buff_ppc,
TAG_END
};

char *dev_name = "eth3com.device";
int dev_unit = 0;
int od_error = 1; // not open error
struct MsgPort *write_port = NULL, *control_port = NULL;
struct IOSana2Req *write_io = NULL, *control_io = NULL;
struct Sana2Hook *sana2_hook;

int quit = 0;
int sigs = SIGBREAKF_CTRL_C;
int rsigs;

sana2_hook = AllocVec(sizeof(struct Sana2Hook),MEMF_SHARED | MEMF_CLEAR);

control_port = CreateMsgPort();

// Create control IORequest
if (control_io = (struct IOSana2Req *)CreateIORequest(control_port, sizeof(struct IOSana2Req)))
{
control_io->ios2_BufferManagement = (void *)&buffer_tags;
od_error = OpenDevice(dev_name, dev_unit, (struct IORequest *)control_io, 0);
}

if (!od_error)
{
control_io->ios2_Req.io_Command = S2_SANA2HOOK;
control_io->ios2_DataLength = sizeof(struct Sana2Hook);

sana2_hook -> s2h_Methods = hook_tags;


control_io->ios2_Data = sana2_hook;
printf("hook errror? %d\n",DoIO((struct IORequest *)control_io));

printf("device is open do some thing!!\n");
printf("press CTRL+C to quit\n");

while( !quit )
{
rsigs = Wait( sigs );

if (rsigs & SIGBREAKF_CTRL_C) quit = 1;
}

CloseDevice((struct IORequest *)control_io);
}

if (control_io)
{
DeleteIORequest( (struct IORequest*) control_io);
}

if (control_port)
{
DeleteMsgPort(control_port);
}

}

Last edited by _Steve_ on 16-Jun-2012 at 03:05 PM.
Last edited by NutsAboutAmiga on 15-Jun-2012 at 07:27 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
olsen 
Re: IPv6
Posted on 18-Jun-2012 7:34:10
#22 ]
Cult Member
Joined: 15-Aug-2004
Posts: 774
From: Germany

@NutsAboutAmiga

Quote:

NutsAboutAmiga wrote:
@olsen

Hi, I'm getting an error 3 what am I doing wrong?


Um, this needs a lot of work...

First thing, if you are opening a network device driver, you ought to set the station address of the device. For an Ethernet device, the station address is the transport layer address which the driver listens to when it receives data, and which is also used for mapping IPv4 addresses to Ethernet hardware addresses.

The station address needs to be set up once, the first time a network device is opened. It's safe to set it again, in which case the driver will ignore it, and all devices are supposed to support the command, even if they don't actually have a station address to set.

Here's how it works, in a nutshell:


struct IOSana2Req * s2req;
int error;

// Get the hardware default address
s2req->ios2_Req.io_Command = S2_GETSTATIONADDRESS;
DoIO((struct IORequest *)s2req);

// Use the default address as the station address
memcpy(s2req->ios2_SrcAddr,s2req->ios2_DstAddr,sizeof(s2req->ios2_DstAddr));

s2req->ios2_Req.io_Command = S2_CONFIGINTERFACE;
s2req->ios2_WireError = 0;

error = DoIO((struct IORequest *)s2req);
if(error != 0)
{
// Check if this is something serious, or if the address
// is already configured (not an error)
if(s2req->ios2_WireError != 0 && s2req->ios2_WireError != S2WERR_IS_CONFIGURED)
printf("something's up: %d, %d\n",error,s2req->ios2_WireError);
}


Next thing, you might want to rewrite the copy functions. From how they look, they are written in plain PPC code. This means that the Ethernet device driver will pass the parameters to them like any standard PPC function, and that the 68k emulator operations are not just unnecessary, but will likely fail to produce anything.

You'll need the 68k emulator only if you are expecting the device driver to be written in 68k code itself.

Anyway, your copy_to_buff function should use the following prototype:


LONG s2_copy_to_buff(APTR to_buffer,const UBYTE * from,ULONG len);


And the corresponding copy_from_buff should look something like this:


LONG s2_copy_from_buff(UBYTE * to,const APTR from_buffer,ULONG len);


Note that the to_buffer/from_buffer parameters will contain pointers to the buffer management data structures you are using, and not an APTR (which I just picked for the sake of the example).

I hope that this is helpful for the next steps you'll be taking

Incidentally, the numeric error codes you saw match the definitions in "devices/sana2.h", and you should look up what they say. The number 3 stands for "S2ERR_BAD_ARGUMENT" which in the header file is annotated as meaning "garbage somewhere". To get a more specific explanation of what is meant by this general error, have another look at the Sana2Req->ios2_WireError field which provides for more detailed information on the error. For example, the wire error field could be "S2WERR_NOT_CONFIGURED", meaning that the device driver refuses to perform your read/write request because the S2_CONFIGINTERFACE command was never used.

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 18-Jun-2012 15:03:50
#23 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@olsen

Thanks, I see if get stuff working when I get home.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 19-Jun-2012 20:58:30
#24 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@Dirk-B

I think conversion of IPv6 to IPv4 is possible, while its true you have more IP’s in IPv6 then IPv4, it’s not true that you are going to access all IP’s of IPv6 in a day, so what I’m saying is that IPv6 can temporary be assigned to a local IPv4 addresses for a day, all you need virtual DNS and gateway take care of the virtualization.

1. Local PC asks Virtual DNS server for IP of name ‘blabla’
2. Virtual DNS server ask Real DNS server for IPv6,
3. IPv6 IP stored in routing table, a virtual ip 11.0.0.1 is assigned to IPv6, (etch time virtual address is incremented 11.0.0.2 is next to be assigned)
4. virtual DNS returns virtual IPv4 address to local pc.

5. Local PC connects to 11.0.0.1 over the virtual router,
6. virtual router convert IPv4 into IPv6 using the routing table.

If 11.0.0.1 is not used for 12 hour is the virtual DNS entry and Virtual Route entry is dropped.

This way might be able to use 11.0.0.0/8 for virtualization, that’s 16777216 addresses that can assigned and re assigned over and over again, while your computer might not have the capacity to store so many virtual entries that not needed anyway because you only need to have number IP’s you accessed in maybe last hour .

It’s like whit ARP table it normally no more than 4 or 5 entries as list is often flushed.

There are probably a few security analysts that jump on me now if they read what I have suggested, they most likely hate it, because it makes all internet addresses anonymous, just looking IP’s will totally useless as identification, it also makes it hard to block IP addresses in programs, but that’s the job of a firewall not the program right?

Last edited by NutsAboutAmiga on 20-Jun-2012 at 02:57 PM.
Last edited by NutsAboutAmiga on 19-Jun-2012 at 09:58 PM.
Last edited by NutsAboutAmiga on 19-Jun-2012 at 09:00 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Dirk-B 
Re: IPv6
Posted on 19-Jun-2012 22:24:18
#25 ]
Super Member
Joined: 8-Mar-2003
Posts: 1185
From: Belgium

@NutsAboutAmiga and all

Thanks for the explanation.


_________________
A1G3-SE + OS4.1 u1 iso (x2)

 Status: Offline
Profile     Report this post  
Seer 
Re: IPv6
Posted on 20-Jun-2012 10:47:04
#26 ]
Team Member
Joined: 27-Jun-2003
Posts: 3725
From: The Netherlands

@NutsAboutAmiga

AFAIK, IP6 is not simply a bigger ip adress. The packets send/received are different as well for instance. Sending a IP6 packet to an IP4 adress would need some conversions as well if even possible.

_________________
~
Everything you say will be misquoted and used against you..
~

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 20-Jun-2012 12:46:05
#27 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@Seer

Well yes… you need two way handshake, and you need to repackage etch package content, recalculate the CRC etc.

Last edited by NutsAboutAmiga on 20-Jun-2012 at 12:46 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Seer 
Re: IPv6
Posted on 20-Jun-2012 13:33:48
#28 ]
Team Member
Joined: 27-Jun-2003
Posts: 3725
From: The Netherlands

@NutsAboutAmiga

Somehow I still don't think it's feasable to do. If it was easy, then I would think the adoption of IP6 would have happened several years ago.

Just that for instance an IP4 header is more complex then IP6 and you would need to build a new header for the packet in a way that IP4 accepts it (note that the header in ip6 should be bigger then ip4), plus you would need to send at least 2 ipv4 packets for every 1 IP6 packet (I think). I'm also not sure how you would handle the bigger payloads then IP4 would allow.

Also, you talk about dns, but I'm uncertain how you could get an IP6 dns if the stack only has an ip4 able dns?

Wouldn't the time spend on this be better used to create a new network stack? (Not to put you off, I know programmers dont like these questions (the "is it not better to spend time on" part)

Last edited by Seer on 20-Jun-2012 at 01:34 PM.

_________________
~
Everything you say will be misquoted and used against you..
~

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 20-Jun-2012 14:24:21
#29 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@Seer

Probably, but let’s say you have more the one computer in your house that does not support IPv6.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
jkirk 
Re: IPv6
Posted on 20-Jun-2012 15:43:39
#30 ]
Elite Member
Joined: 28-Jan-2005
Posts: 3349
From: Georgia (usa)

@Seer

tho working with an existing stack makes learning the basics a bit easier even if it is better to start over.

Last edited by jkirk on 20-Jun-2012 at 03:44 PM.

_________________
Win•dows: n. A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition.

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 20-Jun-2012 19:00:21
#31 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@jkirk

I won’t promise anything it’s just an experiment, a jigsaw puzzle whit many components.

I hope to be able implement stuff in stages, unlike roadshow / sana2, Infinity stack will be divided in to many separate libraries; this means that parts can be taken out and replaced or improved.

You won’t need to stack up bunch of CMD_READ request to the devices, like whit sana2.

For now I think concentrate on getting network working in Basilisk whit the sana2 implementation.

Infinity will get sana2 gateway driver, it will work as translation layer between two different api’s.

I have no intention of coping existing API, this will be clean start, it also means that no existing application will be able to use Infinity for a long time to come.
While I might be able to produce an ARP.library from my ARP plugin tomorrow it’s of no or little use to anyone besides someone like me who is working on creating a new network stack, (yeh network stack, not tcp/ip stack)
Note there are many parts that have to work.

IPv4 (implemented)
IPv6 (started on, untested)
NDP (Network discovery protocol, think it is used by IPv6, not implemented, don’t think we need it, to speak IPv6)
TCP (partly implemented, problems whit handshake, MacOS knows about me but thinks the connection is lost)
ICMP (implemented, and working, ping protocol)
UDP (implemented, a simple protocol, that does not care for package loss)
ARP (implemented)
DHCP client (not implemented)
IPX/SPX (optimal, not implemented)
PPP (not implemented, used serial or cable modems, don’t think we need that)

The current implantation also has

“Link layer” a low level layer for distributing packages based on their mac address, it unclear at the moment if all traffic should go into this API, or if some packages should be allowed to go from device to device, to avoid overhead.

“connections” layer to keep track of sequence numbers, handshaking, in and out going port numbers.

“routing api” a api used when sender don’t know where to send traffic, currently its not implemented, instead when conection is created a ARP request will be sent to get mac address, if its not found then the connection failed.

“socket api” upper layer needs lots of work!!

“common api” standard api for plugin interface, checksums.

Last edited by NutsAboutAmiga on 04-Jul-2015 at 08:29 AM.
Last edited by NutsAboutAmiga on 21-Jun-2012 at 04:04 PM.
Last edited by NutsAboutAmiga on 20-Jun-2012 at 07:51 PM.
Last edited by NutsAboutAmiga on 20-Jun-2012 at 07:07 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
olsen 
Re: IPv6
Posted on 21-Jun-2012 13:41:43
#32 ]
Cult Member
Joined: 15-Aug-2004
Posts: 774
From: Germany

@NutsAboutAmiga

One word of advice: if you are going to break down your design into components which would be implemented as shared libraries, you'll want to make sure that the library names all begin with a common prefix. Here's why: the Amiga library "name space" is flat, and no authority exists which watches over it, preventing name space collisions.

So, for example, instead of using "arp.library" for the ARP specific portions of your design, you might want to use "jigsaw-arp.library" instead (if you want to call your TCP/IP stack "jigsaw", that is).

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 22-Jun-2012 13:10:37
#33 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@NutsAboutAmiga

Quote:
For now I think I concentrate on getting network working in Basilisk whit the sana2 implementation.


http://www.os4depot.net/index.php?function=uploads

uploaded all my changes to basilisk II.
(I think, replace the binary file when exit code is fixed.)

Last edited by NutsAboutAmiga on 22-Jun-2012 at 01:13 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: IPv6
Posted on 22-Jun-2012 13:11:44
#34 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@olsen

yes I was will, put prefix on all libraries I create.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Chris_Y 
Re: IPv6
Posted on 3-Jul-2015 11:44:51
#35 ]
Elite Member
Joined: 21-Jun-2003
Posts: 3203
From: Beds, UK

Tick tock tick tock tick tock
http://www.theguardian.com/technology/2015/jul/03/ipv4-north-america-ip-addresses-internet

_________________
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar is Tabitha by Eric W Schwartz

 Status: Offline
Profile     Report this post  
BigD 
Re: IPv6
Posted on 3-Jul-2015 13:34:08
#36 ]
Elite Member
Joined: 11-Aug-2005
Posts: 7307
From: UK

@opi

Both OS X Snow Leopard and Tiger have to have IPv6 disabled to work correctly over the internet on my PlusNet router. It doesn't fill me with that much confidence that the latest version of OS X have overcome whatever the incompatibilities are

The PS3 for comparison doesn't seem to have a problem with IPv6!

_________________
"Art challenges technology. Technology inspires the art."
John Lasseter, Co-Founder of Pixar Animation Studios

 Status: Offline
Profile     Report this post  
DWolfman 
Re: IPv6
Posted on 3-Jul-2015 14:13:57
#37 ]
Super Member
Joined: 18-Jun-2003
Posts: 1442
From: Leavenworth, KS USA

@BigD

Does that router support IPv6, and is it enabled?

It may not be OSX's fault, if the router isn't allowing it or has a crap implementation.

_________________
This posting, in it's entirety, is the opinion and/or statement of the author and does not reflect the views and/or position of this site.

 Status: Offline
Profile     Report this post  
kolla 
Re: IPv6
Posted on 3-Jul-2015 17:45:15
#38 ]
Elite Member
Joined: 20-Aug-2003
Posts: 2859
From: Trondheim, Norway

I have used all kinds of OSX since back in PPC days on IPv6 without much issues, the few that existed were fixed, OSX use a spin of the same KAME stack that most other BSDs use too, it is quite solid.

FreeBSD has a IPv6-only distribution, if you want to be legacy clean, hehe. You can still access IPv4 only resources online by means of NAT64 and DNS64. I have ran my home LAN IPv6 only a few times and everything works fine now. In fact the only reason I don't do it permanently, are amigoid systems. But, I see less and less reason to use amigoid systems for anything Internet related - too much hassle.

_________________
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC

 Status: Offline
Profile     Report this post  
BigD 
Re: IPv6
Posted on 3-Jul-2015 18:45:34
#39 ]
Elite Member
Joined: 11-Aug-2005
Posts: 7307
From: UK

@kolla

Explain then why I had to disable IPv6 on both my Macs to get them to work with my new PlusNet IPv6 compliant router? As I say the PS3 was solid but the Macs crashed when trying to connect to the internet until I disabled IPv6!

_________________
"Art challenges technology. Technology inspires the art."
John Lasseter, Co-Founder of Pixar Animation Studios

 Status: Offline
Profile     Report this post  
kolla 
Re: IPv6
Posted on 3-Jul-2015 18:57:38
#40 ]
Elite Member
Joined: 20-Aug-2003
Posts: 2859
From: Trondheim, Norway

@BigD

Much too little information to go on. First of all, do you even have native IPv6 provided, or do you rely on some tunnelling? It sounds very unlikely that your macs crash, but they may very well temporarily hang if you have a bogus configuration.

_________________
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle