Lines Matching refs:attr
134 * We expect HDR, HASH, ATTR
318 struct isakmp_data *attr;
327 attr = (struct isakmp_data *)(attrpl + 1);
331 type = ntohs(attr->type);
339 s_isakmp_cfg_type(type), ntohs(attr->lorv));
344 attr, ntohs(attrpl->id))) != 0)
355 tlen -= sizeof(*attr);
356 attr++;
360 type = ntohs(attr->type);
361 alen = ntohs(attr->lorv);
387 attr, ntohs(attrpl->id))) != 0)
391 isakmp_cfg_getaddr4(attr, &iph1->mode_cfg->addr4);
395 isakmp_cfg_getaddr4(attr, &iph1->mode_cfg->mask4);
399 isakmp_cfg_appendaddr4(attr,
405 isakmp_cfg_appendaddr4(attr,
411 isakmp_cfg_getstring(attr,
425 isakmp_unity_reply(iph1, attr);
436 npp = (char *)attr;
437 attr = (struct isakmp_data *)(npp + sizeof(*attr) + alen);
438 tlen -= (sizeof(*attr) + alen);
491 struct isakmp_data *attr;
508 attr = (struct isakmp_data *)(attrpl + 1);
513 type = ntohs(attr->type);
521 s_isakmp_cfg_type(type), ntohs(attr->lorv));
525 reply_attr = isakmp_xauth_req(iph1, attr);
534 tlen -= sizeof(*attr);
535 attr++;
545 type = ntohs(attr->type);
546 alen = ntohs(attr->lorv);
566 reply_attr = isakmp_cfg_net(iph1, attr);
579 reply_attr = isakmp_xauth_req(iph1, attr);
584 attr, ISAKMP_CFG_RACOON_VERSION);
598 reply_attr = isakmp_unity_req(iph1, attr);
609 npp = (char *)attr;
610 attr = (struct isakmp_data *)(npp + sizeof(*attr) + alen);
611 tlen -= (sizeof(*attr) + alen);
659 struct isakmp_data *attr;
676 attr = (struct isakmp_data *)(attrpl + 1);
684 type = ntohs(attr->type);
692 reply_attr = isakmp_xauth_set(iph1, attr);
711 tlen -= sizeof(*attr);
712 attr++;
714 alen = ntohs(attr->lorv);
715 tlen -= (sizeof(*attr) + alen);
716 npp = (char *)attr;
717 attr = (struct isakmp_data *)
718 (npp + sizeof(*attr) + alen);
775 isakmp_cfg_net(iph1, attr)
777 struct isakmp_data *attr;
783 type = ntohs(attr->type);
852 attr, &iph1->mode_cfg->addr4.s_addr);
887 return isakmp_cfg_addr4(iph1, attr,
893 attr, &isakmp_cfg_config.dns4[0],
899 attr, &isakmp_cfg_config.nbns4[0],
905 attr, &isakmp_cfg_config.network4);
917 isakmp_cfg_void(iph1, attr)
919 struct isakmp_data *attr;
924 if ((buffer = vmalloc(sizeof(*attr))) == NULL) {
931 new->type = attr->type;
939 isakmp_cfg_copy(iph1, attr)
941 struct isakmp_data *attr;
946 if ((ntohs(attr->type) & ISAKMP_GEN_MASK) == ISAKMP_GEN_TLV)
947 len = ntohs(attr->lorv);
949 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
954 memcpy(buffer->v, attr, sizeof(*attr) + ntohs(attr->lorv));
960 isakmp_cfg_short(iph1, attr, value)
962 struct isakmp_data *attr;
969 if ((buffer = vmalloc(sizeof(*attr))) == NULL) {
975 type = ntohs(attr->type) & ~ISAKMP_GEN_MASK;
984 isakmp_cfg_varlen(iph1, attr, string, len)
986 struct isakmp_data *attr;
994 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
1001 new->type = attr->type;
1010 isakmp_cfg_string(iph1, attr, string)
1012 struct isakmp_data *attr;
1016 return isakmp_cfg_varlen(iph1, attr, string, len);
1020 isakmp_cfg_addr4(iph1, attr, addr)
1022 struct isakmp_data *attr;
1030 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
1037 new->type = attr->type;
1045 isakmp_cfg_addr4_list(iph1, attr, addr, nbr)
1047 struct isakmp_data *attr;
1064 if ((bufone = vmalloc(sizeof(*attr) + len)) == NULL) {
1070 new->type = attr->type;
1073 new += (len + sizeof(*attr));
1261 /* HDR*, HASH(1), ATTR */
1710 struct isakmp_data *attr;
1729 len = sizeof(*attrpl) + sizeof(*attr) * attrcount;
1741 attr = (struct isakmp_data *)(attrpl + 1);
1744 attr->type = htons(attrlist[i]);
1745 attr->lorv = htons(0);
1746 attr++;
1761 isakmp_cfg_getaddr4(attr, ip)
1762 struct isakmp_data *attr;
1765 size_t alen = ntohs(attr->lorv);
1773 addr = (in_addr_t *)(attr + 1);
1780 isakmp_cfg_appendaddr4(attr, ip, num, max)
1781 struct isakmp_data *attr;
1786 size_t alen = ntohs(attr->lorv);
1798 addr = (in_addr_t *)(attr + 1);
1806 isakmp_cfg_getstring(attr, str)
1807 struct isakmp_data *attr;
1810 size_t alen = ntohs(attr->lorv);
1812 src = (char *)(attr + 1);