Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data packet or control packet?

 
Forrest Xu
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I distinguish the packet I received is data packet or control packet. based on procotol from IP head or the other place?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to have to give us a little more info. TCP/IP itself doesn't have a notion of control and data packets. Are you developing a custom protocol, or implementing some existing protocol?
 
Forrest Xu
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to have to give us a little more info. TCP/IP itself doesn't have a notion of control and data packets. Are you developing a custom protocol, or implementing some existing protocol?
Thank you for your replay.
I am going to develop the code in Layer 2 ethernet layer. If I receive
a data frame, I can find a way to distinguish if it includes a IP datagram
via protocol head. But I do not know if the IP datagram is control or data packets. So what is IP, tcp oR UDP control packet looks like. For example, in TCP/IP, when destination end has not received a data package, It will send a re-send request message to the source end. The re-send request message is a kind of control packet.
Any comments?
Thanks,
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Forrest Xu:

I am going to develop the code in Layer 2 ethernet layer.

Not in Java, you're not! Java has support for TCP and UDP, but nothing lower-level. You can, of course, talk to lower layers using native (C) code and link it to Java code, but first you'd have to know what kind of code you wanted to write.
Sounds like you need a good reference. The definitive book is W.Richard Stevens' TCP/IP Illustrated, Volume I. If I were you I would not attempt any sort of programming along the lines of what you're wanting to do without owning this book.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic