Lines Matching defs:option

35 /* Maximium size of the calipso option including
40 /* Size of the minimum calipso option including
45 /* Maximium size of the calipso option including
52 * option. Max of 3 initial pad bytes starting from buffer + 3.
251 * @calipso_ptr: the CALIPSO option
555 * calipso_validate - Validate a CALIPSO option
557 * @option: the start of the option
560 * This routine is called to validate a CALIPSO option.
561 * If the option is valid then %true is returned, otherwise
565 * option (including the TLV header) is >= 10 and that the catmap
566 * length is consistent with the option length.
570 bool calipso_validate(const struct sk_buff *skb, const unsigned char *option)
574 u16 crc, len = option[1] + 2;
577 /* The original CRC runs over the option including the TLV header
579 crc = crc_ccitt(0xffff, option, 8);
582 crc = crc_ccitt(crc, option + 10, len - 10);
584 if (option[8] != (crc & 0xff) || option[9] != ((crc >> 8) & 0xff))
588 doi_def = calipso_doi_search(get_unaligned_be32(option + 2));
710 * calipso_genopt - Generate a CALIPSO option
711 * @buf: the option buffer
718 * Generate a CALIPSO option using the DOI definition and security attributes
720 * padding that ensures that the option is 4n + 2 aligned. It returns the
800 * @opt: the option header
804 * Returns the length of the TLV option at offset @offset within
805 * the option header @opt. Checks that the entire TLV fits inside
806 * the option header, returns a negative value if this is not the case.
826 * calipso_opt_find - Finds the CALIPSO option in an IPv6 hop options header
832 * Finds the space occupied by a CALIPSO option (including any leading and
835 * If a CALIPSO option exists set @start and @end to the
837 * CALIPSO option and the end of padding after the first CALIPSO
838 * option. In this case the function returns 0.
840 * In the absence of a CALIPSO option, @start and @end will be
842 * This is useful when appending a new option, as the caller may want
894 * calipso_opt_insert - Inserts a CALIPSO option into an IPv6 hop opt hdr
901 * CALIPSO option added to it. If @hop already contains a CALIPSO
902 * option this is overwritten, otherwise the new option is appended
904 * will contain just the CALIPSO option and any needed padding.
958 * calipso_opt_del - Removes the CALIPSO option from an option header
963 * Creates a new header based on @hop without any CALIPSO option. If @hop
964 * doesn't contain a CALIPSO option it returns -ENOENT. If @hop contains
967 * option (and removing as much padding as possible) and returns with
983 /* There's no other option in the header so return NULL */
1006 * @calipso: the CALIPSO option
1066 * Query @sk to see if there is a CALIPSO option attached to the sock and if
1112 * calipso_sock_setattr - Add a CALIPSO option to a socket
1118 * Set the CALIPSO option on the given socket using the DOI definition and
1149 * calipso_sock_delattr - Delete the CALIPSO option from a socket
1153 * Removes the CALIPSO option from a socket, if present.
1178 * calipso_req_setattr - Add a CALIPSO option to a connection request socket
1184 * Set the CALIPSO option on the given socket using the DOI definition and
1224 * calipso_req_delattr - Delete the CALIPSO option from a request socket
1228 * Removes the CALIPSO option from a request socket, if present.
1260 * calipso_skbuff_optptr - Find the CALIPSO option in the packet
1264 * Parse the packet's IP header looking for a CALIPSO option. Returns a pointer
1265 * to the start of the CALIPSO option on success, NULL if one if not found.
1284 * calipso_skbuff_setattr - Set the CALIPSO option on a packet
1290 * Set the CALIPSO option on the given packet based on the security attributes.
1393 /* There's no other option in the header so we delete