Click here to Skip to main content
15,881,882 members
Home / Discussions / C#
   

C#

 
AnswerRe: Graphics and pixel manipulation Pin
Office Lineman17-Apr-06 13:51
Office Lineman17-Apr-06 13:51 
GeneralRe: Graphics and pixel manipulation Pin
Maksymus00717-Apr-06 22:44
Maksymus00717-Apr-06 22:44 
QuestionDatagridview Pin
thepersonof17-Apr-06 13:03
thepersonof17-Apr-06 13:03 
AnswerRe: Datagridview Pin
Office Lineman17-Apr-06 13:36
Office Lineman17-Apr-06 13:36 
GeneralRe: Datagridview Pin
thepersonof17-Apr-06 22:34
thepersonof17-Apr-06 22:34 
QuestionWSACancel when using RAW TCP Pin
Dave k.a. DPA17-Apr-06 12:13
Dave k.a. DPA17-Apr-06 12:13 
AnswerRe: WSACancel when using RAW TCP Pin
Ed.Poore17-Apr-06 12:19
Ed.Poore17-Apr-06 12:19 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA17-Apr-06 12:31
Dave k.a. DPA17-Apr-06 12:31 
RAW means that i am generating the whole IP packet from scratch, including both the IP header, and the TCP header.

This is done using

socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
socket.Connect(new IPEndPoint(IPAddress.None, 0));
socket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.HeaderIncluded,1);

and sending the whole packet stored in a buffer 'byte[] tmp', which contains source ip, destip, checksum...etc...in other words all the headers.

socket.Send(tmp);

As I mentioned before, the whole thing works fine for any packet, coz I checked them out with Ethereal. However when I change the protocol field in the IP header to 6, standing for TCP, I get the afore mentioned error, probably due to the XP update disabling raw packets.

thanks for your reply, not lazy at all;)

regards
dave


GeneralRe: WSACancel when using RAW TCP Pin
Ed.Poore17-Apr-06 13:12
Ed.Poore17-Apr-06 13:12 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA17-Apr-06 14:34
Dave k.a. DPA17-Apr-06 14:34 
GeneralRe: WSACancel when using RAW TCP Pin
Ed.Poore17-Apr-06 23:29
Ed.Poore17-Apr-06 23:29 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA18-Apr-06 1:41
Dave k.a. DPA18-Apr-06 1:41 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA18-Apr-06 1:44
Dave k.a. DPA18-Apr-06 1:44 
GeneralRe: WSACancel when using RAW TCP Pin
Expert Coming17-Apr-06 18:48
Expert Coming17-Apr-06 18:48 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA18-Apr-06 1:15
Dave k.a. DPA18-Apr-06 1:15 
QuestionImage Filesize in Web Page Pin
dan21517-Apr-06 8:27
dan21517-Apr-06 8:27 
AnswerRe: Image Filesize in Web Page Pin
Ed.Poore17-Apr-06 12:08
Ed.Poore17-Apr-06 12:08 
GeneralRe: Image Filesize in Web Page Pin
dan21517-Apr-06 12:45
dan21517-Apr-06 12:45 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore17-Apr-06 13:29
Ed.Poore17-Apr-06 13:29 
GeneralRe: Image Filesize in Web Page Pin
dan21517-Apr-06 14:41
dan21517-Apr-06 14:41 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore17-Apr-06 22:20
Ed.Poore17-Apr-06 22:20 
GeneralRe: Image Filesize in Web Page Pin
dan21518-Apr-06 7:49
dan21518-Apr-06 7:49 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore18-Apr-06 12:10
Ed.Poore18-Apr-06 12:10 
GeneralRe: Image Filesize in Web Page Pin
dan21518-Apr-06 15:08
dan21518-Apr-06 15:08 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore18-Apr-06 23:41
Ed.Poore18-Apr-06 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.