![]() |
![]() |
#1 |
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. |
![]() |
![]() |
#2 |
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. |
![]() |
![]() |
#3 |
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. |
![]() |
![]() |
#4 |
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). |
![]() |
![]() |
#5 |
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. |
![]() |
![]() |
#6 |
Registered User
Join Date: Dec 2014
Location: France
Posts: 104
|
![]() |
![]() |
![]() |
#7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,575
|
It was too trivial
![]() Any other missing bsdsocket features? |
![]() |
![]() |
#8 | ||
Registered User
Join Date: Dec 2014
Location: France
Posts: 104
|
Quote:
Quote:
![]() 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. 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. |
||
![]() |
![]() |
#9 |
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.
|
![]() |
![]() |
#10 |
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 |
![]() |
![]() |
#11 |
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. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|