13f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang/* 23f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * Copyright (C) 2011 The Android Open Source Project 33f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * 43f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * Licensed under the Apache License, Version 2.0 (the "License"); 53f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * you may not use this file except in compliance with the License. 63f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * You may obtain a copy of the License at 73f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * 83f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * http://www.apache.org/licenses/LICENSE-2.0 93f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * 103f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * Unless required by applicable law or agreed to in writing, software 113f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * distributed under the License is distributed on an "AS IS" BASIS, 123f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 133f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * See the License for the specific language governing permissions and 143f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang * limitations under the License. 153f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang */ 163f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang 173f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#ifndef __CUTILS_UEVENT_H 183f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#define __CUTILS_UEVENT_H 193f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang 202d55e02d0f3c27f0c99ab889ab7b73126280a21cDima Zavin#include <stdbool.h> 213f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#include <sys/socket.h> 223f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang 233f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#ifdef __cplusplus 243f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tangextern "C" { 253f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#endif 263f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang 272d55e02d0f3c27f0c99ab889ab7b73126280a21cDima Zavinint uevent_open_socket(int buf_sz, bool passcred); 2857de8b8f27f887ca8084671df777a4ac199ba647Nick Kralevichssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length); 2915621e0970e97eb2fc28f82a07620c9124a4455cGeremy Condrassize_t uevent_kernel_multicast_uid_recv(int socket, void *buffer, size_t length, uid_t *uid); 309a20e67fa62c1e0e0080910deec4be82ebecc922Jeff Sharkeyssize_t uevent_kernel_recv(int socket, void *buffer, size_t length, bool require_group, uid_t *uid); 313f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang 323f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#ifdef __cplusplus 333f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang} 343f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#endif 353f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang 363f582e92f07d358f3d0941b86407b39e2e7e67ccVernon Tang#endif /* __CUTILS_UEVENT_H */ 37