How to manually restart TCP/IP stack in OS4.1?
-
- Posts: 18
- Joined: Wed Oct 09, 2013 7:54 pm
How to manually restart TCP/IP stack in OS4.1?
Hello all,
While I'm still working to get my AmigaOneXE to work, I was able to pick up used micro-A1C, which is a fun little computer. It has a licensed copy of OS4.1, updated to the absolute latest.
I noticed that many times, I have to rebuild my internal ethernet settings before I can ping even my own router. Once I make the changes, I see a window popup saying that it is restarting the stack, when that happens, all is well.
Until I figure out what is really going on, I was curious how we restart the TCP stack manually?
Thanks!
While I'm still working to get my AmigaOneXE to work, I was able to pick up used micro-A1C, which is a fun little computer. It has a licensed copy of OS4.1, updated to the absolute latest.
I noticed that many times, I have to rebuild my internal ethernet settings before I can ping even my own router. Once I make the changes, I see a window popup saying that it is restarting the stack, when that happens, all is well.
Until I figure out what is really going on, I was curious how we restart the TCP stack manually?
Thanks!
Re: How to manually restart TCP/IP stack in OS4.1?
I'm not sure if you mean this, but if I turn my Telewell ADSL Modem/Router off and on, the X1000/OS4.1 doesn't get online automatically again (as my Wind*** machine does). I have the following procedure:themamboman wrote:Hello all,
While I'm still working to get my AmigaOneXE to work, I was able to pick up used micro-A1C, which is a fun little computer. It has a licensed copy of OS4.1, updated to the absolute latest.
I noticed that many times, I have to rebuild my internal ethernet settings before I can ping even my own router. Once I make the changes, I see a window popup saying that it is restarting the stack, when that happens, all is well.
Until I figure out what is really going on, I was curious how we restart the TCP stack manually?
Thanks!
- C:NetShutDown (closes the network connections)
- run >nil: AddnetInterface interface interface (in my system, the interface name is simply 'interface')
- run >nil: Amidock (when shutting down the network the Amidock closes also for some reason, maybe because of some of the dockies)
Marko
Marko
Re: How to manually restart TCP/IP stack in OS4.1?
When the TCP/IP stack shuts down, it sends a break command to any programs that are using it. You probably have a docky installed which utilises or monitors the network. Other network programs will also shut down. It is very important to make sure everything is saved before running NetShutDown as most things will quit without warning!blmara wrote:- run >nil: Amidock (when shutting down the network the Amidock closes also for some reason, maybe because of some of the dockies)
Re: How to manually restart TCP/IP stack in OS4.1?
For AmiDock, if you use NetDock, it's the culprit.
I tried to handle the SIGBREAK in NetDock months ago but didn't succeed to implement it.
I tried to handle the SIGBREAK in NetDock months ago but didn't succeed to implement it.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
- javierdlr
- Beta Tester
- Posts: 389
- Joined: Sun Jun 19, 2011 11:13 pm
- Location: Donostia (GUIPUZCOA) - Spain
- Contact:
Re: How to manually restart TCP/IP stack in OS4.1?
If you addzzd10h wrote:For AmiDock, if you use NetDock, it's the culprit.
I tried to handle the SIGBREAK in NetDock months ago but didn't succeed to implement it.
Code: Select all
signal(SIGINT, SIG_IGN); // Do CTRL-C checking ourself
Re: How to manually restart TCP/IP stack in OS4.1?
As javierdlr points out, adding signal(SIGINT, SIG_IGN) at the beginning of a program and adding the break flag in your input loop like Wait(mysignals | SIGBREAKF_CTRL_C) should work in a program. I don't know how dockies work but if AmiDock is receiving signals that are passed on to the appropriate dockie, it might be reacting to a break signal (Ctrl-C) that is intended for NetDock. You may need to start a seperate process that interacts with RoadShow and passes info to NetDock with exec messages. Of course, that's just a wild guess since I've never worked on a dockie or seen the NetDock source code.zzd10h wrote:For AmiDock, if you use NetDock, it's the culprit.
I tried to handle the SIGBREAK in NetDock months ago but didn't succeed to implement it.
AmigaOne X1000 with 2GB memory - OS4.1 FE
Re: How to manually restart TCP/IP stack in OS4.1?
@Javierdir :
Thank you but I don't find your signal in your mixer/docky sources.
@Xenic :
The problem is there is no wait loop in a docky, at least according my very little docky knowledge.
But thx guys for help
Thank you but I don't find your signal in your mixer/docky sources.
@Xenic :
The problem is there is no wait loop in a docky, at least according my very little docky knowledge.
But thx guys for help

http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
- javierdlr
- Beta Tester
- Posts: 389
- Joined: Sun Jun 19, 2011 11:13 pm
- Location: Donostia (GUIPUZCOA) - Spain
- Contact:
Re: How to manually restart TCP/IP stack in OS4.1?
mixer original in main.c (althought is commented out):zzd10h wrote:@Javierdir :
Thank you but I don't find your signal in your mixer/docky sources.
@Xenic :
The problem is there is no wait loop in a docky, at least according my very little docky knowledge.
But thx guys for help
Code: Select all
signal(SIGINT, SIG_IGN); // Do CTRL+C checking ourself
Code: Select all
IIntuition->GetAttr(WINDOW_SigMask, win[OID_MAIN], &wsignal);
while( !ProcessDockWindow() ); // Input Event Loop
..
BOOL ProcessDockWindow(void)
{
uint32 wait = IExec->Wait(wsignal|SIGBREAKF_CTRL_C);
if(wait & SIGBREAKF_CTRL_C) return FALSE;
if(wait & wsignal)
{
uint32 result = WMHI_LASTMSG;
int16 code = 0;
while( (result = IIntuition->IDoMethod(win[OID_MAIN], WM_HANDLEINPUT, &code)) != WMHI_LASTMSG )
{
..
Re: How to manually restart TCP/IP stack in OS4.1?
I don't have a "BOOL ProcessDockWindow(void)" in my Docky and I don't find it in the Autodocs.
Isn't it one of your own function ?
And during your wait, the program no more respond, no ?
Thank you
Guillaume
Isn't it one of your own function ?
And during your wait, the program no more respond, no ?
Thank you
Guillaume
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
- javierdlr
- Beta Tester
- Posts: 389
- Joined: Sun Jun 19, 2011 11:13 pm
- Location: Donostia (GUIPUZCOA) - Spain
- Contact:
Re: How to manually restart TCP/IP stack in OS4.1?
1)Yes, sorry 'BOOL ProcessDockWindow(void)' it's an own function.zzd10h wrote:I don't have a "BOOL ProcessDockWindow(void)" in my Docky and I don't find it in the Autodocs.
1)Isn't it one of your own function ?
2)And during your wait, the program no more respond, no ?
2)Thus I use CreateNewProcess() to detaches from "code"/docky.
More & less is something like this (not in front of my miggy sorry):
Code: Select all
case DOCKY_SINGLECLICK:
if(!SingleClick) break;
case DOCKY_DOUBLECLIK:
OpenWindowNP(); // uses CreateNewProcess -> detaches from "code"/docky
break;
..
void OpenWindowNP(void)
{
CREATENEWPROCESS calling OpenWindow()
}
void OpenWindow(void)
{
blah blah
IIntuition->GetAttr(WINDOW_SigMask, win[OID_MAIN], &wsignal);
while( !ProcessDockWindow() ); // Input Event Loop
blah blah
REACTION DisposeObjects
blah blah
}
..
BOOL ProcessDockWindow(void)
{
uint32 wait = IExec->Wait(wsignal|SIGBREAKF_CTRL_C);
if(wait & SIGBREAKF_CTRL_C) return FALSE;
if(wait & wsignal)
{
uint32 result = WMHI_LASTMSG;
int16 code = 0;
while( (result = IIntuition->IDoMethod(win[OID_MAIN], WM_HANDLEINPUT, &code)) != WMHI_LASTMSG )
{
..
}