p2p_i.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. /*
  2. * P2P - Internal definitions for P2P module
  3. * Copyright (c) 2009-2010, Atheros Communications
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef P2P_I_H
  15. #define P2P_I_H
  16. #include "utils/list.h"
  17. #include "p2p.h"
  18. /* TODO: add removal of expired P2P device entries */
  19. enum p2p_go_state {
  20. UNKNOWN_GO,
  21. LOCAL_GO,
  22. REMOTE_GO
  23. };
  24. /**
  25. * struct p2p_device - P2P Device data (internal to P2P module)
  26. */
  27. struct p2p_device {
  28. struct dl_list list;
  29. struct os_time last_seen;
  30. int listen_freq;
  31. int level;
  32. enum p2p_wps_method wps_method;
  33. u8 p2p_device_addr[ETH_ALEN]; /* P2P Device Address of the peer */
  34. u8 pri_dev_type[8];
  35. char device_name[33];
  36. u16 config_methods;
  37. u8 dev_capab;
  38. u8 group_capab;
  39. /*
  40. * If the peer was discovered based on an interface address (e.g., GO
  41. * from Beacon/Probe Response), the interface address is stored here.
  42. * p2p_device_addr must still be set in such a case to the unique
  43. * identifier for the P2P Device.
  44. */
  45. u8 interface_addr[ETH_ALEN];
  46. /*
  47. * P2P Device Address of the GO in whose group this P2P Device is a
  48. * client.
  49. */
  50. u8 member_in_go_dev[ETH_ALEN];
  51. /*
  52. * P2P Interface Address of the GO in whose group this P2P Device is a
  53. * client.
  54. */
  55. u8 member_in_go_iface[ETH_ALEN];
  56. int go_neg_req_sent;
  57. enum p2p_go_state go_state;
  58. u8 dialog_token;
  59. u8 intended_addr[ETH_ALEN];
  60. char country[3];
  61. struct p2p_channels channels;
  62. int oper_freq;
  63. u8 oper_ssid[32];
  64. size_t oper_ssid_len;
  65. /**
  66. * req_config_methods - Pending provisioning discovery methods
  67. */
  68. u16 req_config_methods;
  69. #define P2P_DEV_PROBE_REQ_ONLY BIT(0)
  70. #define P2P_DEV_REPORTED BIT(1)
  71. #define P2P_DEV_NOT_YET_READY BIT(2)
  72. #define P2P_DEV_SD_INFO BIT(3)
  73. #define P2P_DEV_SD_SCHEDULE BIT(4)
  74. #define P2P_DEV_PD_PEER_DISPLAY BIT(5)
  75. #define P2P_DEV_PD_PEER_KEYPAD BIT(6)
  76. #define P2P_DEV_USER_REJECTED BIT(7)
  77. #define P2P_DEV_PEER_WAITING_RESPONSE BIT(8)
  78. #define P2P_DEV_PREFER_PERSISTENT_GROUP BIT(9)
  79. #define P2P_DEV_WAIT_GO_NEG_RESPONSE BIT(10)
  80. #define P2P_DEV_WAIT_GO_NEG_CONFIRM BIT(11)
  81. #define P2P_DEV_GROUP_CLIENT_ONLY BIT(12)
  82. #define P2P_DEV_FORCE_FREQ BIT(13)
  83. #define P2P_DEV_PD_FOR_JOIN BIT(14)
  84. unsigned int flags;
  85. int status; /* enum p2p_status_code */
  86. unsigned int wait_count;
  87. unsigned int invitation_reqs;
  88. u16 ext_listen_period;
  89. u16 ext_listen_interval;
  90. u8 go_timeout;
  91. u8 client_timeout;
  92. };
  93. struct p2p_sd_query {
  94. struct p2p_sd_query *next;
  95. u8 peer[ETH_ALEN];
  96. int for_all_peers;
  97. struct wpabuf *tlvs;
  98. };
  99. struct p2p_pending_action_tx {
  100. unsigned int freq;
  101. u8 dst[ETH_ALEN];
  102. u8 src[ETH_ALEN];
  103. u8 bssid[ETH_ALEN];
  104. size_t len;
  105. unsigned int wait_time;
  106. /* Followed by len octets of the frame */
  107. };
  108. /**
  109. * struct p2p_data - P2P module data (internal to P2P module)
  110. */
  111. struct p2p_data {
  112. /**
  113. * cfg - P2P module configuration
  114. *
  115. * This is included in the same memory allocation with the
  116. * struct p2p_data and as such, must not be freed separately.
  117. */
  118. struct p2p_config *cfg;
  119. /**
  120. * state - The current P2P state
  121. */
  122. enum p2p_state {
  123. /**
  124. * P2P_IDLE - Idle
  125. */
  126. P2P_IDLE,
  127. /**
  128. * P2P_SEARCH - Search (Device Discovery)
  129. */
  130. P2P_SEARCH,
  131. /**
  132. * P2P_CONNECT - Trying to start GO Negotiation
  133. */
  134. P2P_CONNECT,
  135. /**
  136. * P2P_CONNECT_LISTEN - Listen during GO Negotiation start
  137. */
  138. P2P_CONNECT_LISTEN,
  139. /**
  140. * P2P_GO_NEG - In GO Negotiation
  141. */
  142. P2P_GO_NEG,
  143. /**
  144. * P2P_LISTEN_ONLY - Listen only
  145. */
  146. P2P_LISTEN_ONLY,
  147. /**
  148. * P2P_WAIT_PEER_CONNECT - Waiting peer in List for GO Neg
  149. */
  150. P2P_WAIT_PEER_CONNECT,
  151. /**
  152. * P2P_WAIT_PEER_IDLE - Waiting peer idle for GO Neg
  153. */
  154. P2P_WAIT_PEER_IDLE,
  155. /**
  156. * P2P_SD_DURING_FIND - Service Discovery during find
  157. */
  158. P2P_SD_DURING_FIND,
  159. /**
  160. * P2P_PROVISIONING - Provisioning (during group formation)
  161. */
  162. P2P_PROVISIONING,
  163. /**
  164. * P2P_PD_DURING_FIND - Provision Discovery during find
  165. */
  166. P2P_PD_DURING_FIND,
  167. /**
  168. * P2P_INVITE - Trying to start Invite
  169. */
  170. P2P_INVITE,
  171. /**
  172. * P2P_INVITE_LISTEN - Listen during Invite
  173. */
  174. P2P_INVITE_LISTEN,
  175. } state;
  176. /**
  177. * min_disc_int - minDiscoverableInterval
  178. */
  179. int min_disc_int;
  180. /**
  181. * max_disc_int - maxDiscoverableInterval
  182. */
  183. int max_disc_int;
  184. /**
  185. * devices - List of known P2P Device peers
  186. */
  187. struct dl_list devices;
  188. /**
  189. * go_neg_peer - Pointer to GO Negotiation peer
  190. */
  191. struct p2p_device *go_neg_peer;
  192. /**
  193. * invite_peer - Pointer to Invite peer
  194. */
  195. struct p2p_device *invite_peer;
  196. const u8 *invite_go_dev_addr;
  197. u8 invite_go_dev_addr_buf[ETH_ALEN];
  198. /**
  199. * sd_peer - Pointer to Service Discovery peer
  200. */
  201. struct p2p_device *sd_peer;
  202. /**
  203. * sd_query - Pointer to Service Discovery query
  204. */
  205. struct p2p_sd_query *sd_query;
  206. /* GO Negotiation data */
  207. /**
  208. * intended_addr - Local Intended P2P Interface Address
  209. *
  210. * This address is used during group owner negotiation as the Intended
  211. * P2P Interface Address and the group interface will be created with
  212. * address as the local address in case of successfully completed
  213. * negotiation.
  214. */
  215. u8 intended_addr[ETH_ALEN];
  216. /**
  217. * go_intent - Local GO Intent to be used during GO Negotiation
  218. */
  219. u8 go_intent;
  220. /**
  221. * next_tie_breaker - Next tie-breaker value to use in GO Negotiation
  222. */
  223. u8 next_tie_breaker;
  224. /**
  225. * ssid - Selected SSID for GO Negotiation (if local end will be GO)
  226. */
  227. u8 ssid[32];
  228. /**
  229. * ssid_len - ssid length in octets
  230. */
  231. size_t ssid_len;
  232. /**
  233. * Regulatory class for own operational channel
  234. */
  235. u8 op_reg_class;
  236. /**
  237. * op_channel - Own operational channel
  238. */
  239. u8 op_channel;
  240. /**
  241. * channels - Own supported regulatory classes and channels
  242. *
  243. * List of supposerted channels per regulatory class. The regulatory
  244. * classes are defined in IEEE Std 802.11-2007 Annex J and the
  245. * numbering of the clases depends on the configured country code.
  246. */
  247. struct p2p_channels channels;
  248. enum p2p_pending_action_state {
  249. P2P_NO_PENDING_ACTION,
  250. P2P_PENDING_GO_NEG_REQUEST,
  251. P2P_PENDING_GO_NEG_RESPONSE,
  252. P2P_PENDING_GO_NEG_RESPONSE_FAILURE,
  253. P2P_PENDING_GO_NEG_CONFIRM,
  254. P2P_PENDING_SD,
  255. P2P_PENDING_PD,
  256. P2P_PENDING_INVITATION_REQUEST,
  257. P2P_PENDING_INVITATION_RESPONSE,
  258. P2P_PENDING_DEV_DISC_REQUEST,
  259. P2P_PENDING_DEV_DISC_RESPONSE,
  260. P2P_PENDING_GO_DISC_REQ
  261. } pending_action_state;
  262. unsigned int pending_listen_freq;
  263. unsigned int pending_listen_sec;
  264. unsigned int pending_listen_usec;
  265. u8 dev_capab;
  266. int in_listen;
  267. int drv_in_listen;
  268. /**
  269. * sd_queries - Pending service discovery queries
  270. */
  271. struct p2p_sd_query *sd_queries;
  272. /**
  273. * srv_update_indic - Service Update Indicator for local services
  274. */
  275. u16 srv_update_indic;
  276. struct wpabuf *sd_resp; /* Fragmented SD response */
  277. u8 sd_resp_addr[ETH_ALEN];
  278. u8 sd_resp_dialog_token;
  279. size_t sd_resp_pos; /* Offset in sd_resp */
  280. u8 sd_frag_id;
  281. struct wpabuf *sd_rx_resp; /* Reassembled SD response */
  282. u16 sd_rx_update_indic;
  283. /* P2P Invitation data */
  284. enum p2p_invite_role inv_role;
  285. u8 inv_bssid[ETH_ALEN];
  286. int inv_bssid_set;
  287. u8 inv_ssid[32];
  288. size_t inv_ssid_len;
  289. u8 inv_sa[ETH_ALEN];
  290. u8 inv_group_bssid[ETH_ALEN];
  291. u8 *inv_group_bssid_ptr;
  292. u8 inv_go_dev_addr[ETH_ALEN];
  293. u8 inv_status;
  294. int inv_op_freq;
  295. int inv_persistent;
  296. enum p2p_discovery_type find_type;
  297. u8 last_prog_scan_class;
  298. u8 last_prog_scan_chan;
  299. int p2p_scan_running;
  300. enum p2p_after_scan {
  301. P2P_AFTER_SCAN_NOTHING,
  302. P2P_AFTER_SCAN_LISTEN,
  303. P2P_AFTER_SCAN_CONNECT
  304. } start_after_scan;
  305. u8 after_scan_peer[ETH_ALEN];
  306. struct p2p_pending_action_tx *after_scan_tx;
  307. struct p2p_group **groups;
  308. size_t num_groups;
  309. struct p2p_device *pending_client_disc_go;
  310. u8 pending_client_disc_addr[ETH_ALEN];
  311. u8 pending_dev_disc_dialog_token;
  312. u8 pending_dev_disc_addr[ETH_ALEN];
  313. int pending_dev_disc_freq;
  314. unsigned int pending_client_disc_freq;
  315. int ext_listen_only;
  316. unsigned int ext_listen_period;
  317. unsigned int ext_listen_interval;
  318. unsigned int ext_listen_interval_sec;
  319. unsigned int ext_listen_interval_usec;
  320. u8 peer_filter[ETH_ALEN];
  321. int cross_connect;
  322. int best_freq_24;
  323. int best_freq_5;
  324. int best_freq_overall;
  325. };
  326. /**
  327. * struct p2p_message - Parsed P2P message (or P2P IE)
  328. */
  329. struct p2p_message {
  330. struct wpabuf *p2p_attributes;
  331. struct wpabuf *wps_attributes;
  332. u8 dialog_token;
  333. const u8 *capability;
  334. const u8 *go_intent;
  335. const u8 *status;
  336. const u8 *listen_channel;
  337. const u8 *operating_channel;
  338. const u8 *channel_list;
  339. u8 channel_list_len;
  340. const u8 *config_timeout;
  341. const u8 *intended_addr;
  342. const u8 *group_bssid;
  343. const u8 *invitation_flags;
  344. const u8 *group_info;
  345. size_t group_info_len;
  346. const u8 *group_id;
  347. size_t group_id_len;
  348. const u8 *device_id;
  349. const u8 *manageability;
  350. const u8 *noa;
  351. size_t noa_len;
  352. const u8 *ext_listen_timing;
  353. const u8 *minor_reason_code;
  354. /* P2P Device Info */
  355. const u8 *p2p_device_info;
  356. size_t p2p_device_info_len;
  357. const u8 *p2p_device_addr;
  358. const u8 *pri_dev_type;
  359. u8 num_sec_dev_types;
  360. char device_name[33];
  361. u16 config_methods;
  362. /* WPS IE */
  363. u16 dev_password_id;
  364. u16 wps_config_methods;
  365. const u8 *wps_pri_dev_type;
  366. /* DS Parameter Set IE */
  367. const u8 *ds_params;
  368. /* SSID IE */
  369. const u8 *ssid;
  370. };
  371. #define P2P_MAX_GROUP_ENTRIES 50
  372. struct p2p_group_info {
  373. unsigned int num_clients;
  374. struct p2p_client_info {
  375. const u8 *p2p_device_addr;
  376. const u8 *p2p_interface_addr;
  377. u8 dev_capab;
  378. u16 config_methods;
  379. const u8 *pri_dev_type;
  380. u8 num_sec_dev_types;
  381. const u8 *sec_dev_types;
  382. const char *dev_name;
  383. size_t dev_name_len;
  384. } client[P2P_MAX_GROUP_ENTRIES];
  385. };
  386. /* p2p_utils.c */
  387. int p2p_random(char *buf, size_t len);
  388. int p2p_channel_to_freq(const char *country, int reg_class, int channel);
  389. int p2p_freq_to_channel(const char *country, unsigned int freq, u8 *reg_class,
  390. u8 *channel);
  391. void p2p_channels_intersect(const struct p2p_channels *a,
  392. const struct p2p_channels *b,
  393. struct p2p_channels *res);
  394. int p2p_channels_includes(const struct p2p_channels *channels, u8 reg_class,
  395. u8 channel);
  396. /* p2p_parse.c */
  397. int p2p_parse_p2p_ie(const struct wpabuf *buf, struct p2p_message *msg);
  398. int p2p_parse_ies(const u8 *data, size_t len, struct p2p_message *msg);
  399. int p2p_parse(const u8 *data, size_t len, struct p2p_message *msg);
  400. void p2p_parse_free(struct p2p_message *msg);
  401. int p2p_attr_text(struct wpabuf *data, char *buf, char *end);
  402. int p2p_group_info_parse(const u8 *gi, size_t gi_len,
  403. struct p2p_group_info *info);
  404. /* p2p_build.c */
  405. struct p2p_noa_desc {
  406. u8 count_type;
  407. u32 duration;
  408. u32 interval;
  409. u32 start_time;
  410. };
  411. /* p2p_group.c */
  412. const u8 * p2p_group_get_interface_addr(struct p2p_group *group);
  413. u8 p2p_group_presence_req(struct p2p_group *group,
  414. const u8 *client_interface_addr,
  415. const u8 *noa, size_t noa_len);
  416. void p2p_buf_add_action_hdr(struct wpabuf *buf, u8 subtype, u8 dialog_token);
  417. void p2p_buf_add_public_action_hdr(struct wpabuf *buf, u8 subtype,
  418. u8 dialog_token);
  419. u8 * p2p_buf_add_ie_hdr(struct wpabuf *buf);
  420. void p2p_buf_add_status(struct wpabuf *buf, u8 status);
  421. void p2p_buf_add_device_info(struct wpabuf *buf, struct p2p_data *p2p,
  422. struct p2p_device *peer);
  423. void p2p_buf_add_device_id(struct wpabuf *buf, const u8 *dev_addr);
  424. void p2p_buf_update_ie_hdr(struct wpabuf *buf, u8 *len);
  425. void p2p_buf_add_capability(struct wpabuf *buf, u8 dev_capab, u8 group_capab);
  426. void p2p_buf_add_go_intent(struct wpabuf *buf, u8 go_intent);
  427. void p2p_buf_add_listen_channel(struct wpabuf *buf, const char *country,
  428. u8 reg_class, u8 channel);
  429. void p2p_buf_add_operating_channel(struct wpabuf *buf, const char *country,
  430. u8 reg_class, u8 channel);
  431. void p2p_buf_add_channel_list(struct wpabuf *buf, const char *country,
  432. struct p2p_channels *chan);
  433. void p2p_buf_add_config_timeout(struct wpabuf *buf, u8 go_timeout,
  434. u8 client_timeout);
  435. void p2p_buf_add_intended_addr(struct wpabuf *buf, const u8 *interface_addr);
  436. void p2p_buf_add_group_bssid(struct wpabuf *buf, const u8 *bssid);
  437. void p2p_buf_add_group_id(struct wpabuf *buf, const u8 *dev_addr,
  438. const u8 *ssid, size_t ssid_len);
  439. void p2p_buf_add_invitation_flags(struct wpabuf *buf, u8 flags);
  440. void p2p_buf_add_noa(struct wpabuf *buf, u8 noa_index, u8 opp_ps, u8 ctwindow,
  441. struct p2p_noa_desc *desc1, struct p2p_noa_desc *desc2);
  442. void p2p_buf_add_ext_listen_timing(struct wpabuf *buf, u16 period,
  443. u16 interval);
  444. void p2p_buf_add_p2p_interface(struct wpabuf *buf, struct p2p_data *p2p);
  445. void p2p_build_wps_ie(struct p2p_data *p2p, struct wpabuf *buf, u16 pw_id,
  446. int all_attr);
  447. /* p2p_sd.c */
  448. struct p2p_sd_query * p2p_pending_sd_req(struct p2p_data *p2p,
  449. struct p2p_device *dev);
  450. void p2p_free_sd_queries(struct p2p_data *p2p);
  451. void p2p_rx_gas_initial_req(struct p2p_data *p2p, const u8 *sa,
  452. const u8 *data, size_t len, int rx_freq);
  453. void p2p_rx_gas_initial_resp(struct p2p_data *p2p, const u8 *sa,
  454. const u8 *data, size_t len, int rx_freq);
  455. void p2p_rx_gas_comeback_req(struct p2p_data *p2p, const u8 *sa,
  456. const u8 *data, size_t len, int rx_freq);
  457. void p2p_rx_gas_comeback_resp(struct p2p_data *p2p, const u8 *sa,
  458. const u8 *data, size_t len, int rx_freq);
  459. int p2p_start_sd(struct p2p_data *p2p, struct p2p_device *dev);
  460. /* p2p_go_neg.c */
  461. int p2p_peer_channels_check(struct p2p_data *p2p, struct p2p_channels *own,
  462. struct p2p_device *dev,
  463. const u8 *channel_list, size_t channel_list_len);
  464. void p2p_process_go_neg_req(struct p2p_data *p2p, const u8 *sa,
  465. const u8 *data, size_t len, int rx_freq);
  466. void p2p_process_go_neg_resp(struct p2p_data *p2p, const u8 *sa,
  467. const u8 *data, size_t len, int rx_freq);
  468. void p2p_process_go_neg_conf(struct p2p_data *p2p, const u8 *sa,
  469. const u8 *data, size_t len);
  470. int p2p_connect_send(struct p2p_data *p2p, struct p2p_device *dev);
  471. /* p2p_pd.c */
  472. void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa,
  473. const u8 *data, size_t len, int rx_freq);
  474. void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
  475. const u8 *data, size_t len);
  476. int p2p_send_prov_disc_req(struct p2p_data *p2p, struct p2p_device *dev,
  477. int join);
  478. /* p2p_invitation.c */
  479. void p2p_process_invitation_req(struct p2p_data *p2p, const u8 *sa,
  480. const u8 *data, size_t len, int rx_freq);
  481. void p2p_process_invitation_resp(struct p2p_data *p2p, const u8 *sa,
  482. const u8 *data, size_t len);
  483. int p2p_invite_send(struct p2p_data *p2p, struct p2p_device *dev,
  484. const u8 *go_dev_addr);
  485. void p2p_invitation_req_cb(struct p2p_data *p2p, int success);
  486. void p2p_invitation_resp_cb(struct p2p_data *p2p, int success);
  487. /* p2p_dev_disc.c */
  488. void p2p_process_dev_disc_req(struct p2p_data *p2p, const u8 *sa,
  489. const u8 *data, size_t len, int rx_freq);
  490. void p2p_dev_disc_req_cb(struct p2p_data *p2p, int success);
  491. int p2p_send_dev_disc_req(struct p2p_data *p2p, struct p2p_device *dev);
  492. void p2p_dev_disc_resp_cb(struct p2p_data *p2p, int success);
  493. void p2p_process_dev_disc_resp(struct p2p_data *p2p, const u8 *sa,
  494. const u8 *data, size_t len);
  495. void p2p_go_disc_req_cb(struct p2p_data *p2p, int success);
  496. void p2p_process_go_disc_req(struct p2p_data *p2p, const u8 *da, const u8 *sa,
  497. const u8 *data, size_t len, int rx_freq);
  498. /* p2p.c */
  499. void p2p_set_state(struct p2p_data *p2p, int new_state);
  500. void p2p_set_timeout(struct p2p_data *p2p, unsigned int sec,
  501. unsigned int usec);
  502. void p2p_clear_timeout(struct p2p_data *p2p);
  503. void p2p_continue_find(struct p2p_data *p2p);
  504. struct p2p_device * p2p_add_dev_from_go_neg_req(struct p2p_data *p2p,
  505. const u8 *addr,
  506. struct p2p_message *msg);
  507. void p2p_add_dev_info(struct p2p_data *p2p, const u8 *addr,
  508. struct p2p_device *dev, struct p2p_message *msg);
  509. struct p2p_device * p2p_get_device(struct p2p_data *p2p, const u8 *addr);
  510. struct p2p_device * p2p_get_device_interface(struct p2p_data *p2p,
  511. const u8 *addr);
  512. void p2p_go_neg_failed(struct p2p_data *p2p, struct p2p_device *peer,
  513. int status);
  514. void p2p_go_complete(struct p2p_data *p2p, struct p2p_device *peer);
  515. int p2p_match_dev_type(struct p2p_data *p2p, struct wpabuf *wps);
  516. int dev_type_list_match(const u8 *dev_type, const u8 *req_dev_type[],
  517. size_t num_req_dev_type);
  518. struct wpabuf * p2p_build_probe_resp_ies(struct p2p_data *p2p);
  519. void p2p_build_ssid(struct p2p_data *p2p, u8 *ssid, size_t *ssid_len);
  520. int p2p_send_action(struct p2p_data *p2p, unsigned int freq, const u8 *dst,
  521. const u8 *src, const u8 *bssid, const u8 *buf,
  522. size_t len, unsigned int wait_time);
  523. #endif /* P2P_I_H */