tuttlem 0 Newbie Poster

My apologies if this post is in the wrong place, I wasn't sure where this should go.

My current job is a network analyst dealing strictly with connectivity. I deal only with whether or not you can get to a device, not it's functionality. I don't deal much with anything other than layers 2 and 3, occasionally I'll come upon a layer 1 problem.

I am applying for new job that more on the security side of things, doing more traffic inspections and as such will be moving away from layers 2 and 3 and be dealing with layer 4, TCP.

My question is with TCP Flags. Specifically, the URG flag and the PSH flag. The way I understand it, TCP takes a stream of data and buffers it, then sends data out in FIFO fashion. The URG will take a packet and put it at the top of the buffer, and the PSH flag forces TCP to send everything in the buffer up to and including the the packet with the PSH flag set.

So A) Is this correct, or am I way off the mark?

and 2)If I am correct in my thinking, what is the point of having both? I can't think of a reason why you have urgent packets that don't need to be sent immediately, so it seems like a waste of space. Also, how does the PSH force TCP to empty the buffer? Why not just pass packets and keep it empty?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.