type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | int ifname_in_use(struct hapd_interfaces *interfaces, const char *ifname)
{
size_t i, j;
for (i = 0; i < interfaces->count; i++) {
struct hostapd_iface *iface = interfaces->iface[i];
for (j = 0; j < iface->num_bss; j++) {
struct hostapd_data *hapd = iface->bss[j];
if (os_strcmp(ifname, hapd->conf->iface) =... |
functions | void hostapd_interface_deinit_free(struct hostapd_iface *iface)
{
const struct wpa_driver_ops *driver;
void *drv_priv;
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
if (iface == NULL)
return;
wpa_printf(MSG_DEBUG, "%s: num_bss=%u conf->num_bss=%u",
__func__, (unsigned int) iface->num_bss,
(unsigne... |
functions | void hostapd_deinit_driver(const struct wpa_driver_ops *driver,
void *drv_priv,
struct hostapd_iface *hapd_iface)
{
size_t j;
wpa_printf(MSG_DEBUG, "%s: driver=%p drv_priv=%p -> hapd_deinit",
__func__, driver, drv_priv);
if (driver && driver->hapd_deinit && drv_priv) {
driver->hapd_deinit(drv_pri... |
functions | int hostapd_enable_iface(struct hostapd_iface *hapd_iface)
{
size_t j;
if (hapd_iface->bss[0]->drv_priv != NULL) {
wpa_printf(MSG_ERROR, "Interface %s already enabled",
hapd_iface->conf->bss[0]->iface);
return -1;
} |
functions | int hostapd_reload_iface(struct hostapd_iface *hapd_iface)
{
size_t j;
wpa_printf(MSG_DEBUG, "Reload interface %s",
hapd_iface->conf->bss[0]->iface);
for (j = 0; j < hapd_iface->num_bss; j++)
hostapd_set_security_params(hapd_iface->conf->bss[j], 1);
if (hostapd_config_check(hapd_iface->conf, 1) < 0) {
wpa... |
functions | int hostapd_disable_iface(struct hostapd_iface *hapd_iface)
{
size_t j;
const struct wpa_driver_ops *driver;
void *drv_priv;
if (hapd_iface == NULL)
return -1;
if (hapd_iface->bss[0]->drv_priv == NULL) {
wpa_printf(MSG_INFO, "Interface %s already disabled",
hapd_iface->conf->bss[0]->iface);
return -1... |
functions | int hostapd_data_alloc(struct hostapd_iface *hapd_iface,
struct hostapd_config *conf)
{
size_t i;
struct hostapd_data *hapd;
hapd_iface->bss = os_calloc(conf->num_bss,
sizeof(struct hostapd_data *));
if (hapd_iface->bss == NULL)
return -1;
for (i = 0; i < conf->num_bss; i++) {
hapd = hapd_if... |
functions | int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf)
{
struct hostapd_config *conf = NULL;
struct hostapd_iface *hapd_iface = NULL, *new_iface = NULL;
struct hostapd_data *hapd;
char *ptr;
size_t i, j;
const char *conf_file = NULL, *phy_name = NULL;
if (os_strncmp(buf, "bss_config=", 11) == 0) {... |
functions | int hostapd_remove_bss(struct hostapd_iface *iface, unsigned int idx)
{
size_t i;
wpa_printf(MSG_INFO, "Remove BSS '%s'", iface->conf->bss[idx]->iface);
/* Remove hostapd_data only if it has already been initialized */
if (idx < iface->num_bss) {
struct hostapd_data *hapd = iface->bss[idx];
hostapd_bss_deini... |
functions | int hostapd_remove_iface(struct hapd_interfaces *interfaces, char *buf)
{
struct hostapd_iface *hapd_iface;
size_t i, j, k = 0;
for (i = 0; i < interfaces->count; i++) {
hapd_iface = interfaces->iface[i];
if (hapd_iface == NULL)
return -1;
if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
wpa_prin... |
functions | void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc)
{
if (hapd->tkip_countermeasures) {
hostapd_drv_sta_deauth(hapd, sta->addr,
WLAN_REASON_MICHAEL_MIC_FAILURE);
return;
} |
functions | CONFIG_P2P
if (sta->p2p_ie == NULL && !sta->no_p2p_set) {
sta->no_p2p_set = 1;
hapd->num_sta_no_p2p++;
if (hapd->num_sta_no_p2p == 1)
hostapd_p2p_non_p2p_sta_connected(hapd);
} |
functions | void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s)
{
wpa_printf(MSG_INFO, "%s: interface state %s->%s",
iface->conf ? iface->conf->bss[0]->iface : "N/A",
hostapd_state_text(iface->state), hostapd_state_text(s));
iface->state = s;
} |
functions | int hostapd_csa_in_progress(struct hostapd_iface *iface)
{
unsigned int i;
for (i = 0; i < iface->num_bss; i++)
if (iface->bss[i]->csa_in_progress)
return 1;
return 0;
} |
functions | void free_beacon_data(struct beacon_data *beacon)
{
os_free(beacon->head);
beacon->head = NULL;
os_free(beacon->tail);
beacon->tail = NULL;
os_free(beacon->probe_resp);
beacon->probe_resp = NULL;
os_free(beacon->beacon_ies);
beacon->beacon_ies = NULL;
os_free(beacon->proberesp_ies);
beacon->proberesp_ies = NU... |
functions | int hostapd_build_beacon_data(struct hostapd_data *hapd,
struct beacon_data *beacon)
{
struct wpabuf *beacon_extra, *proberesp_extra, *assocresp_extra;
struct wpa_driver_ap_params params;
int ret;
os_memset(beacon, 0, sizeof(*beacon));
ret = ieee802_11_build_ap_params(hapd, ¶ms);
if (ret < 0)
retu... |
functions | int hostapd_change_config_freq(struct hostapd_data *hapd,
struct hostapd_config *conf,
struct hostapd_freq_params *params,
struct hostapd_freq_params *old_params)
{
int channel;
u8 seg0, seg1;
struct hostapd_hw_modes *mode;
if (!params->channel) {
/* check if the new channel is supp... |
functions | int hostapd_fill_csa_settings(struct hostapd_data *hapd,
struct csa_settings *settings)
{
struct hostapd_iface *iface = hapd->iface;
struct hostapd_freq_params old_freq;
int ret;
u8 chan, bandwidth;
os_memset(&old_freq, 0, sizeof(old_freq));
if (!iface || !iface->freq || hapd->csa_in_progress)
return ... |
functions | void hostapd_cleanup_cs_params(struct hostapd_data *hapd)
{
os_memset(&hapd->cs_freq_params, 0, sizeof(hapd->cs_freq_params));
hapd->cs_count = 0;
hapd->cs_block_tx = 0;
hapd->cs_c_off_beacon = 0;
hapd->cs_c_off_proberesp = 0;
hapd->csa_in_progress = 0;
hapd->cs_c_off_ecsa_beacon = 0;
hapd->cs_c_off_ecsa_prober... |
functions | void hostapd_chan_switch_vht_config(struct hostapd_data *hapd, int vht_enabled)
{
if (vht_enabled)
hapd->iconf->ch_switch_vht_config |= CH_SWITCH_VHT_ENABLED;
else
hapd->iconf->ch_switch_vht_config |= CH_SWITCH_VHT_DISABLED;
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "CHAN... |
functions | int hostapd_switch_channel(struct hostapd_data *hapd,
struct csa_settings *settings)
{
int ret;
if (!(hapd->iface->drv_flags & WPA_DRIVER_FLAGS_AP_CSA)) {
wpa_printf(MSG_INFO, "CSA is not supported");
return -1;
} |
functions | void
hostapd_switch_channel_fallback(struct hostapd_iface *iface,
const struct hostapd_freq_params *freq_params)
{
int seg0_idx = 0, seg1_idx = 0, bw = CHANWIDTH_USE_HT;
wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes");
if (freq_params->center_freq1)
seg0_idx = 36 + (freq_params->center_freq1 - 5180... |
functions | void hostapd_periodic_iface(struct hostapd_iface *iface)
{
size_t i;
ap_list_timer(iface);
for (i = 0; i < iface->num_bss; i++) {
struct hostapd_data *hapd = iface->bss[i];
if (!hapd->started)
continue;
#ifndef CONFIG_NO_RADIUS
hostapd_acl_expire(hapd);
#endif /* CONFIG_NO_RADIUS */
} |
defines | #define N_SPEED (sizeof(speed_list) / sizeof(int))
|
functions | float getCenteroffset(float sx,float ex,char* string){
if(!string||(string[0] == '\0'))
return sx;
float drawWidthSpace = ex - sx;
uint16_t stringWidth = vita2d_pgf_text_width(font,FONT_SIZE,string);
return stringWidth > drawWidthSpace ? sx : sx + (drawWidthSpace - stringWidth) / 2 ;
} |
functions | void drawLyrics(Lyrics* lyrics,char* cur_time_string,uint64_t* totalms,uint32_t* lyricsIndex,float lrcSpaceX,float lrcSpaceY){
if(!lyrics)
return;
char hourString[3];
char minuteString[3];
char secondString[3];
strncpy(hourString,cur_time_string,sizeof(hourString));
strncpy(mi... |
functions | void shortenString(char *out, char *in, int width) {
strcpy(out, in);
int i;
for (i = strlen(out) - 1; i > 0; i--) {
if (vita2d_pgf_text_width(font, FONT_SIZE, out) < width)
break;
out[i] = '\0';
} |
functions | void getAudioInfo(char *file) {
char *buffer = NULL;
fileinfo = getInfoFunct();
shortenString(title, fileinfo->title[0] == '\0' ? "-" : fileinfo->title, 390);
shortenString(album, fileinfo->album[0] == '\0' ? "-" : fileinfo->album, 390);
shortenString(artist, fileinfo->artist[0] == '\0' ? "-" : fileinfo->... |
functions | int audioPlayer(char *file, int type, FileList *list, FileListEntry *entry, int *base_pos, int *rel_pos) {
static int speed_list[] = { -7, -3, -1, 0, 1, 3, 7 } |
functions | Cancel
if (pressed_buttons & SCE_CTRL_CANCEL) {
break;
} |
functions | off
if (pressed_buttons & SCE_CTRL_TRIANGLE) {
scePowerRequestDisplayOff();
} |
functions | pause
if (pressed_buttons & SCE_CTRL_ENTER) {
if (isPlayingFunct() && getPlayingSpeedFunct() == 0) {
pauseFunct();
} |
functions | Cover
if (tex) {
vita2d_draw_texture_scale(tex, SHELL_MARGIN_X, START_Y, cover_size / vita2d_texture_get_width(tex), cover_size / vita2d_texture_get_height(tex));
} |
defines |
#define GAMESERVER_BACK0 "menu/art/back_0" |
defines | #define GAMESERVER_BACK1 "menu/art/back_1" |
defines | #define GAMESERVER_NEXT0 "menu/art/next_0" |
defines | #define GAMESERVER_NEXT1 "menu/art/next_1" |
defines | #define GAMESERVER_FRAMEL "menu/art/frame2_l" |
defines | #define GAMESERVER_FRAMER "menu/art/frame1_r" |
defines | #define GAMESERVER_SELECT "menu/art/maps_select" |
defines | #define GAMESERVER_SELECTED "menu/art/maps_selected" |
defines | #define GAMESERVER_FIGHT0 "menu/art/fight_0" |
defines | #define GAMESERVER_FIGHT1 "menu/art/fight_1" |
defines | #define GAMESERVER_UNKNOWNMAP "menu/art/unknownmap" |
defines | #define GAMESERVER_ARROWS "menu/art/gs_arrows_0" |
defines | #define GAMESERVER_ARROWSL "menu/art/gs_arrows_l" |
defines | #define GAMESERVER_ARROWSR "menu/art/gs_arrows_r" |
defines |
#define MAX_MAPROWS 2 |
defines | #define MAX_MAPCOLS 2 |
defines | #define MAX_MAPSPERPAGE 4 |
defines |
#define MAX_NAMELENGTH 16 |
defines | #define ID_GAMETYPE 10 |
defines | #define ID_PICTURES 11 // 12, 13, 14 |
defines | #define ID_PREVPAGE 15 |
defines | #define ID_NEXTPAGE 16 |
defines | #define ID_STARTSERVERBACK 17 |
defines | #define ID_STARTSERVERNEXT 18 |
defines |
#define ID_MAXCLIENTS 20 |
defines | #define ID_DEDICATED 21 |
defines | #define ID_GO 22 |
defines | #define ID_BACK 23 |
defines | #define ID_PLAYER_TYPE 24 // Goes up to ID_PLAYER_TYPE+PLAYER_SLOTS |
defines |
#define PLAYER_SLOTS 12 |
defines |
#define PT_BOT 0 |
defines | #define PT_CLOSED 1 |
defines | #define PT_OPEN 2 |
defines | #define PT_HUMAN 3 |
defines | #define OPTIONS_X 456 |
defines |
#define BOTSELECT_BACK0 "menu/art/back_0" |
defines | #define BOTSELECT_BACK1 "menu/art/back_1" |
defines | #define BOTSELECT_ACCEPT0 "menu/art/accept_0" |
defines | #define BOTSELECT_ACCEPT1 "menu/art/accept_1" |
defines | #define BOTSELECT_SELECT "menu/art/opponents_select" |
defines | #define BOTSELECT_SELECTED "menu/art/opponents_selected" |
defines | #define BOTSELECT_ARROWS "menu/art/gs_arrows_0" |
defines | #define BOTSELECT_ARROWSL "menu/art/gs_arrows_l" |
defines | #define BOTSELECT_ARROWSR "menu/art/gs_arrows_r" |
defines |
#define PLAYERGRID_COLS 4 |
defines | #define PLAYERGRID_ROWS 4 |
defines | #define MAX_MODELSPERPAGE (PLAYERGRID_ROWS * PLAYERGRID_COLS) |
functions | int GametypeBits( char *string ) {
int bits;
char *p;
char *token;
bits = 0;
p = string;
while( 1 ) {
token = COM_ParseExt( &p, qfalse );
if( token[0] == 0 ) {
break;
} |
functions | void StartServer_Update( void ) {
int i;
int top;
static char picname[MAX_MAPSPERPAGE][64];
const char *info;
char mapname[MAX_NAMELENGTH];
top = s_startserver.page*MAX_MAPSPERPAGE;
for (i=0; i<MAX_MAPSPERPAGE; i++)
{
if (top+i >= s_startserver.nummaps)
break;
info = UI_GetArenaInfoByNumber... |
functions | start
if( !s_startserver.nummaps ) {
s_startserver.next.generic.flags |= QMF_INACTIVE;
// set the map name
strcpy( s_startserver.mapname.string, "NO MAPS FOUND" );
} |
functions | void StartServer_MapEvent( void* ptr, int event ) {
if( event != QM_ACTIVATED) {
return;
} |
functions | void StartServer_GametypeEvent( void* ptr, int event ) {
int i;
int count;
int gamebits;
int matchbits;
const char *info;
if( event != QM_ACTIVATED) {
return;
} |
functions | void StartServer_MenuEvent( void* ptr, int event ) {
if( event != QM_ACTIVATED ) {
return;
} |
functions | void StartServer_LevelshotDraw( void *self ) {
menubitmap_s *b;
int x;
int y;
int w;
int h;
int n;
const char *info;
b = (menubitmap_s *)self;
if( !b->generic.name ) {
return;
} |
functions | void StartServer_MenuInit( qboolean multiplayer ) {
int i;
int x;
int y;
static char mapnamebuffer[64];
// zero set all our globals
memset( &s_startserver, 0 ,sizeof(startserver_t) );
StartServer_Cache();
s_startserver.multiplayer = multiplayer;
s_startserver.menu.wrapAround = qtrue;
s_startserver.menu.fu... |
functions | void StartServer_Cache( void )
{
int i;
const char *info;
qboolean precache;
char picname[64];
char mapname[ MAX_NAMELENGTH ];
trap_R_RegisterShaderNoMip( GAMESERVER_BACK0 );
trap_R_RegisterShaderNoMip( GAMESERVER_BACK1 );
trap_R_RegisterShaderNoMip( GAMESERVER_NEXT0 );
trap_R_RegisterShaderNoMip(... |
functions | void UI_StartServerMenu( qboolean multiplayer ) {
StartServer_MenuInit(multiplayer);
UI_PushMenu( &s_startserver.menu );
} |
functions | qboolean BotAlreadySelected( const char *checkName ) {
int n;
for( n = 1; n < PLAYER_SLOTS; n++ ) {
if( s_serveroptions.playerType[n].curvalue != PT_BOT ) {
continue;
} |
functions | void ServerOptions_Start( void ) {
int timelimit;
int fraglimit;
int maxplayers;
int localPlayerBits;
int publicserver;
int dedicated;
int friendlyfire;
int flaglimit;
int pure;
int skill;
int n;
char buf[64];
const char *info;
timelimit = atoi( MField_Buffer( &s_serveroptions.timelimit.field... |
functions | team
if( dedicated == 0 && s_serveroptions.gametype >= GT_TEAM ) {
for ( n = 0; n < UI_MaxSplitView(); ++n ) {
if ( n == 0 || s_serveroptions.playerType[n].curvalue == PT_HUMAN ) {
trap_Cvar_Set( Com_LocalPlayerCvarName( n, "teampref" ), playerTeam_list[s_serveroptions.playerTeam[n].curvalue] );
} |
functions | void ServerOptions_InitPlayerItems( void ) {
int n;
int v;
// init types
if( s_serveroptions.multiplayer ) {
v = PT_OPEN; // open
} |
functions | server
if( s_serveroptions.dedicated.curvalue == 0 ) {
for (n = 0; n < UI_MaxSplitView(); n++) {
trap_Cvar_VariableStringBuffer( Com_LocalPlayerCvarName(n, "name"), s_serveroptions.playerNameBuffers[n], sizeof(s_serveroptions.playerNameBuffers[n]) );
Q_CleanStr( s_serveroptions.playerNameBuffers[n] );
s_se... |
functions | teams
if( s_serveroptions.gametype >= GT_TEAM ) {
for( n = 0; n < (PLAYER_SLOTS / 2); n++ ) {
s_serveroptions.playerTeam[n].curvalue = 0;
} |
functions | void ServerOptions_SetPlayerItems( int playerType ) {
int start;
int n;
// types
// for( n = 0; n < PLAYER_SLOTS; n++ ) {
// if( (!s_serveroptions.multiplayer) && (n > 0) && (s_serveroptions.playerType[n].curvalue == 0) ) {
// s_serveroptions.playerType[n].curvalue = PT_BOT;
// } |
functions | names
if( s_serveroptions.dedicated.curvalue == 0 ) {
s_serveroptions.player0.string = "Human";
s_serveroptions.playerName[0].generic.flags &= ~QMF_HIDDEN;
for (n = 1; n < UI_MaxSplitView(); n++) {
s_serveroptions.playerType[n].numitems = ARRAY_LEN(humanPlayerType_list) - 1;
if (playerType != n && player... |
functions | else if (s_serveroptions.playerType[n].curvalue == PT_HUMAN) {
s_serveroptions.playerName[n].string = s_serveroptions.playerNameBuffers[n];
} |
functions | else if( s_serveroptions.playerType[n].curvalue == PT_BOT ) {
s_serveroptions.playerName[n].generic.flags &= ~(QMF_INACTIVE|QMF_HIDDEN);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.