Lines Matching refs:attr
138 * We expect HDR, HASH, ATTR
322 struct isakmp_data *attr;
331 attr = (struct isakmp_data *)(attrpl + 1);
335 type = ntohs(attr->type);
343 s_isakmp_cfg_type(type), ntohs(attr->lorv));
348 attr, ntohs(attrpl->id))) != 0)
359 tlen -= sizeof(*attr);
360 attr++;
364 type = ntohs(attr->type);
365 alen = ntohs(attr->lorv);
391 attr, ntohs(attrpl->id))) != 0)
395 isakmp_cfg_getaddr4(attr, &iph1->mode_cfg->addr4);
399 isakmp_cfg_getaddr4(attr, &iph1->mode_cfg->mask4);
403 isakmp_cfg_appendaddr4(attr,
409 isakmp_cfg_appendaddr4(attr,
415 isakmp_cfg_getstring(attr,
429 isakmp_unity_reply(iph1, attr);
440 npp = (char *)attr;
441 attr = (struct isakmp_data *)(npp + sizeof(*attr) + alen);
442 tlen -= (sizeof(*attr) + alen);
494 struct isakmp_data *attr;
511 attr = (struct isakmp_data *)(attrpl + 1);
516 type = ntohs(attr->type);
524 s_isakmp_cfg_type(type), ntohs(attr->lorv));
528 reply_attr = isakmp_xauth_req(iph1, attr);
537 tlen -= sizeof(*attr);
538 attr++;
548 type = ntohs(attr->type);
549 alen = ntohs(attr->lorv);
569 reply_attr = isakmp_cfg_net(iph1, attr);
582 reply_attr = isakmp_xauth_req(iph1, attr);
587 attr, ISAKMP_CFG_RACOON_VERSION);
601 reply_attr = isakmp_unity_req(iph1, attr);
612 npp = (char *)attr;
613 attr = (struct isakmp_data *)(npp + sizeof(*attr) + alen);
614 tlen -= (sizeof(*attr) + alen);
662 struct isakmp_data *attr;
679 attr = (struct isakmp_data *)(attrpl + 1);
687 type = ntohs(attr->type);
695 reply_attr = isakmp_xauth_set(iph1, attr);
714 tlen -= sizeof(*attr);
715 attr++;
717 alen = ntohs(attr->lorv);
718 tlen -= (sizeof(*attr) + alen);
719 npp = (char *)attr;
720 attr = (struct isakmp_data *)
721 (npp + sizeof(*attr) + alen);
779 isakmp_cfg_net(iph1, attr)
781 struct isakmp_data *attr;
787 type = ntohs(attr->type);
856 attr, &iph1->mode_cfg->addr4.s_addr);
891 return isakmp_cfg_addr4(iph1, attr,
897 attr, &isakmp_cfg_config.dns4[0],
903 attr, &isakmp_cfg_config.nbns4[0],
909 return isakmp_cfg_addrnet4(iph1, attr,
928 isakmp_cfg_void(iph1, attr)
930 struct isakmp_data *attr;
935 if ((buffer = vmalloc(sizeof(*attr))) == NULL) {
942 new->type = attr->type;
950 isakmp_cfg_copy(iph1, attr)
952 struct isakmp_data *attr;
957 if ((ntohs(attr->type) & ISAKMP_GEN_MASK) == ISAKMP_GEN_TLV)
958 len = ntohs(attr->lorv);
960 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
965 memcpy(buffer->v, attr, sizeof(*attr) + ntohs(attr->lorv));
971 isakmp_cfg_short(iph1, attr, value)
973 struct isakmp_data *attr;
980 if ((buffer = vmalloc(sizeof(*attr))) == NULL) {
986 type = ntohs(attr->type) & ~ISAKMP_GEN_MASK;
995 isakmp_cfg_varlen(iph1, attr, string, len)
997 struct isakmp_data *attr;
1005 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
1012 new->type = attr->type;
1021 isakmp_cfg_string(iph1, attr, string)
1023 struct isakmp_data *attr;
1027 return isakmp_cfg_varlen(iph1, attr, string, len);
1031 isakmp_cfg_addr4(iph1, attr, addr)
1033 struct isakmp_data *attr;
1041 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
1048 new->type = attr->type;
1056 isakmp_cfg_addrnet4(iph1, attr, addr, mask)
1058 struct isakmp_data *attr;
1068 if ((buffer = vmalloc(sizeof(*attr) + len)) == NULL) {
1075 new->type = attr->type;
1086 isakmp_cfg_addr4_list(iph1, attr, addr, nbr)
1088 struct isakmp_data *attr;
1105 if ((bufone = vmalloc(sizeof(*attr) + len)) == NULL) {
1111 new->type = attr->type;
1114 new += (len + sizeof(*attr));
1292 /* HDR*, HASH(1), ATTR */
1722 struct isakmp_data *attr;
1741 len = sizeof(*attrpl) + sizeof(*attr) * attrcount;
1753 attr = (struct isakmp_data *)(attrpl + 1);
1756 attr->type = htons(attrlist[i]);
1757 attr->lorv = htons(0);
1758 attr++;
1773 isakmp_cfg_getaddr4(attr, ip)
1774 struct isakmp_data *attr;
1777 size_t alen = ntohs(attr->lorv);
1785 addr = (in_addr_t *)(attr + 1);
1792 isakmp_cfg_appendaddr4(attr, ip, num, max)
1793 struct isakmp_data *attr;
1798 size_t alen = ntohs(attr->lorv);
1810 addr = (in_addr_t *)(attr + 1);
1818 isakmp_cfg_getstring(attr, str)
1819 struct isakmp_data *attr;
1822 size_t alen = ntohs(attr->lorv);
1824 src = (char *)(attr + 1);