diff options
author | RĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com> | 2009-07-03 18:19:15 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel.holtmann@intel.com> | 2009-07-03 08:32:14 -0700 |
commit | e34e16b341a00ba383a93fdbb018ce39d5519cad (patch) | |
tree | c3c84d3abad579437fa15da14f0c9408b770e8b4 /gisi | |
parent | 12062876644273560f9198ea2c044c4d44dbd83a (diff) | |
download | ofono-e34e16b341a00ba383a93fdbb018ce39d5519cad.tar.gz |
Replacement header for Phonet definitions
Diffstat (limited to 'gisi')
-rw-r--r-- | gisi/phonet.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gisi/phonet.h b/gisi/phonet.h new file mode 100644 index 00000000..a3d3d7dd --- /dev/null +++ b/gisi/phonet.h @@ -0,0 +1,56 @@ +/** + * Phonet sockets kernel interface + * + * Copyright (C) 2008 Nokia Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ +#ifndef NETPHONET_PHONET_H +#define NETPHONET_PHONET_H + +#include <sys/types.h> + +#include <sys/socket.h> +#ifndef AF_PHONET +#define AF_PHONET 35 +#define PF_PHONET AF_PHONET +#endif + +#define PN_PROTO_TRANSPORT 0 +#define PN_PROTO_PHONET 1 +#define PN_PROTO_PIPE 2 + +#define PNPIPE_ENCAP 1 +#define PNPIPE_IFINDEX 2 + +#define PNPIPE_ENCAP_NONE 0 +#define PNPIPE_ENCAP_IP 1 + +#define SIOCPNGETOBJECT (SIOCPROTOPRIVATE + 0) + +struct sockaddr_pn { + sa_family_t spn_family; + uint8_t spn_obj; + uint8_t spn_dev; + uint8_t spn_resource; + uint8_t __pad[sizeof(struct sockaddr) - (sizeof(sa_family_t) + 3)]; +} __attribute__ ((packed)); + +#include <linux/rtnetlink.h> +#ifndef RTNLGRP_PHONET_IFADDR +#define RTNLGRP_PHONET_IFADDR 21 +#endif + +#endif |