Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:20

0001 /*
0002  * Definitions used by the uuidd daemon
0003  *
0004  * Copyright (C) 2007 Theodore Ts'o.
0005  *
0006  * %Begin-Header%
0007  * Redistribution and use in source and binary forms, with or without
0008  * modification, are permitted provided that the following conditions
0009  * are met:
0010  * 1. Redistributions of source code must retain the above copyright
0011  *    notice, and the entire permission notice in its entirety,
0012  *    including the disclaimer of warranties.
0013  * 2. Redistributions in binary form must reproduce the above copyright
0014  *    notice, this list of conditions and the following disclaimer in the
0015  *    documentation and/or other materials provided with the distribution.
0016  * 3. The name of the author may not be used to endorse or promote
0017  *    products derived from this software without specific prior
0018  *    written permission.
0019  *
0020  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
0021  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0022  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
0023  * WHICH ARE HEREBY DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE
0024  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0025  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
0026  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
0027  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
0028  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0029  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
0030  * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
0031  * DAMAGE.
0032  * %End-Header%
0033  */
0034 
0035 #ifndef _UUID_UUIDD_H
0036 #define _UUID_UUIDD_H
0037 
0038 #define UUIDD_SOCKET_PATH   "/var/lib/libuuid/request"
0039 #define UUIDD_PIDFILE_PATH  "/var/lib/libuuid/uuidd.pid"
0040 #define UUIDD_PATH      "/usr/sbin/uuidd"
0041 
0042 #define UUIDD_OP_GETPID         0
0043 #define UUIDD_OP_GET_MAXOP      1
0044 #define UUIDD_OP_TIME_UUID      2
0045 #define UUIDD_OP_RANDOM_UUID        3
0046 #define UUIDD_OP_BULK_TIME_UUID     4
0047 #define UUIDD_OP_BULK_RANDOM_UUID   5
0048 #define UUIDD_MAX_OP            UUIDD_OP_BULK_RANDOM_UUID
0049 
0050 extern void uuid__generate_time(uuid_t out, int *num);
0051 extern void uuid__generate_random(uuid_t out, int *num);
0052 
0053 #endif /* _UUID_UUID_H */