Modifying message data
You can modify message data by adding data to a message or using the null option:
- Adding data to a message with
msginsert:
msginsert adds a string to the message. An insertion offset can be specified. If it is not, then it defaults to 0, and the data are prepended to the message.
For example:
Input: msginsert message6 "This message contains " Output: Input: msgget message6 Output: This message contains some protocol reply data Input: msginsert message6 "more " 27 Output: Input: msgget message6 Output: This message contains some more protocol reply dat
- Null option:
msginsert's
-cvtnull
option is the opposite of msgget's. Use it to specify which character to convert to null as the string is added to the message.For example:
Input: msgcreate -class protocol -recover -type reply Output: message4 Input: msginsert -cvtnull X message4 "this data has an X\ embedded NULL" Output: Input: msgget message4 Output: this data has an Ç embedded NULL Input: msgget -cvtnull Z message4 Output: this data has an Z embedded NULL
This command returns an empty string.