<commit_before>#include <string.h>
#include <stdio.h>

#include "capwap.h"
#include "sock.h"

#include "acinfo.h"


int acinfo_print(char *str,const struct ac_info *acinfo)
{
	char *s = str;

	s+=sprintf(s,"\tAC name: %s\n",acinfo->ac_name);
	s+=sprintf(s,"\tHardware version: %s\n",acinfo->hardware_version);
	s+=sprintf(s,"\tSoftware version: %s\n",acinfo->software_version);
	s+=sprintf(s,"\tStations: %i\n",acinfo->stations);
	s+=sprintf(s,"\tSation limit: %i\n",acinfo->limit);
	s+=sprintf(s,"\tActive WTPs: %i\n",acinfo->active_wtps);
	s+=sprintf(s,"\tMax WTPs: %i\n",acinfo->max_wtps);
	char help[64];
	sock_addrtostr((struct sockaddr*)&acinfo->local_ip,help,64);
	s+=sprintf(s,"\tLocal IP: %s\n",help);
	s+=sprintf(s,"\tECN support: %s\n",acinfo->ecn_support==0 ? "limited" : "full");
	s+=sprintf(s,"\tRMAC support: %s\n",acinfo->rmac==2 ? "supported" : "not supported");


	help[0]=0;
	if (acinfo->security & AC_SECURITY_S)
		strcpy(help,"psk");
	if (acinfo->security & AC_SECURITY_X){
		if (strlen(help))
			strcat(help,"/");
		strcat(help,"X.509");
	}
	if (!strlen(help))
		strcpy(help,"None");
	s+=sprintf(s,"\tSecurity: %s\n",help);

	help[0]=0;
	if (acinfo->dtls_policy & AC_DTLS_POLICY_D){
		strcpy(help,"dtls");
	}<commit_msg>Fixed RMAC support printing<commit_after>#include <string.h>
#include <stdio.h>

#include "capwap.h"
#include "sock.h"

#include "acinfo.h"


int acinfo_print(char *str,const struct ac_info *acinfo)
{
	char *s = str;

	s+=sprintf(s,"\tAC name: %s\n",acinfo->ac_name);
	s+=sprintf(s,"\tHardware version: %s\n",acinfo->hardware_version);
	s+=sprintf(s,"\tSoftware version: %s\n",acinfo->software_version);
	s+=sprintf(s,"\tStations: %i\n",acinfo->stations);
	s+=sprintf(s,"\tSation limit: %i\n",acinfo->limit);
	s+=sprintf(s,"\tActive WTPs: %i\n",acinfo->active_wtps);
	s+=sprintf(s,"\tMax WTPs: %i\n",acinfo->max_wtps);
	char help[64];
	sock_addrtostr((struct sockaddr*)&acinfo->local_ip,help,64);
	s+=sprintf(s,"\tLocal IP: %s\n",help);
	s+=sprintf(s,"\tECN support: %s\n",acinfo->ecn_support==0 ? "limited" : "full");
	s+=sprintf(s,"\tRMAC support: %s\n",acinfo->rmac==1 ? "supported" : "not supported");


	help[0]=0;
	if (acinfo->security & AC_SECURITY_S)
		strcpy(help,"psk");
	if (acinfo->security & AC_SECURITY_X){
		if (strlen(help))
			strcat(help,"/");
		strcat(help,"X.509");
	}
	if (!strlen(help))
		strcpy(help,"None");
	s+=sprintf(s,"\tSecurity: %s\n",help);

	help[0]=0;
	if (acinfo->dtls_policy & AC_DTLS_POLICY_D){
		strcpy(help,"dtls");
	}
{'fraction_non_alphanumeric': 0.23298638911128902, 'fraction_numerical': 0.010408326661329063, 'mean_word_length': 6.099431818181818, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5363908', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1125, 'n_words': 161}