2 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. The name of the author may not be used to endorse or promote products
13 * derived from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #ifndef _EVENT2_UTIL_H_
27 #define _EVENT2_UTIL_H_
29 /** @file event2/util.h
31 Common convenience functions for cross-platform portability and
32 related socket manipulations.
40 #include <event2/event-config.h>
41 #ifdef _EVENT_HAVE_SYS_TIME_H
44 #ifdef _EVENT_HAVE_STDINT_H
46 #elif defined(_EVENT_HAVE_INTTYPES_H)
49 #ifdef _EVENT_HAVE_SYS_TYPES_H
50 #include <sys/types.h>
52 #ifdef _EVENT_HAVE_STDDEF_H
59 #ifdef _EVENT_HAVE_NETDB_H
60 #if !defined(_GNU_SOURCE)
69 #include <sys/socket.h>
72 /* Some openbsd autoconf versions get the name of this macro wrong. */
73 #if defined(_EVENT_SIZEOF_VOID__) && !defined(_EVENT_SIZEOF_VOID_P)
74 #define _EVENT_SIZEOF_VOID_P _EVENT_SIZEOF_VOID__
78 * @name Standard integer types.
80 * Integer type definitions for types that are supposed to be defined in the
81 * C99-specified stdint.h. Shamefully, some platforms do not include
82 * stdint.h, so we need to replace it. (If you are on a platform like this,
83 * your C headers are now over 10 years out of date. You should bug them to
84 * do something about this.)
89 * <dt>ev_uint64_t, ev_uint32_t, ev_uint16_t, ev_uint8_t</dt>
90 * <dd>unsigned integer types of exactly 64, 32, 16, and 8 bits
92 * <dt>ev_int64_t, ev_int32_t, ev_int16_t, ev_int8_t</dt>
93 * <dd>signed integer types of exactly 64, 32, 16, and 8 bits
95 * <dt>ev_uintptr_t, ev_intptr_t</dt>
96 * <dd>unsigned/signed integers large enough
97 * to hold a pointer without loss of bits.</dd>
99 * <dd>A signed type of the same size as size_t</dd>
101 * <dd>A signed type typically used to represent offsets within a
102 * (potentially large) file</dd>
106 #ifdef _EVENT_HAVE_UINT64_T
107 #define ev_uint64_t uint64_t
108 #define ev_int64_t int64_t
110 #define ev_uint64_t unsigned __int64
111 #define ev_int64_t signed __int64
112 #elif _EVENT_SIZEOF_LONG_LONG == 8
113 #define ev_uint64_t unsigned long long
114 #define ev_int64_t long long
115 #elif _EVENT_SIZEOF_LONG == 8
116 #define ev_uint64_t unsigned long
117 #define ev_int64_t long
118 #elif defined(_EVENT_IN_DOXYGEN)
119 #define ev_uint64_t ...
120 #define ev_int64_t ...
122 #error "No way to define ev_uint64_t"
125 #ifdef _EVENT_HAVE_UINT32_T
126 #define ev_uint32_t uint32_t
127 #define ev_int32_t int32_t
129 #define ev_uint32_t unsigned int
130 #define ev_int32_t signed int
131 #elif _EVENT_SIZEOF_LONG == 4
132 #define ev_uint32_t unsigned long
133 #define ev_int32_t signed long
134 #elif _EVENT_SIZEOF_INT == 4
135 #define ev_uint32_t unsigned int
136 #define ev_int32_t signed int
137 #elif defined(_EVENT_IN_DOXYGEN)
138 #define ev_uint32_t ...
139 #define ev_int32_t ...
141 #error "No way to define ev_uint32_t"
144 #ifdef _EVENT_HAVE_UINT16_T
145 #define ev_uint16_t uint16_t
146 #define ev_int16_t int16_t
148 #define ev_uint16_t unsigned short
149 #define ev_int16_t signed short
150 #elif _EVENT_SIZEOF_INT == 2
151 #define ev_uint16_t unsigned int
152 #define ev_int16_t signed int
153 #elif _EVENT_SIZEOF_SHORT == 2
154 #define ev_uint16_t unsigned short
155 #define ev_int16_t signed short
156 #elif defined(_EVENT_IN_DOXYGEN)
157 #define ev_uint16_t ...
158 #define ev_int16_t ...
160 #error "No way to define ev_uint16_t"
163 #ifdef _EVENT_HAVE_UINT8_T
164 #define ev_uint8_t uint8_t
165 #define ev_int8_t int8_t
166 #elif defined(_EVENT_IN_DOXYGEN)
167 #define ev_uint8_t ...
168 #define ev_int8_t ...
170 #define ev_uint8_t unsigned char
171 #define ev_int8_t signed char
174 #ifdef _EVENT_HAVE_UINTPTR_T
175 #define ev_uintptr_t uintptr_t
176 #define ev_intptr_t intptr_t
177 #elif _EVENT_SIZEOF_VOID_P <= 4
178 #define ev_uintptr_t ev_uint32_t
179 #define ev_intptr_t ev_int32_t
180 #elif _EVENT_SIZEOF_VOID_P <= 8
181 #define ev_uintptr_t ev_uint64_t
182 #define ev_intptr_t ev_int64_t
183 #elif defined(_EVENT_IN_DOXYGEN)
184 #define ev_uintptr_t ...
185 #define ev_intptr_t ...
187 #error "No way to define ev_uintptr_t"
190 #ifdef _EVENT_ssize_t
191 #define ev_ssize_t _EVENT_ssize_t
193 #define ev_ssize_t ssize_t
197 #define ev_off_t ev_int64_t
199 #define ev_off_t off_t
203 /* Limits for integer types.
205 We're making two assumptions here:
206 - The compiler does constant folding properly.
207 - The platform does signed arithmetic in two's complement.
211 @name Limits for integer types
213 These macros hold the largest or smallest values possible for the
218 #define EV_UINT64_MAX ((((ev_uint64_t)0xffffffffUL) << 32) | 0xffffffffUL)
219 #define EV_INT64_MAX ((((ev_int64_t) 0x7fffffffL) << 32) | 0xffffffffL)
220 #define EV_INT64_MIN ((-EV_INT64_MAX) - 1)
221 #define EV_UINT32_MAX ((ev_uint32_t)0xffffffffUL)
222 #define EV_INT32_MAX ((ev_int32_t) 0x7fffffffL)
223 #define EV_INT32_MIN ((-EV_INT32_MAX) - 1)
224 #define EV_UINT16_MAX ((ev_uint16_t)0xffffUL)
225 #define EV_INT16_MAX ((ev_int16_t) 0x7fffL)
226 #define EV_INT16_MIN ((-EV_INT16_MAX) - 1)
227 #define EV_UINT8_MAX 255
228 #define EV_INT8_MAX 127
229 #define EV_INT8_MIN ((-EV_INT8_MAX) - 1)
233 @name Limits for SIZE_T and SSIZE_T
237 #if _EVENT_SIZEOF_SIZE_T == 8
238 #define EV_SIZE_MAX EV_UINT64_MAX
239 #define EV_SSIZE_MAX EV_INT64_MAX
240 #elif _EVENT_SIZEOF_SIZE_T == 4
241 #define EV_SIZE_MAX EV_UINT32_MAX
242 #define EV_SSIZE_MAX EV_INT32_MAX
243 #elif defined(_EVENT_IN_DOXYGEN)
244 #define EV_SIZE_MAX ...
245 #define EV_SSIZE_MAX ...
247 #error "No way to define SIZE_MAX"
250 #define EV_SSIZE_MIN ((-EV_SSIZE_MAX) - 1)
254 #define ev_socklen_t int
255 #elif defined(_EVENT_socklen_t)
256 #define ev_socklen_t _EVENT_socklen_t
258 #define ev_socklen_t socklen_t
261 #ifdef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
262 #if !defined(_EVENT_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \
263 && !defined(ss_family)
264 #define ss_family __ss_family
269 * A type wide enough to hold the output of "socket()" or "accept()". On
270 * Windows, this is an intptr_t; elsewhere, it is an int. */
272 #define evutil_socket_t intptr_t
274 #define evutil_socket_t int
277 /** Create two new sockets that are connected to each other.
279 On Unix, this simply calls socketpair(). On Windows, it uses the
280 loopback network interface on 127.0.0.1, and only
281 AF_INET,SOCK_STREAM are supported.
283 (This may fail on some Windows hosts where firewall software has cleverly
284 decided to keep 127.0.0.1 from talking to itself.)
286 Parameters and return values are as for socketpair()
288 int evutil_socketpair(int d, int type, int protocol, evutil_socket_t sv[2]);
289 /** Do platform-specific operations as needed to make a socket nonblocking.
291 @param sock The socket to make nonblocking
292 @return 0 on success, -1 on failure
294 int evutil_make_socket_nonblocking(evutil_socket_t sock);
296 /** Do platform-specific operations to make a listener socket reusable.
298 Specifically, we want to make sure that another program will be able
299 to bind this address right after we've closed the listener.
301 This differs from Windows's interpretation of "reusable", which
302 allows multiple listeners to bind the same address at the same time.
304 @param sock The socket to make reusable
305 @return 0 on success, -1 on failure
307 int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
309 /** Do platform-specific operations as needed to close a socket upon a
310 successful execution of one of the exec*() functions.
312 @param sock The socket to be closed
313 @return 0 on success, -1 on failure
315 int evutil_make_socket_closeonexec(evutil_socket_t sock);
317 /** Do the platform-specific call needed to close a socket returned from
318 socket() or accept().
320 @param sock The socket to be closed
321 @return 0 on success, -1 on failure
323 int evutil_closesocket(evutil_socket_t sock);
324 #define EVUTIL_CLOSESOCKET(s) evutil_closesocket(s)
328 /** Return the most recent socket error. Not idempotent on all platforms. */
329 #define EVUTIL_SOCKET_ERROR() WSAGetLastError()
330 /** Replace the most recent socket error with errcode */
331 #define EVUTIL_SET_SOCKET_ERROR(errcode) \
332 do { WSASetLastError(errcode); } while (0)
333 /** Return the most recent socket error to occur on sock. */
334 int evutil_socket_geterror(evutil_socket_t sock);
335 /** Convert a socket error to a string. */
336 const char *evutil_socket_error_to_string(int errcode);
337 #elif defined(_EVENT_IN_DOXYGEN)
339 @name Socket error functions
341 These functions are needed for making programs compatible between
342 Windows and Unix-like platforms.
344 You see, Winsock handles socket errors differently from the rest of
345 the world. Elsewhere, a socket error is like any other error and is
346 stored in errno. But winsock functions require you to retrieve the
347 error with a special function, and don't let you use strerror for
348 the error codes. And handling EWOULDBLOCK is ... different.
352 /** Return the most recent socket error. Not idempotent on all platforms. */
353 #define EVUTIL_SOCKET_ERROR() ...
354 /** Replace the most recent socket error with errcode */
355 #define EVUTIL_SET_SOCKET_ERROR(errcode) ...
356 /** Return the most recent socket error to occur on sock. */
357 #define evutil_socket_geterror(sock) ...
358 /** Convert a socket error to a string. */
359 #define evutil_socket_error_to_string(errcode) ...
362 #define EVUTIL_SOCKET_ERROR() (errno)
363 #define EVUTIL_SET_SOCKET_ERROR(errcode) \
364 do { errno = (errcode); } while (0)
365 #define evutil_socket_geterror(sock) (errno)
366 #define evutil_socket_error_to_string(errcode) (strerror(errcode))
371 * @name Manipulation macros for struct timeval.
373 * We define replacements
374 * for timeradd, timersub, timerclear, timercmp, and timerisset.
378 #ifdef _EVENT_HAVE_TIMERADD
379 #define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp))
380 #define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp))
382 #define evutil_timeradd(tvp, uvp, vvp) \
384 (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
385 (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
386 if ((vvp)->tv_usec >= 1000000) { \
388 (vvp)->tv_usec -= 1000000; \
391 #define evutil_timersub(tvp, uvp, vvp) \
393 (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
394 (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
395 if ((vvp)->tv_usec < 0) { \
397 (vvp)->tv_usec += 1000000; \
400 #endif /* !_EVENT_HAVE_HAVE_TIMERADD */
402 #ifdef _EVENT_HAVE_TIMERCLEAR
403 #define evutil_timerclear(tvp) timerclear(tvp)
405 #define evutil_timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
409 /** Return true iff the tvp is related to uvp according to the relational
410 * operator cmp. Recognized values for cmp are ==, <=, <, >=, and >. */
411 #define evutil_timercmp(tvp, uvp, cmp) \
412 (((tvp)->tv_sec == (uvp)->tv_sec) ? \
413 ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
414 ((tvp)->tv_sec cmp (uvp)->tv_sec))
416 #ifdef _EVENT_HAVE_TIMERISSET
417 #define evutil_timerisset(tvp) timerisset(tvp)
419 #define evutil_timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
422 /** Replacement for offsetof on platforms that don't define it. */
424 #define evutil_offsetof(type, field) offsetof(type, field)
426 #define evutil_offsetof(type, field) ((off_t)(&((type *)0)->field))
429 /* big-int related functions */
430 /** Parse a 64-bit value from a string. Arguments are as for strtol. */
431 ev_int64_t evutil_strtoll(const char *s, char **endptr, int base);
433 /** Replacement for gettimeofday on platforms that lack it. */
434 #ifdef _EVENT_HAVE_GETTIMEOFDAY
435 #define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz))
438 int evutil_gettimeofday(struct timeval *tv, struct timezone *tz);
441 /** Replacement for snprintf to get consistent behavior on platforms for
442 which the return value of snprintf does not conform to C99.
444 int evutil_snprintf(char *buf, size_t buflen, const char *format, ...)
446 __attribute__((format(printf, 3, 4)))
449 /** Replacement for vsnprintf to get consistent behavior on platforms for
450 which the return value of snprintf does not conform to C99.
452 int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap);
454 /** Replacement for inet_ntop for platforms which lack it. */
455 const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len);
456 /** Replacement for inet_pton for platforms which lack it. */
457 int evutil_inet_pton(int af, const char *src, void *dst);
460 /** Parse an IPv4 or IPv6 address, with optional port, from a string.
462 Recognized formats are:
469 If no port is specified, the port in the output is set to 0.
471 @param str The string to parse.
472 @param out A struct sockaddr to hold the result. This should probably be
473 a struct sockaddr_storage.
474 @param outlen A pointer to the number of bytes that that 'out' can safely
475 hold. Set to the number of bytes used in 'out' on success.
476 @return -1 if the address is not well-formed, if the port is out of range,
477 or if out is not large enough to hold the result. Otherwise returns
480 int evutil_parse_sockaddr_port(const char *str, struct sockaddr *out, int *outlen);
482 /** Compare two sockaddrs; return 0 if they are equal, or less than 0 if sa1
483 * preceeds sa2, or greater than 0 if sa1 follows sa2. If include_port is
484 * true, consider the port as well as the address. Only implemented for
485 * AF_INET and AF_INET6 addresses. The ordering is not guaranteed to remain
486 * the same between Libevent versions. */
487 int evutil_sockaddr_cmp(const struct sockaddr *sa1, const struct sockaddr *sa2,
490 /** As strcasecmp, but always compares the characters in locale-independent
491 ASCII. That's useful if you're handling data in ASCII-based protocols.
493 int evutil_ascii_strcasecmp(const char *str1, const char *str2);
494 /** As strncasecmp, but always compares the characters in locale-independent
495 ASCII. That's useful if you're handling data in ASCII-based protocols.
497 int evutil_ascii_strncasecmp(const char *str1, const char *str2, size_t n);
499 /* Here we define evutil_addrinfo to the native addrinfo type, or redefine it
500 * if this system has no getaddrinfo(). */
501 #ifdef _EVENT_HAVE_STRUCT_ADDRINFO
502 #define evutil_addrinfo addrinfo
504 /** A definition of struct addrinfo for systems that lack it.
506 (This is just an alias for struct addrinfo if the system defines
509 struct evutil_addrinfo {
510 int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
511 int ai_family; /* PF_xxx */
512 int ai_socktype; /* SOCK_xxx */
513 int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
514 size_t ai_addrlen; /* length of ai_addr */
515 char *ai_canonname; /* canonical name for nodename */
516 struct sockaddr *ai_addr; /* binary address */
517 struct evutil_addrinfo *ai_next; /* next structure in linked list */
520 /** @name evutil_getaddrinfo() error codes
522 These values are possible error codes for evutil_getaddrinfo() and
527 #ifdef EAI_ADDRFAMILY
528 #define EVUTIL_EAI_ADDRFAMILY EAI_ADDRFAMILY
530 #define EVUTIL_EAI_ADDRFAMILY -901
533 #define EVUTIL_EAI_AGAIN EAI_AGAIN
535 #define EVUTIL_EAI_AGAIN -902
538 #define EVUTIL_EAI_BADFLAGS EAI_BADFLAGS
540 #define EVUTIL_EAI_BADFLAGS -903
543 #define EVUTIL_EAI_FAIL EAI_FAIL
545 #define EVUTIL_EAI_FAIL -904
548 #define EVUTIL_EAI_FAMILY EAI_FAMILY
550 #define EVUTIL_EAI_FAMILY -905
553 #define EVUTIL_EAI_MEMORY EAI_MEMORY
555 #define EVUTIL_EAI_MEMORY -906
557 /* This test is a bit complicated, since some MS SDKs decide to
558 * remove NODATA or redefine it to be the same as NONAME, in a
559 * fun interpretation of RFC 2553 and RFC 3493. */
560 #if defined(EAI_NODATA) && (!defined(EAI_NONAME) || EAI_NODATA != EAI_NONAME)
561 #define EVUTIL_EAI_NODATA EAI_NODATA
563 #define EVUTIL_EAI_NODATA -907
566 #define EVUTIL_EAI_NONAME EAI_NONAME
568 #define EVUTIL_EAI_NONAME -908
571 #define EVUTIL_EAI_SERVICE EAI_SERVICE
573 #define EVUTIL_EAI_SERVICE -909
576 #define EVUTIL_EAI_SOCKTYPE EAI_SOCKTYPE
578 #define EVUTIL_EAI_SOCKTYPE -910
581 #define EVUTIL_EAI_SYSTEM EAI_SYSTEM
583 #define EVUTIL_EAI_SYSTEM -911
586 #define EVUTIL_EAI_CANCEL -90001
589 #define EVUTIL_AI_PASSIVE AI_PASSIVE
591 #define EVUTIL_AI_PASSIVE 0x1000
594 #define EVUTIL_AI_CANONNAME AI_CANONNAME
596 #define EVUTIL_AI_CANONNAME 0x2000
598 #ifdef AI_NUMERICHOST
599 #define EVUTIL_AI_NUMERICHOST AI_NUMERICHOST
601 #define EVUTIL_AI_NUMERICHOST 0x4000
603 #ifdef AI_NUMERICSERV
604 #define EVUTIL_AI_NUMERICSERV AI_NUMERICSERV
606 #define EVUTIL_AI_NUMERICSERV 0x8000
609 #define EVUTIL_AI_V4MAPPED AI_V4MAPPED
611 #define EVUTIL_AI_V4MAPPED 0x10000
614 #define EVUTIL_AI_ALL AI_ALL
616 #define EVUTIL_AI_ALL 0x20000
619 #define EVUTIL_AI_ADDRCONFIG AI_ADDRCONFIG
621 #define EVUTIL_AI_ADDRCONFIG 0x40000
625 struct evutil_addrinfo;
627 * This function clones getaddrinfo for systems that don't have it. For full
628 * details, see RFC 3493, section 6.1.
631 * - When the system has no getaddrinfo, we fall back to gethostbyname_r or
632 * gethostbyname, with their attendant issues.
633 * - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
635 * For a nonblocking variant, see evdns_getaddrinfo.
637 int evutil_getaddrinfo(const char *nodename, const char *servname,
638 const struct evutil_addrinfo *hints_in, struct evutil_addrinfo **res);
640 /** Release storage allocated by evutil_getaddrinfo or evdns_getaddrinfo. */
641 void evutil_freeaddrinfo(struct evutil_addrinfo *ai);
643 const char *evutil_gai_strerror(int err);
645 /** Generate n bytes of secure pseudorandom data, and store them in buf.
647 * By default, Libevent uses an ARC4-based random number generator, seeded
648 * using the platform's entropy source (/dev/urandom on Unix-like systems;
649 * CryptGenRandom on Windows).
651 void evutil_secure_rng_get_bytes(void *buf, size_t n);
654 * Seed the secure random number generator if needed, and return 0 on
655 * success or -1 on failure.
657 * It is okay to call this function more than once; it will still return
658 * 0 if the RNG has been successfully seeded and -1 if it can't be
661 * Ordinarily you don't need to call this function from your own code;
662 * Libevent will seed the RNG itself the first time it needs good random
663 * numbers. You only need to call it if (a) you want to double-check
664 * that one of the seeding methods did succeed, or (b) you plan to drop
665 * the capability to seed (by chrooting, or dropping capabilities, or
666 * whatever), and you want to make sure that seeding happens before your
667 * program loses the ability to do it.
669 int evutil_secure_rng_init(void);
671 /** Seed the random number generator with extra random bytes.
673 You should almost never need to call this function; it should be
674 sufficient to invoke evutil_secure_rng_init(), or let Libevent take
675 care of calling evutil_secure_rng_init() on its own.
677 If you call this function as a _replacement_ for the regular
678 entropy sources, then you need to be sure that your input
679 contains a fairly large amount of strong entropy. Doing so is
680 notoriously hard: most people who try get it wrong. Watch out!
682 @param dat a buffer full of a strong source of random numbers
683 @param datlen the number of bytes to read from datlen
685 void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
691 #endif /* _EVUTIL_H_ */