Lines Matching defs:addr

313     char *addr, *scope_id, *strp, *host, *url = *urlp;
364 rv = apr_parse_addr_port(&addr, &scope_id, &tmp_port, host, p);
365 if (rv != APR_SUCCESS || addr == NULL || scope_id != NULL) {
372 ap_str_tolower(addr); /* DNS names are case-insensitive */
375 *hostp = addr;
429 /* Return TRUE if addr represents an IP address (or an IP network address) */
432 const char *addr = This->name;
443 * if (proxy_readmask(This->name, &This->addr.s_addr, &This->mask.s_addr) == 0)
444 * addr and mask were set by proxy_readmask()
449 * Parse IP addr manually, optionally allowing
454 for (quads = 0; quads < 4 && *addr != '\0'; ++quads) {
457 if (*addr == '/' && quads > 0) { /* netmask starts here. */
461 if (!apr_isdigit(*addr)) {
465 ip_addr[quads] = strtol(addr, &tmp, 0);
467 if (tmp == addr) { /* expected a digit, found something else */
476 addr = tmp;
478 if (*addr == '.' && quads != 3) {
479 ++addr; /* after the 4th quad, a dot would be illegal */
483 for (This->addr.s_addr = 0, i = 0; i < quads; ++i) {
484 This->addr.s_addr |= htonl(ip_addr[i] << (24 - 8 * i));
487 if (addr[0] == '/' && apr_isdigit(addr[1])) { /* net mask follows: */
490 ++addr;
492 bits = strtol(addr, &tmp, 0);
494 if (tmp == addr) { /* expected a digit, found something else */
498 addr = tmp;
526 inet_ntoa(This->addr), bits);
532 if (*addr == '\0' && (This->addr.s_addr & ~This->mask.s_addr) != 0) {
535 inet_ntoa(This->addr), bits);
536 This->addr.s_addr &= This->mask.s_addr;
538 " Set to %s/%ld", inet_ntoa(This->addr), bits);
541 if (*addr == '\0') {
546 return (*addr == '\0'); /* okay iff we've parsed the whole string */
550 /* Return TRUE if addr represents an IP address (or an IP network address) */
554 struct in_addr addr, *ip;
561 memset(&addr, '\0', sizeof addr);
565 for (addr.s_addr = 0, i = 0; i < 4; ++i) {
569 addr.s_addr |= htonl(ip_addr[i] << (24 - 8 * i));
572 if (This->addr.s_addr == (addr.s_addr & This->mask.s_addr)) {
575 "1)IP-Match: %s[%s] <-> ", host, inet_ntoa(addr));
577 "%s/", inet_ntoa(This->addr));
586 "1)IP-NoMatch: %s[%s] <-> ", host, inet_ntoa(addr));
588 "%s/", inet_ntoa(This->addr));
606 /* Try to deal with multiple IP addr's for a host */
610 if (This->addr.s_addr == (ip->s_addr & This->mask.s_addr)) {
615 "%s/", inet_ntoa(This->addr));
626 "%s/", inet_ntoa(This->addr));
638 /* Return TRUE if addr represents a domain name */
641 char *addr = This->name;
645 if (addr[0] != '.') {
650 for (i = 0; apr_isalnum(addr[i]) || addr[i] == '-' || addr[i] == '.'; ++i) {
655 if (addr[i] == ':') {
662 if (addr[i] != '\0') {
667 for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; --i) {
668 addr[i] = '\0';
702 struct apr_sockaddr_t *addr;
713 if (host[i] != '\0' || apr_sockaddr_info_get(&addr, host, APR_UNSPEC, 0, 0, p) != APR_SUCCESS) {
717 This->hostaddr = addr;
744 struct apr_sockaddr_t *addr = *This->hostaddr;
746 /* Try to deal with multiple IP addr's for a host */
747 while (addr) {
748 if (addr->ipaddr_ptr == ? ? ? ? ? ? ? ? ? ? ? ? ?)
750 addr = addr->next;
765 /* Return TRUE if addr is to be matched as a word */
782 const char *hostname, apr_sockaddr_t *addr)
804 if (!addr)
807 for (conf_addr = npent[j].addr; conf_addr; conf_addr = conf_addr->next) {
814 for (uri_addr = addr; uri_addr; uri_addr = uri_addr->next) {
1468 * struct like hostname and addr (at least in the case where we have
2291 * spilling the cached addr from the worker.
2315 if (!conn->addr) {
2318 conn->addr = sa;
2367 err = apr_sockaddr_info_get(&(conn->addr),
2380 if (!worker->cp->addr) {
2389 * If dynamic change is needed then set the addr to NULL
2392 err = apr_sockaddr_info_get(&(worker->cp->addr),
2396 conn->addr = worker->cp->addr;
2402 conn->addr = worker->cp->addr;
2431 proxyname ? NULL : conn->addr)) {
2570 backend->addr, backend->hostname);
2703 apr_sockaddr_t *backend_addr = conn->addr;
2970 apr_sockaddr_t *backend_addr = conn->addr;
3634 p_conn->addr, p_conn->hostname);