Lines Matching +full:trigger +full:- +full:address

8   * socket address and port, the server socket address and port. In addition,
9 * it provides methods to map a transport address to a printable host name
10 * or address. Socket address information results are in static memory.
54 * that lack DNS-style trailing dot magic, such as local files or NIS maps.
68 if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) {
79 /* sock_host - look up endpoint addresses and install conversion methods */
88 int fd = request->fd;
93 * Look up the client host address. Hal R. Brand <BRAND@addvax.llnl.gov>
103 request->sink = sock_sink;
107 tcpd_warn("can't get client address: %m");
115 request->client->sin = &client;
119 * lookups, and for access control rules that trigger on the server
120 * address or name.
129 request->server->sin = &server;
132 /* sock_hostaddr - map endpoint address to printable form */
137 struct sockaddr_gen *sin = host->sin;
142 (void) inet_ntop(SGFAM(sin), SGADDRP(sin), host->addr, sizeof(host->addr));
144 STRN_CPY(host->addr, inet_ntoa(sin->sg_sin.sin_addr), sizeof(host->addr));
148 /* sock_hostname - map endpoint address to host name */
153 struct sockaddr_gen *sin = host->sin;
162 * have to special-case 0.0.0.0, in order to avoid false alerts from the
163 * host name/address checking code below.
169 STRN_CPY(host->name, hp->h_name, sizeof(host->name));
172 * Verify that the address is a member of the address list returned
180 * can't believe the address list from gethostbyname("localhost")
184 if ((hp = tcpd_gethostbyname(host->name, SGFAM(sin))) == 0) {
187 * Unable to verify that the host name matches the address. This
192 host->name);
194 } else if (STR_NE(host->name, hp->h_name)
195 && STR_NE(host->name, "localhost")) {
204 host->name, STRING_LENGTH, hp->h_name);
212 * The address should be a member of the address list returned by
218 for (i = 0; hp->h_addr_list[i]; i++) {
219 if (memcmp(hp->h_addr_list[i],
227 * The host name does not map to the initial address. Perhaps
231 tcpd_warn("host name/address mismatch: %s != %.*s",
235 inet_ntoa(sin->sg_sin.sin_addr),
237 STRING_LENGTH, hp->h_name);
239 strcpy(host->name, paranoid); /* name is bad, clobber it */
243 /* sock_sink - absorb unreceived IP datagram */
253 * Eat up the not-yet received datagram. Some systems insist on a
254 * non-zero source address argument in the recvfrom() call below.
268 if (sg->sg_family == AF_INET6 &&
269 IN6_IS_ADDR_V4MAPPED(&sg->sg_sin6.sin6_addr)) {
273 IN6_V4MAPPED_TO_INADDR(&sg->sg_sin6.sin6_addr, &v4_addr.sin_addr);
275 IN6_MAPPED_TO_V4(&sg->sg_sin6.sin6_addr, &v4_addr.sin_addr);
277 memcpy(&v4_addr.sin_addr, ((char*) &sg->sg_sin6.sin6_addr) + 12, 4);
279 v4_addr.sin_port = sg->sg_sin6.sin6_port;
281 memcpy(&sg->sg_sin, &v4_addr, sizeof(v4_addr));