1 /* 2 * Routines for controlled update/initialization of request structures. 3 * 4 * request_init() initializes its argument. Pointers and string-valued members 5 * are initialized to zero, to indicate that no lookup has been attempted. 6 * 7 * request_set() adds information to an already initialized request structure. 8 * 9 * Both functions take a variable-length name-value list. 10 * 11 * Diagnostics are reported through syslog(3). 12 * 13 * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. |
14 * 15 * $FreeBSD: head/contrib/tcp_wrappers/update.c 56977 2000-02-03 10:27:03Z shin $ |
16 */ 17 18#ifndef lint 19static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56"; 20#endif 21 22/* System libraries */ 23 --- 19 unchanged lines hidden (view full) --- 43 switch (key) { 44 default: 45 tcpd_warn("request_fill: invalid key: %d", key); 46 return (request); 47 case RQ_FILE: 48 request->fd = va_arg(ap, int); 49 continue; 50 case RQ_CLIENT_SIN: |
51#ifdef INET6 52 request->client->sin = va_arg(ap, struct sockaddr *); 53#else |
54 request->client->sin = va_arg(ap, struct sockaddr_in *); |
55#endif |
56 continue; 57 case RQ_SERVER_SIN: |
58#ifdef INET6 59 request->server->sin = va_arg(ap, struct sockaddr *); 60#else |
61 request->server->sin = va_arg(ap, struct sockaddr_in *); |
62#endif |
63 continue; 64 65 /* 66 * All other fields are strings with the same maximal length. 67 */ 68 69 case RQ_DAEMON: 70 ptr = request->daemon; --- 59 unchanged lines hidden --- |