Lines Matching defs:source
52 * Search for SSH SYN bytes in the given source span. If found, set the @rem
54 * the source span length, and return %true. This function does not copy any
59 * span at the end of the source span and return %false.
61 * If partial SSH SYN bytes could be found at the end of the source span, set
63 * source span, and return %false. This function should then be re-run once
95 * @source: The source to parse from.
101 * source. Sets the provided @frame pointer to the start of the frame and
117 int sshp_parse_frame(const struct device *dev, const struct ssam_span *source,
129 if (!sshp_starts_with_syn(source)) {
135 if (unlikely(source->len < SSH_MESSAGE_LENGTH(0))) {
141 sf.ptr = source->ptr + sizeof(u16);
162 if (source->len < SSH_MESSAGE_LENGTH(sp.len)) {
185 * @source: The source to parse from.
196 * The @source parameter should be the complete frame payload, e.g. returned
203 * Return: Returns zero on success or %-ENOMSG if @source does not represent a
206 int sshp_parse_command(const struct device *dev, const struct ssam_span *source,
211 if (unlikely(source->len < sizeof(struct ssh_command))) {
220 *command = (struct ssh_command *)source->ptr;
221 command_data->ptr = source->ptr + sizeof(struct ssh_command);
222 command_data->len = source->len - sizeof(struct ssh_command);