Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: nfc.h
/*
[0] Fix | Delete
* Copyright (C) 2011 Instituto Nokia de Tecnologia
[1] Fix | Delete
*
[2] Fix | Delete
* Authors:
[3] Fix | Delete
* Lauro Ramos Venancio <lauro.venancio@openbossa.org>
[4] Fix | Delete
* Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
[5] Fix | Delete
*
[6] Fix | Delete
* Permission to use, copy, modify, and/or distribute this software for any
[7] Fix | Delete
* purpose with or without fee is hereby granted, provided that the above
[8] Fix | Delete
* copyright notice and this permission notice appear in all copies.
[9] Fix | Delete
*
[10] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
[11] Fix | Delete
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
[12] Fix | Delete
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
[13] Fix | Delete
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
[14] Fix | Delete
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
[15] Fix | Delete
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
[16] Fix | Delete
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
[17] Fix | Delete
*/
[18] Fix | Delete
[19] Fix | Delete
#ifndef __LINUX_NFC_H
[20] Fix | Delete
#define __LINUX_NFC_H
[21] Fix | Delete
[22] Fix | Delete
#include <linux/types.h>
[23] Fix | Delete
#include <linux/socket.h>
[24] Fix | Delete
[25] Fix | Delete
#define NFC_GENL_NAME "nfc"
[26] Fix | Delete
#define NFC_GENL_VERSION 1
[27] Fix | Delete
[28] Fix | Delete
#define NFC_GENL_MCAST_EVENT_NAME "events"
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* enum nfc_commands - supported nfc commands
[32] Fix | Delete
*
[33] Fix | Delete
* @NFC_CMD_UNSPEC: unspecified command
[34] Fix | Delete
*
[35] Fix | Delete
* @NFC_CMD_GET_DEVICE: request information about a device (requires
[36] Fix | Delete
* %NFC_ATTR_DEVICE_INDEX) or dump request to get a list of all nfc devices
[37] Fix | Delete
* @NFC_CMD_DEV_UP: turn on the nfc device
[38] Fix | Delete
* (requires %NFC_ATTR_DEVICE_INDEX)
[39] Fix | Delete
* @NFC_CMD_DEV_DOWN: turn off the nfc device
[40] Fix | Delete
* (requires %NFC_ATTR_DEVICE_INDEX)
[41] Fix | Delete
* @NFC_CMD_START_POLL: start polling for targets using the given protocols
[42] Fix | Delete
* (requires %NFC_ATTR_DEVICE_INDEX and %NFC_ATTR_PROTOCOLS)
[43] Fix | Delete
* @NFC_CMD_STOP_POLL: stop polling for targets (requires
[44] Fix | Delete
* %NFC_ATTR_DEVICE_INDEX)
[45] Fix | Delete
* @NFC_CMD_GET_TARGET: dump all targets found by the previous poll (requires
[46] Fix | Delete
* %NFC_ATTR_DEVICE_INDEX)
[47] Fix | Delete
* @NFC_EVENT_TARGETS_FOUND: event emitted when a new target is found
[48] Fix | Delete
* (it sends %NFC_ATTR_DEVICE_INDEX)
[49] Fix | Delete
* @NFC_EVENT_DEVICE_ADDED: event emitted when a new device is registred
[50] Fix | Delete
* (it sends %NFC_ATTR_DEVICE_NAME, %NFC_ATTR_DEVICE_INDEX and
[51] Fix | Delete
* %NFC_ATTR_PROTOCOLS)
[52] Fix | Delete
* @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed
[53] Fix | Delete
* (it sends %NFC_ATTR_DEVICE_INDEX)
[54] Fix | Delete
* @NFC_EVENT_TM_ACTIVATED: event emitted when the adapter is activated in
[55] Fix | Delete
* target mode.
[56] Fix | Delete
* @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated
[57] Fix | Delete
* from target mode.
[58] Fix | Delete
* @NFC_CMD_LLC_GET_PARAMS: request LTO, RW, and MIUX parameters for a device
[59] Fix | Delete
* @NFC_CMD_LLC_SET_PARAMS: set one or more of LTO, RW, and MIUX parameters for
[60] Fix | Delete
* a device. LTO must be set before the link is up otherwise -EINPROGRESS
[61] Fix | Delete
* is returned. RW and MIUX can be set at anytime and will be passed in
[62] Fix | Delete
* subsequent CONNECT and CC messages.
[63] Fix | Delete
* If one of the passed parameters is wrong none is set and -EINVAL is
[64] Fix | Delete
* returned.
[65] Fix | Delete
* @NFC_CMD_ENABLE_SE: Enable the physical link to a specific secure element.
[66] Fix | Delete
* Once enabled a secure element will handle card emulation mode, i.e.
[67] Fix | Delete
* starting a poll from a device which has a secure element enabled means
[68] Fix | Delete
* we want to do SE based card emulation.
[69] Fix | Delete
* @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element.
[70] Fix | Delete
* @NFC_CMD_FW_DOWNLOAD: Request to Load/flash firmware, or event to inform
[71] Fix | Delete
* that some firmware was loaded
[72] Fix | Delete
* @NFC_EVENT_SE_ADDED: Event emitted when a new secure element is discovered.
[73] Fix | Delete
* This typically will be sent whenever a new NFC controller with either
[74] Fix | Delete
* an embedded SE or an UICC one connected to it through SWP.
[75] Fix | Delete
* @NFC_EVENT_SE_REMOVED: Event emitted when a secure element is removed from
[76] Fix | Delete
* the system, as a consequence of e.g. an NFC controller being unplugged.
[77] Fix | Delete
* @NFC_EVENT_SE_CONNECTIVITY: This event is emitted whenever a secure element
[78] Fix | Delete
* is requesting connectivity access. For example a UICC SE may need to
[79] Fix | Delete
* talk with a sleeping modem and will notify this need by sending this
[80] Fix | Delete
* event. It is then up to userspace to decide if it will wake the modem
[81] Fix | Delete
* up or not.
[82] Fix | Delete
* @NFC_EVENT_SE_TRANSACTION: This event is sent when an application running on
[83] Fix | Delete
* a specific SE notifies us about the end of a transaction. The parameter
[84] Fix | Delete
* for this event is the application ID (AID).
[85] Fix | Delete
* @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller.
[86] Fix | Delete
* @NFC_CMD_SE_IO: Send/Receive APDUs to/from the selected secure element.
[87] Fix | Delete
* @NFC_CMD_ACTIVATE_TARGET: Request NFC controller to reactivate target.
[88] Fix | Delete
* @NFC_CMD_VENDOR: Vendor specific command, to be implemented directly
[89] Fix | Delete
* from the driver in order to support hardware specific operations.
[90] Fix | Delete
* @NFC_CMD_DEACTIVATE_TARGET: Request NFC controller to deactivate target.
[91] Fix | Delete
*/
[92] Fix | Delete
enum nfc_commands {
[93] Fix | Delete
NFC_CMD_UNSPEC,
[94] Fix | Delete
NFC_CMD_GET_DEVICE,
[95] Fix | Delete
NFC_CMD_DEV_UP,
[96] Fix | Delete
NFC_CMD_DEV_DOWN,
[97] Fix | Delete
NFC_CMD_DEP_LINK_UP,
[98] Fix | Delete
NFC_CMD_DEP_LINK_DOWN,
[99] Fix | Delete
NFC_CMD_START_POLL,
[100] Fix | Delete
NFC_CMD_STOP_POLL,
[101] Fix | Delete
NFC_CMD_GET_TARGET,
[102] Fix | Delete
NFC_EVENT_TARGETS_FOUND,
[103] Fix | Delete
NFC_EVENT_DEVICE_ADDED,
[104] Fix | Delete
NFC_EVENT_DEVICE_REMOVED,
[105] Fix | Delete
NFC_EVENT_TARGET_LOST,
[106] Fix | Delete
NFC_EVENT_TM_ACTIVATED,
[107] Fix | Delete
NFC_EVENT_TM_DEACTIVATED,
[108] Fix | Delete
NFC_CMD_LLC_GET_PARAMS,
[109] Fix | Delete
NFC_CMD_LLC_SET_PARAMS,
[110] Fix | Delete
NFC_CMD_ENABLE_SE,
[111] Fix | Delete
NFC_CMD_DISABLE_SE,
[112] Fix | Delete
NFC_CMD_LLC_SDREQ,
[113] Fix | Delete
NFC_EVENT_LLC_SDRES,
[114] Fix | Delete
NFC_CMD_FW_DOWNLOAD,
[115] Fix | Delete
NFC_EVENT_SE_ADDED,
[116] Fix | Delete
NFC_EVENT_SE_REMOVED,
[117] Fix | Delete
NFC_EVENT_SE_CONNECTIVITY,
[118] Fix | Delete
NFC_EVENT_SE_TRANSACTION,
[119] Fix | Delete
NFC_CMD_GET_SE,
[120] Fix | Delete
NFC_CMD_SE_IO,
[121] Fix | Delete
NFC_CMD_ACTIVATE_TARGET,
[122] Fix | Delete
NFC_CMD_VENDOR,
[123] Fix | Delete
NFC_CMD_DEACTIVATE_TARGET,
[124] Fix | Delete
/* private: internal use only */
[125] Fix | Delete
__NFC_CMD_AFTER_LAST
[126] Fix | Delete
};
[127] Fix | Delete
#define NFC_CMD_MAX (__NFC_CMD_AFTER_LAST - 1)
[128] Fix | Delete
[129] Fix | Delete
/**
[130] Fix | Delete
* enum nfc_attrs - supported nfc attributes
[131] Fix | Delete
*
[132] Fix | Delete
* @NFC_ATTR_UNSPEC: unspecified attribute
[133] Fix | Delete
*
[134] Fix | Delete
* @NFC_ATTR_DEVICE_INDEX: index of nfc device
[135] Fix | Delete
* @NFC_ATTR_DEVICE_NAME: device name, max 8 chars
[136] Fix | Delete
* @NFC_ATTR_PROTOCOLS: nfc protocols - bitwise or-ed combination from
[137] Fix | Delete
* NFC_PROTO_*_MASK constants
[138] Fix | Delete
* @NFC_ATTR_TARGET_INDEX: index of the nfc target
[139] Fix | Delete
* @NFC_ATTR_TARGET_SENS_RES: NFC-A targets extra information such as NFCID
[140] Fix | Delete
* @NFC_ATTR_TARGET_SEL_RES: NFC-A targets extra information (useful if the
[141] Fix | Delete
* target is not NFC-Forum compliant)
[142] Fix | Delete
* @NFC_ATTR_TARGET_NFCID1: NFC-A targets identifier, max 10 bytes
[143] Fix | Delete
* @NFC_ATTR_TARGET_SENSB_RES: NFC-B targets extra information, max 12 bytes
[144] Fix | Delete
* @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes
[145] Fix | Delete
* @NFC_ATTR_COMM_MODE: Passive or active mode
[146] Fix | Delete
* @NFC_ATTR_RF_MODE: Initiator or target
[147] Fix | Delete
* @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for
[148] Fix | Delete
* @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for
[149] Fix | Delete
* @NFC_ATTR_LLC_PARAM_LTO: Link TimeOut parameter
[150] Fix | Delete
* @NFC_ATTR_LLC_PARAM_RW: Receive Window size parameter
[151] Fix | Delete
* @NFC_ATTR_LLC_PARAM_MIUX: MIU eXtension parameter
[152] Fix | Delete
* @NFC_ATTR_SE: Available Secure Elements
[153] Fix | Delete
* @NFC_ATTR_FIRMWARE_NAME: Free format firmware version
[154] Fix | Delete
* @NFC_ATTR_SE_INDEX: Secure element index
[155] Fix | Delete
* @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED)
[156] Fix | Delete
* @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status
[157] Fix | Delete
* @NFC_ATTR_APDU: Secure element APDU
[158] Fix | Delete
* @NFC_ATTR_TARGET_ISO15693_DSFID: ISO 15693 Data Storage Format Identifier
[159] Fix | Delete
* @NFC_ATTR_TARGET_ISO15693_UID: ISO 15693 Unique Identifier
[160] Fix | Delete
* @NFC_ATTR_SE_PARAMS: Parameters data from an evt_transaction
[161] Fix | Delete
* @NFC_ATTR_VENDOR_ID: NFC manufacturer unique ID, typically an OUI
[162] Fix | Delete
* @NFC_ATTR_VENDOR_SUBCMD: Vendor specific sub command
[163] Fix | Delete
* @NFC_ATTR_VENDOR_DATA: Vendor specific data, to be optionally passed
[164] Fix | Delete
* to a vendor specific command implementation
[165] Fix | Delete
*/
[166] Fix | Delete
enum nfc_attrs {
[167] Fix | Delete
NFC_ATTR_UNSPEC,
[168] Fix | Delete
NFC_ATTR_DEVICE_INDEX,
[169] Fix | Delete
NFC_ATTR_DEVICE_NAME,
[170] Fix | Delete
NFC_ATTR_PROTOCOLS,
[171] Fix | Delete
NFC_ATTR_TARGET_INDEX,
[172] Fix | Delete
NFC_ATTR_TARGET_SENS_RES,
[173] Fix | Delete
NFC_ATTR_TARGET_SEL_RES,
[174] Fix | Delete
NFC_ATTR_TARGET_NFCID1,
[175] Fix | Delete
NFC_ATTR_TARGET_SENSB_RES,
[176] Fix | Delete
NFC_ATTR_TARGET_SENSF_RES,
[177] Fix | Delete
NFC_ATTR_COMM_MODE,
[178] Fix | Delete
NFC_ATTR_RF_MODE,
[179] Fix | Delete
NFC_ATTR_DEVICE_POWERED,
[180] Fix | Delete
NFC_ATTR_IM_PROTOCOLS,
[181] Fix | Delete
NFC_ATTR_TM_PROTOCOLS,
[182] Fix | Delete
NFC_ATTR_LLC_PARAM_LTO,
[183] Fix | Delete
NFC_ATTR_LLC_PARAM_RW,
[184] Fix | Delete
NFC_ATTR_LLC_PARAM_MIUX,
[185] Fix | Delete
NFC_ATTR_SE,
[186] Fix | Delete
NFC_ATTR_LLC_SDP,
[187] Fix | Delete
NFC_ATTR_FIRMWARE_NAME,
[188] Fix | Delete
NFC_ATTR_SE_INDEX,
[189] Fix | Delete
NFC_ATTR_SE_TYPE,
[190] Fix | Delete
NFC_ATTR_SE_AID,
[191] Fix | Delete
NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS,
[192] Fix | Delete
NFC_ATTR_SE_APDU,
[193] Fix | Delete
NFC_ATTR_TARGET_ISO15693_DSFID,
[194] Fix | Delete
NFC_ATTR_TARGET_ISO15693_UID,
[195] Fix | Delete
NFC_ATTR_SE_PARAMS,
[196] Fix | Delete
NFC_ATTR_VENDOR_ID,
[197] Fix | Delete
NFC_ATTR_VENDOR_SUBCMD,
[198] Fix | Delete
NFC_ATTR_VENDOR_DATA,
[199] Fix | Delete
/* private: internal use only */
[200] Fix | Delete
__NFC_ATTR_AFTER_LAST
[201] Fix | Delete
};
[202] Fix | Delete
#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
[203] Fix | Delete
[204] Fix | Delete
enum nfc_sdp_attr {
[205] Fix | Delete
NFC_SDP_ATTR_UNSPEC,
[206] Fix | Delete
NFC_SDP_ATTR_URI,
[207] Fix | Delete
NFC_SDP_ATTR_SAP,
[208] Fix | Delete
/* private: internal use only */
[209] Fix | Delete
__NFC_SDP_ATTR_AFTER_LAST
[210] Fix | Delete
};
[211] Fix | Delete
#define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1)
[212] Fix | Delete
[213] Fix | Delete
#define NFC_DEVICE_NAME_MAXSIZE 8
[214] Fix | Delete
#define NFC_NFCID1_MAXSIZE 10
[215] Fix | Delete
#define NFC_NFCID2_MAXSIZE 8
[216] Fix | Delete
#define NFC_NFCID3_MAXSIZE 10
[217] Fix | Delete
#define NFC_SENSB_RES_MAXSIZE 12
[218] Fix | Delete
#define NFC_SENSF_RES_MAXSIZE 18
[219] Fix | Delete
#define NFC_ATR_REQ_MAXSIZE 64
[220] Fix | Delete
#define NFC_ATR_RES_MAXSIZE 64
[221] Fix | Delete
#define NFC_ATR_REQ_GB_MAXSIZE 48
[222] Fix | Delete
#define NFC_ATR_RES_GB_MAXSIZE 47
[223] Fix | Delete
#define NFC_GB_MAXSIZE 48
[224] Fix | Delete
#define NFC_FIRMWARE_NAME_MAXSIZE 32
[225] Fix | Delete
#define NFC_ISO15693_UID_MAXSIZE 8
[226] Fix | Delete
[227] Fix | Delete
/* NFC protocols */
[228] Fix | Delete
#define NFC_PROTO_JEWEL 1
[229] Fix | Delete
#define NFC_PROTO_MIFARE 2
[230] Fix | Delete
#define NFC_PROTO_FELICA 3
[231] Fix | Delete
#define NFC_PROTO_ISO14443 4
[232] Fix | Delete
#define NFC_PROTO_NFC_DEP 5
[233] Fix | Delete
#define NFC_PROTO_ISO14443_B 6
[234] Fix | Delete
#define NFC_PROTO_ISO15693 7
[235] Fix | Delete
[236] Fix | Delete
#define NFC_PROTO_MAX 8
[237] Fix | Delete
[238] Fix | Delete
/* NFC communication modes */
[239] Fix | Delete
#define NFC_COMM_ACTIVE 0
[240] Fix | Delete
#define NFC_COMM_PASSIVE 1
[241] Fix | Delete
[242] Fix | Delete
/* NFC RF modes */
[243] Fix | Delete
#define NFC_RF_INITIATOR 0
[244] Fix | Delete
#define NFC_RF_TARGET 1
[245] Fix | Delete
#define NFC_RF_NONE 2
[246] Fix | Delete
[247] Fix | Delete
/* NFC protocols masks used in bitsets */
[248] Fix | Delete
#define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL)
[249] Fix | Delete
#define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE)
[250] Fix | Delete
#define NFC_PROTO_FELICA_MASK (1 << NFC_PROTO_FELICA)
[251] Fix | Delete
#define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443)
[252] Fix | Delete
#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
[253] Fix | Delete
#define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B)
[254] Fix | Delete
#define NFC_PROTO_ISO15693_MASK (1 << NFC_PROTO_ISO15693)
[255] Fix | Delete
[256] Fix | Delete
/* NFC Secure Elements */
[257] Fix | Delete
#define NFC_SE_UICC 0x1
[258] Fix | Delete
#define NFC_SE_EMBEDDED 0x2
[259] Fix | Delete
[260] Fix | Delete
#define NFC_SE_DISABLED 0x0
[261] Fix | Delete
#define NFC_SE_ENABLED 0x1
[262] Fix | Delete
[263] Fix | Delete
struct sockaddr_nfc {
[264] Fix | Delete
sa_family_t sa_family;
[265] Fix | Delete
__u32 dev_idx;
[266] Fix | Delete
__u32 target_idx;
[267] Fix | Delete
__u32 nfc_protocol;
[268] Fix | Delete
};
[269] Fix | Delete
[270] Fix | Delete
#define NFC_LLCP_MAX_SERVICE_NAME 63
[271] Fix | Delete
struct sockaddr_nfc_llcp {
[272] Fix | Delete
sa_family_t sa_family;
[273] Fix | Delete
__u32 dev_idx;
[274] Fix | Delete
__u32 target_idx;
[275] Fix | Delete
__u32 nfc_protocol;
[276] Fix | Delete
__u8 dsap; /* Destination SAP, if known */
[277] Fix | Delete
__u8 ssap; /* Source SAP to be bound to */
[278] Fix | Delete
char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
[279] Fix | Delete
size_t service_name_len;
[280] Fix | Delete
};
[281] Fix | Delete
[282] Fix | Delete
/* NFC socket protocols */
[283] Fix | Delete
#define NFC_SOCKPROTO_RAW 0
[284] Fix | Delete
#define NFC_SOCKPROTO_LLCP 1
[285] Fix | Delete
#define NFC_SOCKPROTO_MAX 2
[286] Fix | Delete
[287] Fix | Delete
#define NFC_HEADER_SIZE 1
[288] Fix | Delete
[289] Fix | Delete
/**
[290] Fix | Delete
* Pseudo-header info for raw socket packets
[291] Fix | Delete
* First byte is the adapter index
[292] Fix | Delete
* Second byte contains flags
[293] Fix | Delete
* - 0x01 - Direction (0=RX, 1=TX)
[294] Fix | Delete
* - 0x02-0x04 - Payload type (000=LLCP, 001=NCI, 010=HCI, 011=Digital,
[295] Fix | Delete
* 100=Proprietary)
[296] Fix | Delete
* - 0x05-0x80 - Reserved
[297] Fix | Delete
**/
[298] Fix | Delete
#define NFC_RAW_HEADER_SIZE 2
[299] Fix | Delete
#define NFC_DIRECTION_RX 0x00
[300] Fix | Delete
#define NFC_DIRECTION_TX 0x01
[301] Fix | Delete
[302] Fix | Delete
#define RAW_PAYLOAD_LLCP 0
[303] Fix | Delete
#define RAW_PAYLOAD_NCI 1
[304] Fix | Delete
#define RAW_PAYLOAD_HCI 2
[305] Fix | Delete
#define RAW_PAYLOAD_DIGITAL 3
[306] Fix | Delete
#define RAW_PAYLOAD_PROPRIETARY 4
[307] Fix | Delete
[308] Fix | Delete
/* socket option names */
[309] Fix | Delete
#define NFC_LLCP_RW 0
[310] Fix | Delete
#define NFC_LLCP_MIUX 1
[311] Fix | Delete
#define NFC_LLCP_REMOTE_MIU 2
[312] Fix | Delete
#define NFC_LLCP_REMOTE_LTO 3
[313] Fix | Delete
#define NFC_LLCP_REMOTE_RW 4
[314] Fix | Delete
[315] Fix | Delete
#endif /*__LINUX_NFC_H */
[316] Fix | Delete
[317] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function