English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 02 October 2020, 07:48   #1
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
[WinUAE] BSDSocket SocketBaseTagList()

Hello Tony,

About this part here :
https://github.com/tonioni/WinUAE/bl...cket.cpp#L1460

Do you think it would be possible to implement some of the AmiTCP standard tags such as :

SBTM_GETREF(SBTC_GET_BYTES_SENT)
SBTM_GETREF(SBTC_GET_BYTES_RECEIVED)

So that such monitor tool could work also on UAE :
https://github.com/flype44/DockBot/b...Net/net.c#L215

Last edited by flype; 02 October 2020 at 07:54.
flype is offline  
Old 02 October 2020, 20:01   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Can be done but what does bytes sent and bytes received mean? Total count of bytes transferred using TCP and UDP sockets?

EDIT: and it would be nice to have some header file that tells value of those two defines.

Last edited by Toni Wilen; 02 October 2020 at 20:16.
Toni Wilen is offline  
Old 02 October 2020, 20:28   #3
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
Yes, it's the total bytes sent/recv, copied in a 64bits quad, by reference, since last init of the stack.

It's, as far as i understand, a AmiTCP v4 specification.

It's described in the public RoadShow API by Olaf Barthel (bsdsocket.doc, and bsdsocket.h), freely downloadable, or here https://wiki.amigaos.net/amiga/autod...socket.doc.txt

Remark:
There are also other ways, by network 'interface' (if/when a system would have more than one NIC), or SANA methods.
Advantage of that one is it's global (sum of) to all interfaces, which probably fits good the concept of the UAE auto-embedded bsdsocket / Single-interface.

Code:
	SBTC_GET_BYTES_RECEIVED
	    Obtain the number of bytes received by the TCP/IP stack.
	    The parameter must be of type 'SBQUAD_T'. Note that the
	    data must be passed by reference.

	    Older version of "bsdsocket.library" may return a failure
	    code when querying this option.

	SBTC_GET_BYTES_SENT
	    Obtain the number of bytes sent by the TCP/IP stack.
	    The parameter must be of type 'SBQUAD_T'. Note that the
	    data must be passed by reference.

	    Older version of "bsdsocket.library" may return a failure
	    code when querying this option.
Code:
/* Query the number of bytes received so far. */
#define SBTC_GET_BYTES_RECEIVED 64

/* Query the number of bytes sent so far. */
#define SBTC_GET_BYTES_SENT 65
Code:
typedef struct
{
	ULONG sbq_High;
	ULONG sbq_Low;
} SBQUAD_T;

Last edited by flype; 02 October 2020 at 21:07.
flype is offline  
Old 02 October 2020, 20:48   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Done. Untested. winuae.7z updated.

Spec does not say what would happen if SBTM_GETVAL is attempted (UAE will ignore it).
Toni Wilen is offline  
Old 02 October 2020, 21:05   #5
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
Ok just did some searchs since it's was not very clear to me from which Amiga TCP standard they belongs. Olaf could tell better.

Looking at those packages :
http://aminet.net/package/comm/tcp/MiamiSDK211
http://aminet.net/package/comm/tcp/AmiTCP-SDK-4.3
https://www.amigafuture.de/app.php/d...ils?df_id=3658 => Roadshow-SDK-1.5.lha

When browsing in the Miami and AmiTCP ones,
SocketBaseTagList() is there, but not those SENT/RECV BYTES tags (and others).

So actually it seems they _could_ be new from RoadShow.

That said, those are quite de facto a standard.

Well, given those facts, i dont know, you are free to decide if it makes sense to have some up-to-date similarities between the last bsdsocket.h specifications and the UAE one. Maybe this can be debated.
flype is offline  
Old 02 October 2020, 21:06   #6
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
Happy

Quote:
Originally Posted by Toni Wilen View Post
Done. Untested. winuae.7z updated.

Spec does not say what would happen if SBTM_GETVAL is attempted (UAE will ignore it).
Oh, you were fast

Need i test asap now.
flype is offline  
Old 02 October 2020, 21:31   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
It was too trivial (note that it does not mean it is correct!)

Any other missing bsdsocket features?
Toni Wilen is offline  
Old 02 October 2020, 21:54   #8
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
Quote:
Spec does not say what would happen if SBTM_GETVAL is attempted (UAE will ignore it).
Which is correct behaviour imho, since it's about 64bits, it would not fit.

Quote:
Any other missing bsdsocket features?
Ouch Probably a lot since Olaf pushed a huge number of new specs/features in his stack.

If i had myself to choose, i would focus on the 'monitoring' and 'hooks' ones, which may brings new debugging levels for developers (which the strong force of UAE over hw when it comes to help people in development), and monitor tools for end users.

Code:
/* Whether or not the monitoring API is supported. */
#define SBTC_HAVE_MONITORING_API 50
Code:
	SBTC_HAVE_MONITORING_API
	    This tag is an extension to the AmiTCP V4 API and must be
	    used prior to calling any of the interface API functions,
	    such as AddNetMonitorHookTagList() and RemoveNetMonitorHook().
	    Since older "bsdsocket.library" implementations do not
	    process this tag you should be prepared to handle failure of
	    the query operation.

	    This tag will return TRUE if the monitoring API is supported,
	    and FALSE or failure otherwise.
Those ones would be too much pastings here, though.
Best is have a look at the API from Roadshow-SDK-1.5.lha

However, i'd probably better ask Olaf if he just agree / happy that this standard specs can be shared by others stacks.
flype is offline  
Old 02 October 2020, 21:56   #9
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
Most importantly: it MUST be used in some existing software. I don't support features that can't be tested and no one uses.
Toni Wilen is offline  
Old 02 October 2020, 22:10   #10
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
Yeah, you're right.

SampleNetSpeed for example, use them, and is a useful one.

And that DockBot module i'm working on.

Let's ask Olaf.
https://eab.abime.net/showpost.php?p...9&postcount=44
flype is offline  
Old 05 October 2020, 21:13   #11
flype
Registered User
 
Join Date: Dec 2014
Location: France
Posts: 104
Olaf is ok.

https://eab.abime.net/showpost.php?p...2&postcount=50

Will tell you how behave the beta.
flype is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bsdsocket.Library Emufr3ak Coders. Asm / Hardware 5 25 December 2016 11:20
winuae bsdsocket.library clauddio support.WinUAE 5 21 July 2015 21:47
bsdsocket missing source support.WinUAE 3 23 June 2013 14:48
bsdsocket slowdown amigan support.WinUAE 0 20 January 2004 12:37
bsdsocket problem KurZon support.WinUAE 1 05 May 2003 10:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:52.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08225 seconds with 13 queries