Writes a trace route in a readable format to a destination will the memory allocated, and returns the number of characters written to the destination.
If called with NULL as the destination, and 0 as length, nothing will be written, but the number of characters which would have been written will still be returned. When the buffer is not big enough, buffer will be written up the limit and return the number of characters which would have been written.
- Parameters
-
- destination - pointer to the memory to write the trace string to
|
- length - the number of characters that can be written to the destination memory
|
- route - the highest node in the route to write the trace for. This can be the root node, or any other node along the trace
|
- source - the source string. Usually a User-Agent to get the matched characters from
|
- Returns
- the number of characters written, or the number of characters which would have been written if length was long enough. Negative value if something has gone wrong.