RawIpSend
The RawIpSend procedure sends IP packets of the given protocol number. The entire packet, including the IP header, must be in the buffer. The TCPIP virtual machine uses the total length field of the IP header to determine where each packet ends. Subsequent packets begin at the next doubleword (8-byte) boundary within the buffer.
The packets in your buffer are transmitted as is with the following
exceptions.
- They can be fragmented. The fragment offset and flag fields in the header are filled.
- The version field in the header is filled.
- The checksum field in the header is filled.
- The source address field in the header is filled.
You get the return code NOsuchCONNECTION if the client is not handling
the protocol, or if a packet in the buffer has another protocol. The
return code BADlengthARGUMENT is received when:
- The DataLength is less than 40 bytes or more than 8K bytes.
- NumPackets is 0.
- A packet is greater than 2048 bytes.
- All packets do not fit into DataLength.
A ReturnCode value of NObufferSPACE indicates that the data is
rejected because TCPIP is out of buffers. When buffer space is available,
the notification RAWIPspaceAVAILABLE is sent to the client.
procedure RawIpSend
(
ProtocolNo: integer;
Buffer: Address31Type;
DataLength: integer;
NumPackets: integers;
var ReturnCode: integer
);
external;
- Operand
- Description
- ProtocolNo
- Specifies the number of the IP protocol.
- Buffer
- Specifies the address of your buffer containing packets to send.
- DataLength
- Specifies the total length of data in your buffer.
- NumPackets
- Specifies the number of packets in your buffer.
- ReturnCode
- Indicates the success or failure of the call. Possible return
values are:
- OK
- BADlengthARGUMENT
- NObufferSPACE
- NOsuchCONNECTION
- NOTyetBEGUN
- SOFTWAREerror
- TCPipSHUTDOWN
- UNAUTHORIZEDuser
Note: If your buffer contains multiple packets to send, some of the
packets may have been sent even if ReturnCode is not OK.