Lines Matching defs:frame

93  * sshp_parse_frame() - Parse SSH frame.
96 * @frame: The parsed frame (output).
100 * Parses and validates a SSH frame, including its payload, from the given
101 * source. Sets the provided @frame pointer to the start of the frame and
102 * writes the limits of the frame payload to the provided @payload span
108 * If no complete SSH frame could be found, the frame pointer will be set to
112 * Return: Returns zero on success or if the frame is incomplete, %-ENOMSG if
113 * the start of the message is invalid, %-EBADMSG if any (frame-header or
118 struct ssh_frame **frame, struct ssam_span *payload,
125 *frame = NULL;
130 dev_warn(dev, "rx: parser: invalid start of frame\n");
136 dev_dbg(dev, "rx: parser: not enough data for frame\n");
140 /* Pin down frame. */
144 /* Validate frame CRC. */
146 dev_warn(dev, "rx: parser: invalid frame CRC\n");
153 dev_warn(dev, "rx: parser: frame too large: %llu bytes\n",
161 /* Check for frame + payload length. */
173 *frame = (struct ssh_frame *)sf.ptr;
176 dev_dbg(dev, "rx: parser: valid frame found (type: %#04x, len: %u)\n",
177 (*frame)->type, (*frame)->len);
183 * sshp_parse_command() - Parse SSH command frame payload.
189 * Parses and validates a SSH command frame payload. Sets the @command pointer
193 * check the frame-payload-type field, which should be checked by the caller
196 * The @source parameter should be the complete frame payload, e.g. returned
199 * This function does not copy any data, but rather only validates the frame
204 * valid command-type frame payload, i.e. is too short.