break;
# endif /* defined(VGPV_arm_linux_android) */
+ case VKI_HCIINQUIRY:
+ if (ARG3) {
+ struct vki_hci_inquiry_req* ir = (struct vki_hci_inquiry_req*)ARG3;
+ PRE_MEM_READ("ioctl(HCIINQUIRY)",
+ (Addr)ARG3, sizeof(struct vki_hci_inquiry_req));
+ PRE_MEM_WRITE("ioctl(HCIINQUIRY)",
+ (Addr)ARG3 + sizeof(struct vki_hci_inquiry_req),
+ ir->num_rsp * sizeof(struct vki_inquiry_info));
+ }
+ break;
+
default:
/* EVIOC* are variable length and return size written on success */
switch (ARG2 & ~(_VKI_IOC_SIZEMASK << _VKI_IOC_SIZESHIFT)) {
break;
# endif /* defined(VGPV_arm_linux_android) */
+ case VKI_HCIINQUIRY:
+ if (ARG3) {
+ struct vki_hci_inquiry_req* ir = (struct vki_hci_inquiry_req*)ARG3;
+ POST_MEM_WRITE((Addr)ARG3 + sizeof(struct vki_hci_inquiry_req),
+ ir->num_rsp * sizeof(struct vki_inquiry_info));
+ }
+ break;
+
default:
/* EVIOC* are variable length and return size written on success */
switch (ARG2 & ~(_VKI_IOC_SIZEMASK << _VKI_IOC_SIZESHIFT)) {
# define __user
+//----------------------------------------------------------------------
+// From linux/include/linux/compiler-gcc.h
+//----------------------------------------------------------------------
+
+#ifdef __GNUC__
+#define __vki_packed __attribute__((packed))
+#endif
+
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/posix_types.h
//----------------------------------------------------------------------
typedef __vki_u16 vki_uint16_t;
typedef __vki_u32 vki_uint32_t;
+typedef __vki_u16 __vki_le16;
+
//----------------------------------------------------------------------
// From linux-2.6.8.1/include/linux/limits.h
//----------------------------------------------------------------------
#endif /* defined(VGPV_arm_linux_android) */
+//----------------------------------------------------------------------
+// From linux-3.0.4/include/net/bluetooth/bluetooth.h
+//----------------------------------------------------------------------
+
+typedef struct {
+ __vki_u8 b[6];
+} __vki_packed vki_bdaddr_t;
+
+//----------------------------------------------------------------------
+// From linux-3.0.4/include/net/bluetooth/hci.h
+//----------------------------------------------------------------------
+
+#define VKI_HCIDEVUP _VKI_IOW('H', 201, int)
+#define VKI_HCIDEVDOWN _VKI_IOW('H', 202, int)
+#define VKI_HCIDEVRESET _VKI_IOW('H', 203, int)
+#define VKI_HCIDEVRESTAT _VKI_IOW('H', 204, int)
+
+#define VKI_HCIGETDEVLIST _VKI_IOR('H', 210, int)
+#define VKI_HCIGETDEVINFO _VKI_IOR('H', 211, int)
+#define VKI_HCIGETCONNLIST _VKI_IOR('H', 212, int)
+#define VKI_HCIGETCONNINFO _VKI_IOR('H', 213, int)
+#define VKI_HCIGETAUTHINFO _VKI_IOR('H', 215, int)
+
+#define VKI_HCISETRAW _VKI_IOW('H', 220, int)
+#define VKI_HCISETSCAN _VKI_IOW('H', 221, int)
+#define VKI_HCISETAUTH _VKI_IOW('H', 222, int)
+#define VKI_HCISETENCRYPT _VKI_IOW('H', 223, int)
+#define VKI_HCISETPTYPE _VKI_IOW('H', 224, int)
+#define VKI_HCISETLINKPOL _VKI_IOW('H', 225, int)
+#define VKI_HCISETLINKMODE _VKI_IOW('H', 226, int)
+#define VKI_HCISETACLMTU _VKI_IOW('H', 227, int)
+#define VKI_HCISETSCOMTU _VKI_IOW('H', 228, int)
+
+#define VKI_HCIBLOCKADDR _VKI_IOW('H', 230, int)
+#define VKI_HCIUNBLOCKADDR _VKI_IOW('H', 231, int)
+
+#define VKI_HCIINQUIRY _VKI_IOR('H', 240, int)
+
+struct vki_inquiry_info {
+ vki_bdaddr_t bdaddr;
+ __vki_u8 pscan_rep_mode;
+ __vki_u8 pscan_period_mode;
+ __vki_u8 pscan_mode;
+ __vki_u8 dev_class[3];
+ __vki_le16 clock_offset;
+} __vki_packed;
+
+struct vki_hci_inquiry_req {
+ __vki_u16 dev_id;
+ __vki_u16 flags;
+ __vki_u8 lap[3];
+ __vki_u8 length;
+ __vki_u8 num_rsp;
+};
+
#endif // __VKI_LINUX_H
/*--------------------------------------------------------------------*/