1 /****************************************************************************** 2 3 L I B R M N E T C T L _ H N D L. H 4 5 Copyright (c) 2013, 2015 The Linux Foundation. All rights reserved. 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions are 9 met: 10 * Redistributions of source code must retain the above copyright 11 notice, this list of conditions and the following disclaimer. 12 * Redistributions in binary form must reproduce the above 13 copyright notice, this list of conditions and the following 14 disclaimer in the documentation and/or other materials provided 15 with the distribution. 16 * Neither the name of The Linux Foundation nor the names of its 17 contributors may be used to endorse or promote products derived 18 from this software without specific prior written permission. 19 20 THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 21 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 24 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 27 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 29 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 30 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 32 ******************************************************************************/ 33 34 /*! 35 * @file librmnetctl_hndl.h 36 * @brief rmnet control API's handle file 37 */ 38 39 #ifndef LIBRMNETCTL_HNDL_H 40 #define LIBRMNETCTL_HNDL_H 41 42 /*=========================================================================== 43 DEFINITIONS AND DECLARATIONS 44 ===========================================================================*/ 45 46 /*! 47 * @brief Structure for RMNET control handles. A rmnet hndl contains the caller 48 * process id, the transaction id which is initialized to 0 for each new 49 * initialized handle and the netlink file descriptor for this handle. 50 * @var pid process id to be used for the netlink message 51 * @var transaction_id message number for debugging 52 * @var netlink_fd netlink file descriptor to be used 53 * @var src_addr source socket address properties for this message 54 * @var dest_addr destination socket address properties for this message 55 */ 56 57 struct rmnetctl_hndl_s { 58 uint32_t pid; 59 uint32_t transaction_id; 60 int netlink_fd; 61 struct sockaddr_nl src_addr, dest_addr; 62 }; 63 64 #endif /* not defined LIBRMNETCTL_HNDL_H */ 65 66