mfc >> IP Header

by Duncan » Mon, 22 Nov 2004 22:56:08 GMT

Hi,
Not sure whether this is the right place to ask, but as I'm using MFC as the
basis I thought I'd start here.

Does anyone know whether it's possible to access the IP Header ...
specifically the dscp bits sometimes used by service providers to decide
Class of Service across their networks. I want to create a utility where I
can specifically set the dscp bits to choose a particular class of service
for a sream of traffic across a network and measure response times. I then
would change the values, rerun the tests and compare the results.

The idea is to have a utility that will allow me to test whether the network
behaves as I want it to for various CoS values.

thanks,
Duncan




mfc >> RE: IP Header

by RS1XYW4 » Mon, 31 Jan 2005 18:09:03 GMT


You may have already had this answered but what you need to use is
either/both of

(i) TcMon.exe - this is a Windows 2000 GUI utlity with apparently not much
documentation. It sits on top of the Traffic control QoS API and allows you
to create
flows, add filters to that flow and then effect DSCP markings..well almost.
You will be able to mark specific IP packets (according to your filter) with
a class of service however if you want to mark specific DSCP values you'll
have to override the marking in the registry. If you do a google you should
find what you are after. I suspect that you may be better wiring your own
little app and use the TC API to do what you are after. PS you'll also need
to install the QoS PAcket Scheduler on the NIC you are using..easy..just do a
search on Ms for this.

(ii) Traffic Control QoS APU - allows your client application to register
with the TC and set up flows, filters as you please

Spookily I need to do EXACTYL the same as you so if you could point me at
some example code that'd be good :))

Best Regards
E-Wan







Similar Threads

1. IP Header Checksum Bad

Hello --

I have code that sends an SNMP packet using the Socket.SendTo method.
When we sniff the packets using Ethereal, the UDP header checksum
appears to be all right, but the IP header checksum is 0x0000.  This
results in my SNMP packets being rejected at the server.

Does anybody know anything about why this could be happening?

Thank you --
Robert

2. How to get static IP or name from dynamic IP - CSharp/C#

3. IP stack - ip translation

Hi,

I'd like to accomplish this (pseudo code):

if ( domain = host1.domain1.com || ip = w.x.y.z )
{
    domain = host2.domain2.com;
    ip = dnslookup ( domain );
}

On the tcp stack, effectively transparently replacing one ip by another.
This requires some low level access to tcp packets so data fields can be 
manipulated, like firewalls, proxies, nats and pats do. It can be easily 
accomplished with iptables on linux platform.

But how could I implement such thing? Many years ago, I remembered that on 
the pc you could REPLACE the standard winsock.dll with a proxy stub that 
takes the place of winsock, and passes everything on to the original 
winsock.dll, but sitting in the middle and manipulating winsock calls as 
they come by. But desktop pc firewalls are implemented differently I think.

Can this be accomplished on the application level (with winsock api's or 
something), or does it have to happen on the driver level, or what? I have 
no clue about how to manipulate IP packets.. on what level that is and how 
to get access to it.

Any hints and pointers are very welcome


4. DWORD IP Address to Displayable IP Address

5. Standard Library Headers and a Precompiled Headers

I #include them in stdafx.h in order to save compile time. What cons have
you heard of? I am curious too.

www.fruitfruit.com



"Mike M" <Mike  XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> In your experience, what are the pros/cons of including STL header files
into
> a precompiled header?
>
> Thanks,
> Mike
>


6. CListView: Insert Table header above column headers

7. Unable to fetch CListCtrl header information(Header title)

Hi,
I am trying to fetch header information(header title) of CListCtrl
using GetColumn function. GetColumn function is not populating the
LVCOLUMN structure.

I am running my code in release mode on Win2k and Win2k3 clients. I
have also attached the code snippet that I'm using..

Please let me know what is worng here..

Thanks..

code snippet :

int ColumnCount = m_ListCtrl.GetHeaderCtrl()->GetItemCount();

	LVCOLUMN col;
	col.mask = LVCF_TEXT;
	col.pszText = new(char[50]);
	TmpText = "";
    for (int j=0; j< ColumnCount; j++)
	{
		m_ListCtrl.GetColumn(j, &col);
		TmpText += (LPCTSTR)col.pszText;
		TmpText += "\t";
 		
	}
            
    TmpText += "\r\n";
    CopyText += TmpText;

8. Auto-generating C header file from C++ header?