Lines Matching +defs:hash +defs:table +defs:c
1 /* $OpenBSD: relayd.c,v 1.192 2024/10/28 19:56:18 tb Exp $ */
4 * Copyright (c) 2007 - 2016 Reyk Floeter <reyk@openbsd.org>
5 * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
121 int c;
132 while ((c = getopt(argc, argv, "dD:nI:P:f:v")) != -1) {
133 switch (c) {
276 struct table *tb;
517 purge_table(struct relayd *env, struct tablelist *head, struct table *table)
521 while ((host = TAILQ_FIRST(&table->hosts)) != NULL) {
522 TAILQ_REMOVE(&table->hosts, host, entry);
532 free(table->sendbuf);
533 ibuf_free(table->sendbinbuf);
534 tls_config_free(table->tls_cfg);
537 TAILQ_REMOVE(head, table, entry);
538 free(table);
1046 struct table *table;
1049 TAILQ_FOREACH(table, env->sc_tables, entry)
1050 TAILQ_FOREACH(host, &table->hosts, entry)
1056 struct table *
1059 struct table *table;
1061 TAILQ_FOREACH(table, env->sc_tables, entry)
1062 if (table->conf.id == id)
1063 return (table);
1138 struct table *table;
1141 TAILQ_FOREACH(table, env->sc_tables, entry)
1142 TAILQ_FOREACH(host, &table->hosts, entry)
1148 struct table *
1151 struct table *table;
1153 TAILQ_FOREACH(table, env->sc_tables, entry)
1154 if (strcmp(table->conf.name, name) == 0)
1155 return (table);
1159 struct table *
1160 table_findbyconf(struct relayd *env, struct table *tb)
1162 struct table *table;
1169 TAILQ_FOREACH(table, env->sc_tables, entry) {
1170 bcopy(&table->conf, &b, sizeof(b));
1175 * Compare two tables and return the existing table if
1179 ((tb->sendbuf == NULL && table->sendbuf == NULL) ||
1180 (tb->sendbuf != NULL && table->sendbuf != NULL &&
1181 strcmp(tb->sendbuf, table->sendbuf) == 0)))
1182 return (table);
1222 pkey_find(struct relayd *env, char * hash)
1227 if (strcmp(hash, pkey->pkey_hash) == 0)
1233 pkey_add(struct relayd *env, EVP_PKEY *pkey, char *hash)
1244 if (strlcpy(ca_pkey->pkey_hash, hash, sizeof(ca_pkey->pkey_hash)) >=
1541 char c;
1564 c = tolower((unsigned char)host[i]);
1565 if ((c == '.') && (j == 0 || name[j - 1] == '.'))
1567 name[j++] = c;