Lines Matching refs:pbuf
239 static boolean_t do_set_wepkey(int fd, const char *pbuf);
1015 char *pbuf = NULL; in append_pa() local
1021 pbuf = safe_malloc(len); in append_pa()
1022 safe_snprintf(pbuf, len, "[%s]", arg); in append_pa()
1023 PRTDBG(("append_pa(\"%s\") = \"%s\"\n", arg, pbuf)); in append_pa()
1024 return (pbuf); in append_pa()
1131 char *pbuf = NULL; in open_dev() local
1142 pbuf = safe_strdup(devname); in open_dev()
1145 pbuf = safe_malloc(len); in open_dev()
1146 safe_snprintf(pbuf, len, "/dev/%s", devname); in open_dev()
1148 fd = open(pbuf, O_RDWR); in open_dev()
1149 free(pbuf); in open_dev()
1351 char *pbuf = NULL; in set_prefer() local
1361 pbuf = append_pa(prefer); in set_prefer()
1362 if (find_section(p_config_file, pbuf) == NULL) { in set_prefer()
1366 free(pbuf); in set_prefer()
1369 free(pbuf); in set_prefer()
1691 char *pbuf; in essid_of_profile() local
1694 pbuf = append_pa(profile); in essid_of_profile()
1695 p_section = find_section(gp_config_file, pbuf); in essid_of_profile()
1696 free(pbuf); in essid_of_profile()
1915 is_waittime_valid(char *pbuf) in is_waittime_valid() argument
1919 i = atoi(pbuf); in is_waittime_valid()
1922 for (i = 0; i < strlen(pbuf); i++) { in is_waittime_valid()
1923 if (isdigit(pbuf[i]) == 0) { in is_waittime_valid()
2027 char *pbuf = NULL; in do_startconf() local
2040 pbuf = append_pa(selected); in do_startconf()
2041 p_wep_section = find_section(gp_wepkey_file, pbuf); in do_startconf()
2042 p_section = find_section(gp_config_file, pbuf); in do_startconf()
2043 free(pbuf); in do_startconf()
2136 char pbuf[256]; in record_active_profile() local
2148 safe_snprintf(pbuf, sizeof (pbuf), "activep=%s", pname); in record_active_profile()
2149 update_aelist(plist, pbuf); in record_active_profile()
2170 char *pbuf = NULL; in do_loadpf() local
2222 pbuf = append_pa(argv[0]); in do_loadpf()
2223 p_wep_section = find_section(gp_wepkey_file, pbuf); in do_loadpf()
2224 p_section = find_section(gp_config_file, pbuf); in do_loadpf()
2244 free(pbuf); in do_loadpf()
2271 record_active_profile(pbuf, RECORD_ADD); in do_loadpf()
2285 free(pbuf); in do_loadpf()
2297 p_section = find_section(gp_config_file, pbuf); in do_loadpf()
2302 free(pbuf); in do_loadpf()
2313 free(pbuf); in do_loadpf()
2369 char *pbuf = NULL; in do_printpf() local
2403 pbuf = append_pa(argv[i]); in do_printpf()
2404 p_section = find_section(gp_config_file, pbuf); in do_printpf()
2405 free(pbuf); in do_printpf()
2695 char *pbuf; in do_lsprefer() local
2710 pbuf = append_pa(pae->ae_arg); in do_lsprefer()
2711 (void) printf("%d\t%s\n", ++i, pbuf); in do_lsprefer()
2771 is_prefer_rank_valid(const char *pbuf) in is_prefer_rank_valid() argument
2776 for (i = 0; i < strlen(pbuf); i++) { in is_prefer_rank_valid()
2777 if (isdigit(pbuf[i]) == 0) { in is_prefer_rank_valid()
2782 i = atoi(pbuf); in is_prefer_rank_valid()
2817 is_wepkeyindex_valid(const char *pbuf) in is_wepkeyindex_valid() argument
2822 for (i = 0; i < strlen(pbuf); i++) { in is_wepkeyindex_valid()
2823 if (isdigit(pbuf[i]) == 0) { in is_wepkeyindex_valid()
2828 i = atoi(pbuf); in is_wepkeyindex_valid()
2836 is_channel_valid(const char *pbuf) in is_channel_valid() argument
2841 for (i = 0; i < strlen(pbuf); i++) { in is_channel_valid()
2842 if (isdigit(pbuf[i]) == 0) { in is_channel_valid()
2847 i = atoi(pbuf); in is_channel_valid()
2855 is_wepkey_valid(const char *pbuf, uint32_t length) in is_wepkey_valid() argument
2864 if (isxdigit(pbuf[i]) == 0) { in is_wepkey_valid()
2943 do_set_wepkey(int fd, const char *pbuf) in do_set_wepkey() argument
2954 PRTDBG(("do_set_wepkey(%d, \"%s\")\n", fd, pbuf)); in do_set_wepkey()
2958 id = pbuf[strlen("wepkeyn") - 1] - '0'; in do_set_wepkey()
2959 wepkey = get_value(pbuf); in do_set_wepkey()
3015 char *pbuf = NULL; in get_commit_key() local
3045 pbuf = safe_malloc(len); in get_commit_key()
3046 safe_snprintf(pbuf, len, "%s%d=%s", "wepkey", key, wepkey); in get_commit_key()
3049 return (pbuf); in get_commit_key()
3061 char *pbuf; in do_wepkey() local
3073 pbuf = get_commit_key(fd, argc, argv); in do_wepkey()
3074 if ((pbuf != NULL) && (do_set_wepkey(fd, pbuf) == B_TRUE)) { in do_wepkey()
3075 free(pbuf); in do_wepkey()
3078 free(pbuf); in do_wepkey()
3086 char *pbuf; in do_setprofwepkey() local
3113 pbuf = get_commit_key(fd, argc, argv); in do_setprofwepkey()
3114 if (pbuf == NULL) in do_setprofwepkey()
3117 update_aelist(plist, pbuf); in do_setprofwepkey()
4148 char *pbuf = NULL; in do_createprofile() local
4204 pbuf = append_pa(profilename); in do_createprofile()
4206 PRTDBG(("do_createprofile: profile_name = %s\n", pbuf)); in do_createprofile()
4207 if ((find_section(gp_config_file, pbuf) != NULL) || in do_createprofile()
4208 find_section(gp_wepkey_file, pbuf) != NULL) { in do_createprofile()
4219 new_section(gp_config_file, plist_config, pbuf); in do_createprofile()
4221 new_section(gp_wepkey_file, plist_wepkey, pbuf); in do_createprofile()
4223 free(pbuf); in do_createprofile()
4227 free(pbuf); in do_createprofile()
4237 char *pbuf = NULL; in do_setprofparam() local
4246 pbuf = append_pa(argv[0]); in do_setprofparam()
4248 psection_config = find_section(gp_config_file, pbuf); in do_setprofparam()
4249 psection_wep = find_section(gp_wepkey_file, pbuf); in do_setprofparam()
4254 free(pbuf); in do_setprofparam()
4257 free(pbuf); in do_setprofparam()
4279 char *pbuf = NULL; in do_getprofparam() local
4286 pbuf = append_pa(argv[0]); in do_getprofparam()
4287 p_section = find_section(gp_config_file, pbuf); in do_getprofparam()
4354 gExecName, argv[i], pbuf); in do_getprofparam()
4360 free(pbuf); in do_getprofparam()