Lines Matching refs:hop

780 static int calipso_opt_update(struct sock *sk, struct ipv6_opt_hdr *hop)  in calipso_opt_update()  argument
784 txopts = ipv6_renew_options(sk, old, IPV6_HOPOPTS, hop); in calipso_opt_update()
846 static int calipso_opt_find(struct ipv6_opt_hdr *hop, unsigned int *start, in calipso_opt_find() argument
851 unsigned char *opt = (unsigned char *)hop; in calipso_opt_find()
853 opt_len = ipv6_optlen(hop); in calipso_opt_find()
854 offset = sizeof(*hop); in calipso_opt_find()
857 tlv_len = calipso_tlv_len(hop, offset); in calipso_opt_find()
882 *start = offset_s + calipso_tlv_len(hop, offset_s); in calipso_opt_find()
884 *start = sizeof(*hop); in calipso_opt_find()
886 *end = offset_e + calipso_tlv_len(hop, offset_e); in calipso_opt_find()
908 calipso_opt_insert(struct ipv6_opt_hdr *hop, in calipso_opt_insert() argument
916 if (hop) { in calipso_opt_insert()
917 hop_len = ipv6_optlen(hop); in calipso_opt_insert()
918 ret_val = calipso_opt_find(hop, &start, &end); in calipso_opt_insert()
923 start = sizeof(*hop); in calipso_opt_insert()
932 if (start > sizeof(*hop)) in calipso_opt_insert()
933 memcpy(new, hop, start); in calipso_opt_insert()
948 memcpy((char *)new + buf_len, (char *)hop + end, hop_len - end); in calipso_opt_insert()
971 static int calipso_opt_del(struct ipv6_opt_hdr *hop, in calipso_opt_del() argument
977 ret_val = calipso_opt_find(hop, &start, &end); in calipso_opt_del()
981 hop_len = ipv6_optlen(hop); in calipso_opt_del()
982 if (start == sizeof(*hop) && end == hop_len) { in calipso_opt_del()
993 memcpy(*new, hop, start); in calipso_opt_del()
998 memcpy((char *)*new + start + pad, (char *)hop + end, in calipso_opt_del()
1075 struct ipv6_opt_hdr *hop; in calipso_sock_getattr() local
1083 hop = txopts->hopopt; in calipso_sock_getattr()
1084 opt = (unsigned char *)hop; in calipso_sock_getattr()
1085 opt_len = ipv6_optlen(hop); in calipso_sock_getattr()
1086 offset = sizeof(*hop); in calipso_sock_getattr()
1088 len = calipso_tlv_len(hop, offset); in calipso_sock_getattr()
1300 struct ipv6_opt_hdr *hop; in calipso_skbuff_setattr() local
1307 hop = (struct ipv6_opt_hdr *)(ip6_hdr + 1); in calipso_skbuff_setattr()
1308 ret_val = calipso_opt_find(hop, &start, &end); in calipso_skbuff_setattr()
1344 hop = (struct ipv6_opt_hdr *)(ip6_hdr + 1); in calipso_skbuff_setattr()
1352 hop->hdrlen += len_delta / 8; in calipso_skbuff_setattr()
1354 memcpy((char *)hop + start, buf + (start & 3), new_end - start); in calipso_skbuff_setattr()
1355 calipso_pad_write((unsigned char *)hop, new_end, pad); in calipso_skbuff_setattr()