Lines Matching refs:val

99 i_str_from_val(int val, ilbadm_val_type_t *types)
104 if (v->v_type == val)
147 i_match_onehost(const char *val, ilb_ip_addr_t *ip, addr_type_t *a_type)
161 if (getaddrinfo(val, NULL, &hints, &ai) != 0) {
166 if (getaddrinfo(val, NULL, NULL, &ai) != 0)
198 i_store_serverID(void *store, char *val)
207 (void) strlcpy(sn->sd_srvID, val, sizeof (sn->sd_srvID));
378 i_match_hostorip(void *store, ilbadm_sgroup_t *sg, char *val,
420 port_pref = val - 1; /* we increment again later on */
432 if ((keyword == ILB_KEY_SERVER) && (strchr(val, ':') != NULL) &&
433 (*val != '[') && ((inet_pton(AF_INET6, val, &v6nameaddr)) != 0)) {
442 if (*val == '[') {
445 val++;
446 host1p = val;
448 close1 = strchr(val, (int)']');
466 val = close1 + 1;
468 if (*val == PORT_SEP) {
469 port_pref = val;
472 if (*val == '-') {
473 dash = val;
479 val++;
480 if (*val != '[') {
484 val++;
485 close2 = strchr(val, (int)']');
491 host2p = val;
504 val = close2+1;
509 port_pref = strchr(val, (int)PORT_SEP);
585 rc = i_match_onehost(val, ip1, &at);
590 dash = strchr(val, (int)'-');
608 rc = i_match_onehost(val, ip1, &at);
623 rc = i_match_onehost(val, ip1, &at);
790 ilbadm_set_netmask(char *val, ilb_ip_addr_t *ip, int af)
800 if (*val == '/')
801 val++;
802 prefixlen = strtol(val, &end, 10);
803 if ((val == end) || (*end != '\0')) {
824 ilbadm_err(gettext("cannot convert %s to a netmask"), val);
832 i_store_val(char *val, void *store, ilbadm_key_code_t keyword)
842 if (*val == '\0')
888 rc = i_match_hostorip(storep, sg, val, OPT_NUMERIC_ONLY |
892 rc = i_match_hostorip(storep, sg, val,
896 if (val[0] != ILB_SRVID_PREFIX)
899 rc = i_store_serverID(storep, val);
913 if (*val == '[') {
914 val++;
915 if ((close = strchr(val, (int)']')) == NULL) {
921 rc = i_match_onehost(val, vip, &at);
934 tmp_val = strtoll(val, NULL, 10);
942 tmp_val = strtoll(val, NULL, 10);
950 tmp_val = strtoll(val, NULL, 10);
958 if (isdigit(*val)) {
962 rc = i_match_hostorip((void *)&sn, sg, val,
971 se = getservbyname(val, NULL);
981 if (isdigit(*val)) {
982 int hcport = atoi(val);
986 " hcport %s"), val);
992 } else if (strcasecmp(val, "ANY") == 0) {
1000 pe = getprotobyname(val);
1007 rd->r_algo = i_val_from_str(val, &algo_types[0]);
1024 rc = ilbadm_set_netmask(val, &rd->r_stickymask,
1028 rd->r_topo = i_val_from_str(val, &topo_types[0]);
1033 (void) strlcpy(rd->r_sgname, (char *)val,
1037 (void) strlcpy(rd->r_hcname, (char *)val,
1041 (void) strlcpy(hc_info->hci_test, (char *)val,
1045 if (isdigit(*val))
1046 hc_info->hci_count = atoi(val);
1051 if (isdigit(*val))
1052 hc_info->hci_interval = atoi(val);
1057 if (isdigit(*val))
1058 hc_info->hci_timeout = atoi(val);
1082 char *key, *nextkey, *val;
1114 val = key;
1125 val = equals + 1;
1139 rc = i_store_val(val, store, keyword);