Sponsored Content
Special Forums IP Networking Packets sent from Linux TCP socket Post 302592716 by bix_20002000 on Tuesday 24th of January 2012 04:04:58 PM
Old 01-24-2012
Question Packets sent from Linux TCP socket

Hello,

Our software is using a TCP socket (AF_INET, SOCK_STREAM) to communicate with an Ethernet device. When we send a message, the message object writes itself in full onto the socket's stream buffer before the software invokes send() from socket.h.

I'm still researching, but have 2 questions:

1) After send() is invoked, is the information in the socket buffer broken into multiple packets? If so, what determines how the buffer contents are "broken up"?
2) Is there a way to guarantee that the buffer contents are sent across in a single packet?

Thanks
Dan
 

10 More Discussions You Might Find Interesting

1. Programming

Confusion about TCP/IP socket programming

Hello there chaps. First of all, i'm no TCP/IP-wiz, so forgive me if this is a stupid question. I've been messing around with filetransfer using sockets, and there is one thing that confuses me. This is how it's set up: A server app listens on a port for a client connection. When it... (3 Replies)
Discussion started by: crippe
3 Replies

2. Linux

Security issue with TCP SYN packets on Linux

Hi all, A security scanner has been done on a linux server and have found that The remote host does not discard RCP SYN packets which have the FIN flag set. It tells that I need to request a patch which I haven't found yet. I have Red Hat Linux release 7.0 (Guinness) Kernel 2.2.16-22... (2 Replies)
Discussion started by: bert.n
2 Replies

3. UNIX for Dummies Questions & Answers

Which application has a TCP socket open

If I do a netstat -a I can see all the sockets currently open, is there a way that I can tell which application is holding open these sockets ? (3 Replies)
Discussion started by: murphyboy
3 Replies

4. AIX

TCP/IP socket binding problem

I have what appears to be a unique socket problem, although admittedly my tcp/ip programming experience is relatively limited. I have a AIX server process using TCP/IP berkely sockets, and a Windows (C#) process. The windows process takes input from a user and sends a message to the Unix... (1 Reply)
Discussion started by: adiaconou
1 Replies

5. Programming

Receiving broadcast packets using packet socket

Hello I try to send DHCP RENEW packets to the network and receive the responses. I broadcast the packet and I can see that it's successfully sent using Wireshark. But I have difficulties receiving the responses.I use packet sockets to catch the packets. I can see that there are responses to my... (0 Replies)
Discussion started by: xyzt
0 Replies

6. Programming

Using socket to test a TCP port

Hello, I'm trying to write a small c application to test a tcp port. This works fine for the most part but the default timeout on the connect is very long. I have been reading many posts but and it looks like I need to set the socket to be non-blocking and poll for a result. I have been totally... (2 Replies)
Discussion started by: tjones1105
2 Replies

7. Shell Programming and Scripting

Read and write to tcp socket

Hello all, I have a requirement to read and write to a tcp socket from an HP-UX shell script. I see a /dev/tcp character device on my servers: crw-rw-rw- 1 root root 72 0x00004f Mar 28 18:37 /dev/tcp So I believe this is what I should use. The problem is that all the... (2 Replies)
Discussion started by: lupin..the..3rd
2 Replies

8. IP Networking

TCP Same Ack Sequencing for Two Packets

I was analyzing a TCP snoop. And found following scenario From Server to Client ---> SEQ 2993 ACK 1744 WIN 8192 LEN 13 From Server to Client ---> SEQ 3006 ACK 1744 WIN 8192 LEN 13 From Client to server --> SEQ 1744 ACK 3019 WIN 3304 I just want to know Why Packet 1 and 2... (3 Replies)
Discussion started by: mr_deb
3 Replies

9. AIX

How to repair a TCP/IP socket in state: CLOSE_WAIT?

Hi The clients connect to my server -using port 9130. But no client could connect to my server at this time. I've checked already and this is the result netstat -Aan|grep -v 127.0.0.1|grep 9130|pg f10006000abcb398 tcp4 10313 0 10.0.89.81.9130 10.158.70.24.1705 CLOSE_WAIT... (8 Replies)
Discussion started by: bobochacha29
8 Replies

10. Shell Programming and Scripting

Need help RCon Packets Socket Bash

Hi and thank you in advance for taking the time to help. As I have less than 5 posts it said I had to remove the links you will need to help so good luck! I am having issues building a packet and sending it to a Minecraft RCon server. This is the Minecraft RCon Protocol information can be... (6 Replies)
Discussion started by: Stuperfied
6 Replies
inet(7F)																  inet(7F)

NAME
inet - Internet protocol family SYNOPSIS
DESCRIPTION
The internet protocol family is a collection of protocols layered on top of the (IP) network layer, which utilizes the internet address format. The internet family supports the SOCK_STREAM and SOCK_DGRAM socket types. Addressing Internet addresses are four byte entities. The include file defines this address as the structure Sockets bound to the internet protocol family utilize an addressing structure called Pointers to this structure can be used in system calls wherever they ask for a pointer to a There are three fields of interest within this structure. The first is which must be set to AF_INET. The next is which specifies the port number to be used on the desired host. The third is which is of type and specifies the address of the desired host. Protocols The internet protocol family is comprised of the IP network protocol, Internet Control Message Protocol (ICMP), Transmission Control Proto- col (TCP), and User Datagram Protocol (UDP). TCP is used to support the socket type while UDP is used to support the socket type. The ICMP message protocol and IP network protocol are not directly accessible. The local port address is selected from independent domains for TCP and UDP sockets. This means that creating a TCP socket and binding it to local port number 10000, for example, does not interfere with creating a UDP socket and also binding it to local port number 10000 at the same time. Port numbers in the range 1-1023 inclusive are reserved for use by the super-user only. Attempts to bind to port numbers in this range by non-super-users fail and result in an error returned. AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
tcp(7P), udp(7P). inet(7F)
All times are GMT -4. The time now is 04:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy