"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"
Verwijderd
Dit hangt 'n beetje van je netwerk drivers af de een report packets de ander bytes.Mizitras schreef op 20 december 2002 @ 22:55:
Dit bestaat niet onder WIN2K dacht ik, is het niet:
-Ergens waar je kan zien hoeveel bytes er die sessie al zijn binnengekomen en uitgegaan. (Enkel het aantal packets).
is vast wel uit de iphlpapi te vissen.Kan wel overweg met C en C++ maar ben op gebied van VC++ een newbie.
met wat voor functie of windowsclass roep ik zoiets aan om dan dat te volgen/tracken?
Dus uit deze functies http://msdn.microsoft.com...p/categorical_listing.asp (vooral die van onderaan denk ik) kan ik er een van gebruiken die me de ups/downs zal terugsturen (on return) ?Verwijderd schreef op 20 December 2002 @ 23:11:
[...]
Dit hangt 'n beetje van je netwerk drivers af de een report packets de ander bytes.
[...]
is vast wel uit de iphlpapi te vissen.
sorry hoor, maar geraak er niet echt wijs uit.
Ik kan deze uiteindelijk gewoon gebruiken die functie en hetgeen wat ik terugkrijg in een variabele steken en outputten? Dit alles binnenin mijn main form en daarboven een #include ???IP Helper Function bibliotheek aanroepen?
Dit gaat een zware bevalling worden voel ik al
"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"
Verwijderd
Correct.Mizitras schreef op 20 december 2002 @ 23:45:
Dus uit deze functies http://msdn.microsoft.com...p/categorical_listing.asp (vooral die van onderaan denk ik) kan ik er een van gebruiken die me de ups/downs zal terugsturen (on return) ?
Komop beetje zoeken, houd 't leuk toch?sorry hoor, maar geraak er niet echt wijs uit.
Oei toch niet zo goed gelezen als ik hoopte want op msdn staat er bij iedere apicall welke .h en .lib file je nodig hebt voor compileren/linken...Ik kan deze uiteindelijk gewoon gebruiken die functie en hetgeen wat ik terugkrijg in een variabele steken en outputten? Dit alles binnenin mijn main form en daarboven een #include ???IP Helper Function bibliotheek aanroepen?
Hee niemand zei dat 't makkelijk ging zijn maar we slepen je er wel door heen hoorDit gaat een zware bevalling worden voel ik al
Hehe, ok met zo'n positieve 'mentor' wil ik de boel nog wel blijven afschuimenVerwijderd schreef op 21 December 2002 @ 00:05:
[...]
Correct.
[...]
Komop beetje zoeken, houd 't leuk toch?
[...]
Oei toch niet zo goed gelezen als ik hoopte want op msdn staat er bij iedere apicall welke .h en .lib file je nodig hebt voor compileren/linken...
[...]
Hee niemand zei dat 't makkelijk ging zijn maar we slepen je er wel door heen hoor
Die .h en .lib files, die zijn al bij m'n VC++ bij of moet ik die nog apart downen?
Of gewoon vermeld om te weten, aha, de moet ik aanroepen?
#include dinges.h enzovoort dus?
Zal sebiet ff edit doen en nog bevindingen noteren, heb al ff tussen de functies zitten rommelen, dat wel.
EDIT:
bibliotheek die ik moet checken of ik die heb: Iphlpapi.lib
En voor m'n include:
#include <Iphlpapi.h>
Als functie, de GetICMPStatistics ? http://msdn.microsoft.com...hlp/geticmpstatistics.asp
Of mss. de GetUdpStatistics? http://msdn.microsoft.com...phlp/getudpstatistics.asp
Geen enkele van al die ander geven mij de indruk zo'n netwerk-gegevens op te vragen, dus zit een beetje vast daar.
[ Voor 26% gewijzigd door Mizitras op 21-12-2002 00:30 ]
"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"
Verwijderd
Zitten er bij maar het kan nooit kwaad de platform sdk te installeren die bevat geupdate header files zodat je ook de nieuwere calls voor bv win2k+ kunt gebruiken tevens bevat ie honderden sample programmatjes zodat je kan zien hoe het een en ander werkt.Mizitras schreef op 21 December 2002 @ 00:10:
Die .h en .lib files, die zijn al bij m'n VC++ bij of moet ik die nog apart downen?
idd.Of gewoon vermeld om te weten, aha, de moet ik aanroepen?
#include dinges.h enzovoort dus?
TCP/IP is nu niet mijn broodje kaas snap je. Nergens wordt er voor die functies iets vermeld van packetsize of data of amount, of het heeft er geen sikkepit mee te maken.
Heb op MSDN maar eens gezocht naar upstream log enzo, maar gaf me nutteloze zaken. Spelt in een hooiberg.
"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"
Overigens, [OFFTOPIC] leuke avatar/ikoon. Is die van Pixar Studios? (Anime) Film: The birds ???Verwijderd schreef op 21 December 2002 @ 01:02:
GetIfEntry
EDIT:
En uit deze structure zullen de volgend dus zijn ingevult je crois?:GetIfEntry
The GetIfEntry functie geeft informatie terug over de specifieke interface van de plaatselijke computer.
[...]
=> Dit zet ik boven mijn void main dus? En zal variabelen uit een structure invullen?
Parameters
pIfRow
[in, out] Pointer van een MIB_IFROW structuur die wanneer succesvolle return, de informatie krijgt van een interface van de lokale computer. Bij input, plaats de dwIndex lid van MIB_IFROW naar de index van de interface van de te verkrijgen informatie.
(URL: http://msdn.microsoft.com...s/rras/rras/mib_ifrow.asp)dwInOctets
Specifies the number of octets of data received through this interface.
dwInUcastPkts
Specifies the number of unicast packets received through this interface.
dwInNUcastPkts
Specifies the number of non-unicast packets received through this interface. Broadcast and multicast packets are included.
dwInDiscards
Specifies the number of incoming packets that were discarded even though they did not have errors.
dwInErrors
Specifies the number of incoming packets that were discarded because of errors.
dwInUnknownProtos
Specifies the number of incoming packets that were discarded because the protocol was unknown.
dwOutOctets
Specifies the number of octets of data sent through this interface.
dwOutUcastPkts
Specifies the number of unicast packets sent through this interface.
dwOutNUcastPkts
Specifies the number of non-unicast packets sent through this interface. Broadcast and multicast packets are included.
dwOutDiscards
Specifies the number of outgoing packets that were discarded even though they did not have errors.
dwOutErrors
Specifies the number of outgoing packets that were discarded because of errors.
En die heb ik allemaal nodig? Grote van packetjes weet ik dan toch niet, of wel? En moet ik alle 'outgoing' dinges dan 'optellen' voor een totaal te krijgen, ja zeker? Maar dan krijg ik een totaal van packets, nog niet wetende hoeveel bits, bytes of iets dergelijks, is het niet?
AARghhhh wat een zootje
[ Voor 85% gewijzigd door Mizitras op 21-12-2002 22:55 ]
"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"
Verwijderd
Om een lang verhaal kort te maken heb ik toen een kernel-mode driver gemaakt die op de TDI laag alle verkeer filtert en aan een logging programma doorgeeft welke verbindingen er gemaakt worden... Ik weet niet hoe dingen als zonealarm enzo werken, maar ik vermoed dat zij voor firewall functionaliteit min of meer dezelfde truuk uithalen (tenzij er in windows nog iets verboregen zit waarvan ik het bestaan niet afweet
Verwijderd
Idd kerstboom / sneeuw er zelf bij moeten tekenen though..Mizitras schreef op 21 december 2002 @ 22:44:
Overigens, [OFFTOPIC] leuke avatar/ikoon. Is die van Pixar Studios? (Anime) Film:
The birds ???
AARghhhh wat een zootje![]()
1
2
3
4
| dwOutOctets Specifies the number of octets of data sent through this interface. dwInOctets Specifies the number of octets of data received through this interface. |
'n octet is 'n groepje van 8 bits.. eej een byte ook.. wat 'n toeval zeg...
[ Voor 4% gewijzigd door Verwijderd op 22-12-2002 16:02 ]
1
2
3
4
| dwOutOctets Specifies the number of octets of data sent through this interface. dwInOctets Specifies the number of octets of data received through this interface. |
'n octet is 'n groepje van 8 bits.. eej een byte ook.. wat 'n toeval zeg... 8)[/quote]
The man has a point...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| /*
Voorbereiding:
-Controleren of ik deze bibliotheek heb?
Zoniet, die is gewoon te downloaden???
*/
#include <Iphlpapi.h>
#include <iostream.h>
#include <conio.h>
typedef struct _MIB_IFROW {
WCHAR wszName[MAX_INTERFACE_NAME_LEN];
DWORD dwIndex;
DWORD dwType;
DWORD dwMtu;
DWORD dwSpeed;
DWORD dwPhysAddrLen;
BYTE bPhysAddr[MAXLEN_PHYSADDR];
DWORD dwAdminStatus;
DWORD dwOperStatus;
DWORD dwLastChange;
DWORD dwInOctets;
DWORD dwInUcastPkts;
DWORD dwInNUcastPkts;
DWORD dwInDiscards;
DWORD dwInErrors;
DWORD dwInUnknownProtos;
DWORD dwOutOctets;
DWORD dwOutUcastPkts;
DWORD dwOutNUcastPkts;
DWORD dwOutDiscards;
DWORD dwOutErrors;
DWORD dwOutQLen;
DWORD dwDescrLen;
BYTE bDescr[MAXLEN_IFDESCR];
} MIB_IFROW, *PMIB_IFROW;
void main()
{
DWORD GetIfEntry(
PMIB_IFROW pIfRow
);
/*
Als ik nu daarna dwOutOctets wil weten. Voer ik dus die functie uit.
En doe daarna iets als cout << "aantal bits: " << GetIfEntry.dwOutOctets;
Niet ?
DWORD is toch mijn type variabele en GetIfEntry mijn variable zelf, niet?
*/
} |
Zoiets als bovenstaande dus?
Off-topic misschien, maar deze MSDN-opgevraagde code, die werkt ook flawless met VC++ .NET? Is zoveel anders aan of moet je er gewoon anders mee omspringen, in ieder geval, iets van beide walletjes toch. Maar de code zoals deze is gewoon 'crossover' ?
"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"
Ja ik weet het, maar zo op m'n eentje geraak ik er toch niet hoor, heb hier al de voorbije dagen zitten klungelen
Is dat wat correct wat hierboven stond of niet? Yarvieh ?
"the fucking alpha cpp compiler seems to fuck up the goddam type "LPITEMIDLIST", so to work around the fucking peice of shit compiler we pass the last param as an void *instead of a LPITEMIDLIST"