Click here to Skip to main content
15,845,912 members
Home / Discussions / C#
   

C#

 
AnswerRe: Graphics and pixel manipulation Pin
Office Lineman17-Apr-06 14:51
Office Lineman17-Apr-06 14:51 
GeneralRe: Graphics and pixel manipulation Pin
Maksymus00717-Apr-06 23:44
Maksymus00717-Apr-06 23:44 
QuestionDatagridview Pin
thepersonof17-Apr-06 14:03
thepersonof17-Apr-06 14:03 
AnswerRe: Datagridview Pin
Office Lineman17-Apr-06 14:36
Office Lineman17-Apr-06 14:36 
GeneralRe: Datagridview Pin
thepersonof17-Apr-06 23:34
thepersonof17-Apr-06 23:34 
QuestionWSACancel when using RAW TCP Pin
Dave k.a. DPA17-Apr-06 13:13
Dave k.a. DPA17-Apr-06 13:13 
AnswerRe: WSACancel when using RAW TCP Pin
Ed.Poore17-Apr-06 13:19
Ed.Poore17-Apr-06 13:19 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA17-Apr-06 13:31
Dave k.a. DPA17-Apr-06 13: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 14:12
Ed.Poore17-Apr-06 14:12 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA17-Apr-06 15:34
Dave k.a. DPA17-Apr-06 15:34 
GeneralRe: WSACancel when using RAW TCP Pin
Ed.Poore18-Apr-06 0:29
Ed.Poore18-Apr-06 0:29 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA18-Apr-06 2:41
Dave k.a. DPA18-Apr-06 2:41 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA18-Apr-06 2:44
Dave k.a. DPA18-Apr-06 2:44 
GeneralRe: WSACancel when using RAW TCP Pin
Expert Coming17-Apr-06 19:48
Expert Coming17-Apr-06 19:48 
GeneralRe: WSACancel when using RAW TCP Pin
Dave k.a. DPA18-Apr-06 2:15
Dave k.a. DPA18-Apr-06 2:15 
QuestionImage Filesize in Web Page Pin
dan21517-Apr-06 9:27
dan21517-Apr-06 9:27 
AnswerRe: Image Filesize in Web Page Pin
Ed.Poore17-Apr-06 13:08
Ed.Poore17-Apr-06 13:08 
GeneralRe: Image Filesize in Web Page Pin
dan21517-Apr-06 13:45
dan21517-Apr-06 13:45 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore17-Apr-06 14:29
Ed.Poore17-Apr-06 14:29 
GeneralRe: Image Filesize in Web Page Pin
dan21517-Apr-06 15:41
dan21517-Apr-06 15:41 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore17-Apr-06 23:20
Ed.Poore17-Apr-06 23:20 
GeneralRe: Image Filesize in Web Page Pin
dan21518-Apr-06 8:49
dan21518-Apr-06 8:49 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore18-Apr-06 13:10
Ed.Poore18-Apr-06 13:10 
GeneralRe: Image Filesize in Web Page Pin
dan21518-Apr-06 16:08
dan21518-Apr-06 16:08 
GeneralRe: Image Filesize in Web Page Pin
Ed.Poore19-Apr-06 0:41
Ed.Poore19-Apr-06 0: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.