Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Lendo a tabela de pontos de acesso

From Wiki
Jump to: navigation, search
Article Metadata

Por kyllercg
Última alteração feita por hamishwillee em 09 Dec 2011

void ReadAPTable()
struct ifconf ifc;
int sockfd;
ifc.ifc_len = sizeof(ifreq) * 20;
ifc.ifc_buf = (caddr_t)malloc( ifc.ifc_len );
// Pega a lista completa de pontos de acesso
// Aqui, ifc.ifc_len irá conter o número de pontos de acesso
ret = ioctl(sockfd, SIOCGIFCONF, &ifc);
// Pega apenas a lista de conexões ativas
// Aqui, ifc.ifc_len irá conter o número de conexões ativas
ret = ioctl(sockfd, SIOCGIFACTIVECONF, &ifc);

O código Open C acima mostra que, pode ler os detalhes de pontos de acesso (SIOCGIFCONF ) ou ler os detalhes referentes apenas aos pontos de acesso ativos (SIOCGIFACTIVECONF ).

Links relacionados

This page was last modified on 9 December 2011, at 04:25.
37 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.