|
From: <sat...@us...> - 2010-03-15 15:28:03
|
Revision: 239
http://w-meter.svn.sourceforge.net/w-meter/?rev=239&view=rev
Author: sathakselva
Date: 2010-03-15 15:27:54 +0000 (Mon, 15 Mar 2010)
Log Message:
-----------
formatting style modified for PS-Poll frame
Modified Paths:
--------------
frame_injection_g/trunk/injection.kdevelop
frame_injection_g/trunk/src/Data_Qos_data.h
frame_injection_g/trunk/src/control_pspoll_cpp.cpp
frame_injection_g/trunk/src/control_pspoll_cpp.moc
frame_injection_g/trunk/src/inj_control_pspoll.h
frame_injection_g/trunk/src/inj_mgmt_association_form.h
frame_injection_g/trunk/src/management_form.h
frame_injection_g/trunk/src/mgmt_asso_response.h
frame_injection_g/trunk/src/mgmt_authen.h
frame_injection_g/trunk/src/mgmt_deauthentication.h
frame_injection_g/trunk/src/mgmt_probe_request.h
Modified: frame_injection_g/trunk/injection.kdevelop
===================================================================
--- frame_injection_g/trunk/injection.kdevelop 2010-03-15 14:11:41 UTC (rev 238)
+++ frame_injection_g/trunk/injection.kdevelop 2010-03-15 15:27:54 UTC (rev 239)
@@ -16,8 +16,8 @@
<projectname>injection</projectname>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
- <description/>
- <defaultencoding/>
+ <description></description>
+ <defaultencoding></defaultencoding>
<versioncontrol/>
</general>
<kdevcppsupport>
@@ -55,7 +55,7 @@
<includePaths>.;</includePaths>
</codecompletion>
<creategettersetter>
- <prefixGet/>
+ <prefixGet></prefixGet>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
@@ -232,10 +232,10 @@
<kdevdebugger>
<general>
<dbgshell>libtool</dbgshell>
- <gdbpath/>
- <configGdbScript/>
- <runShellScript/>
- <runGdbScript/>
+ <gdbpath></gdbpath>
+ <configGdbScript></configGdbScript>
+ <runShellScript></runShellScript>
+ <runGdbScript></runGdbScript>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
Modified: frame_injection_g/trunk/src/Data_Qos_data.h
===================================================================
--- frame_injection_g/trunk/src/Data_Qos_data.h 2010-03-15 14:11:41 UTC (rev 238)
+++ frame_injection_g/trunk/src/Data_Qos_data.h 2010-03-15 15:27:54 UTC (rev 239)
@@ -1,132 +1,131 @@
-/****************************************************************************
-** Form interface generated from reading ui file './Data_Qos_data.ui'
-**
-** Created by User Interface Compiler
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-
-#ifndef DATA_QOS_DATA_H
-#define DATA_QOS_DATA_H
-
-#include <qvariant.h>
-#include <qwidget.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QSpacerItem;
-class QFrame;
-class QGroupBox;
-class QLineEdit;
-class QLabel;
-class QComboBox;
-class QPushButton;
-class QButtonGroup;
-class QRadioButton;
-
-class Data_Qos_data : public QWidget
-{
- Q_OBJECT
-
-public:
- Data_Qos_data( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
- ~Data_Qos_data();
-
- QFrame* frame4;
- QGroupBox* groupBox1;
- QLineEdit* lineedit_frame_4;
- QLineEdit* lineedit_frame_6;
- QLineEdit* lineedit_frame_2;
- QLineEdit* lineedit_frame_7;
- QLineEdit* lineedit_frame_8;
- QLineEdit* lineedit_frame_3;
- QLineEdit* lineedit_frame_5;
- QLabel* bit_position;
- QLabel* textLabel2_2;
- QLabel* textLabel3_2;
- QLabel* textLabel2;
- QLabel* textLabel1;
- QLineEdit* lineedit_frame_14;
- QLineEdit* lineedit_frame_11;
- QLineEdit* lineedit_frame_12;
- QLineEdit* lineedit_frame_10;
- QLineEdit* lineedit_frame_15;
- QLineEdit* lineedit_frame_9;
- QLineEdit* lineedit_frame_16;
- QLineEdit* lineedit_frame_13;
- QGroupBox* groupBox2;
- QLabel* textLabel1_2;
- QLabel* textLabel2_3;
- QLineEdit* lineedit_frag_no;
- QLineEdit* lineedit_seq_no;
- QGroupBox* groupBox16;
- QLineEdit* lineedit_address1_4;
- QLineEdit* lineedit_address1_6;
- QLineEdit* lineedit_address1_5;
- QLineEdit* lineedit_address1_1;
- QLineEdit* lineedit_address1_3;
- QLineEdit* lineedit_address1_2;
- QLabel* textLabel4;
- QLabel* textLabel4_2;
- QLineEdit* lineedit_address2_6;
- QLineEdit* lineedit_address2_5;
- QLineEdit* lineedit_address2_4;
- QLineEdit* lineedit_address2_3;
- QLineEdit* lineedit_address2_2;
- QLineEdit* lineedit_address2_1;
- QLineEdit* lineedit_address3_6;
- QLineEdit* lineedit_address3_1;
- QLineEdit* lineedit_address3_3;
- QLineEdit* lineedit_address3_2;
- QLineEdit* lineedit_address3_4;
- QLineEdit* lineedit_address3_5;
- QLabel* textLabel3;
- QLineEdit* lineedit_NAV;
- QLineEdit* lineedit_frame_1;
- QGroupBox* groupBox4;
- QLabel* textLabel8;
- QLabel* textLabel3_3_2;
- QLabel* textLabel4_3_2;
- QLabel* textLabel5;
- QLabel* textLabel9;
- QComboBox* combobox_TID;
- QLineEdit* lineedit_EOSP;
- QLineEdit* lineedit_txop;
- QComboBox* combobox_Ack_policy;
- QComboBox* combobox_payload;
- QGroupBox* groupBox6;
- QPushButton* qos_run_button;
- QPushButton* qos_mainwin_button;
- QPushButton* qos_clear_button;
- QPushButton* qos_save_button;
- QPushButton* qos_default_button;
- QGroupBox* groupBox3;
- QLabel* textLabel1_3;
- QLineEdit* lineedit_msdu_size;
- QButtonGroup* buttonGroup1;
- QRadioButton* radiobutton_auto;
- QRadioButton* radiobutton_user_defined;
- QLabel* textLabel2_4;
- QLineEdit* lineedit_payload;
- QGroupBox* groupBox3_2;
- QLineEdit* lineedit_testid;
-
-public slots:
- virtual void data_qos_run_click();
- virtual void data_qos_clear_click();
- virtual void data_qos_main_win();
- virtual void data_qos_button_group();
- virtual void data_qos_msdu_change();
- virtual void data_qos_save_click();
- virtual void data_qos_default_click();
-
-protected:
-
-protected slots:
- virtual void languageChange();
-
-};
-
-#endif // DATA_QOS_DATA_H
-
+/****************************************************************************
+** Form interface generated from reading ui file './Data_Qos_data.ui'
+**
+** Created by User Interface Compiler
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef DATA_QOS_DATA_H
+#define DATA_QOS_DATA_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QFrame;
+class QGroupBox;
+class QLineEdit;
+class QLabel;
+class QComboBox;
+class QPushButton;
+class QButtonGroup;
+class QRadioButton;
+
+class Data_Qos_data : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Data_Qos_data( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~Data_Qos_data();
+
+ QFrame* frame4;
+ QGroupBox* groupBox1;
+ QLineEdit* lineedit_frame_4;
+ QLineEdit* lineedit_frame_6;
+ QLineEdit* lineedit_frame_2;
+ QLineEdit* lineedit_frame_7;
+ QLineEdit* lineedit_frame_8;
+ QLineEdit* lineedit_frame_3;
+ QLineEdit* lineedit_frame_5;
+ QLabel* bit_position;
+ QLabel* textLabel2_2;
+ QLabel* textLabel3_2;
+ QLabel* textLabel2;
+ QLabel* textLabel1;
+ QLineEdit* lineedit_frame_14;
+ QLineEdit* lineedit_frame_11;
+ QLineEdit* lineedit_frame_12;
+ QLineEdit* lineedit_frame_10;
+ QLineEdit* lineedit_frame_15;
+ QLineEdit* lineedit_frame_9;
+ QLineEdit* lineedit_frame_16;
+ QLineEdit* lineedit_frame_13;
+ QGroupBox* groupBox2;
+ QLabel* textLabel1_2;
+ QLabel* textLabel2_3;
+ QLineEdit* lineedit_frag_no;
+ QLineEdit* lineedit_seq_no;
+ QGroupBox* groupBox16;
+ QLineEdit* lineedit_address1_4;
+ QLineEdit* lineedit_address1_6;
+ QLineEdit* lineedit_address1_5;
+ QLineEdit* lineedit_address1_1;
+ QLineEdit* lineedit_address1_3;
+ QLineEdit* lineedit_address1_2;
+ QLabel* textLabel4;
+ QLabel* textLabel4_2;
+ QLineEdit* lineedit_address2_6;
+ QLineEdit* lineedit_address2_5;
+ QLineEdit* lineedit_address2_4;
+ QLineEdit* lineedit_address2_3;
+ QLineEdit* lineedit_address2_2;
+ QLineEdit* lineedit_address2_1;
+ QLineEdit* lineedit_address3_6;
+ QLineEdit* lineedit_address3_1;
+ QLineEdit* lineedit_address3_3;
+ QLineEdit* lineedit_address3_2;
+ QLineEdit* lineedit_address3_4;
+ QLineEdit* lineedit_address3_5;
+ QLabel* textLabel3;
+ QLineEdit* lineedit_NAV;
+ QLineEdit* lineedit_frame_1;
+ QGroupBox* groupBox4;
+ QLabel* textLabel8;
+ QLabel* textLabel3_3_2;
+ QLabel* textLabel4_3_2;
+ QLabel* textLabel5;
+ QLabel* textLabel9;
+ QComboBox* combobox_TID;
+ QLineEdit* lineedit_EOSP;
+ QLineEdit* lineedit_txop;
+ QComboBox* combobox_Ack_policy;
+ QComboBox* combobox_payload;
+ QGroupBox* groupBox6;
+ QPushButton* qos_run_button;
+ QPushButton* qos_mainwin_button;
+ QPushButton* qos_clear_button;
+ QPushButton* qos_save_button;
+ QPushButton* qos_default_button;
+ QGroupBox* groupBox3;
+ QLabel* textLabel1_3;
+ QLineEdit* lineedit_msdu_size;
+ QButtonGroup* buttonGroup1;
+ QRadioButton* radiobutton_auto;
+ QRadioButton* radiobutton_user_defined;
+ QLabel* textLabel2_4;
+ QLineEdit* lineedit_payload;
+ QGroupBox* groupBox3_2;
+ QLineEdit* lineedit_testid;
+
+public slots:
+ virtual void data_qos_run_click();
+ virtual void data_qos_clear_click();
+ virtual void data_qos_main_win();
+ virtual void data_qos_button_group();
+ virtual void data_qos_msdu_change();
+ virtual void data_qos_save_click();
+ virtual void data_qos_default_click();
+
+protected:
+
+protected slots:
+ virtual void languageChange();
+
+};
+
+#endif // DATA_QOS_DATA_H
Modified: frame_injection_g/trunk/src/control_pspoll_cpp.cpp
===================================================================
--- frame_injection_g/trunk/src/control_pspoll_cpp.cpp 2010-03-15 14:11:41 UTC (rev 238)
+++ frame_injection_g/trunk/src/control_pspoll_cpp.cpp 2010-03-15 15:27:54 UTC (rev 239)
@@ -25,76 +25,75 @@
#include "injection_main_cpp.h"
#include <qlineedit.h>
#include <qstring.h>
-#include <stdio.h>
-#include <unistd.h>
#include <kmessagebox.h>
#include <qvalidator.h>
#include <qpushbutton.h>
#include <qfile.h>
-#include <iostream>
#include <stdlib.h>
#include "mac_80211.h"
-uint16_t global_pspoll_flag=0;
+uint16_t global_pspoll_flag = 0;
char default_pspoll_file[] = "default_pspoll";
-control_pspoll_cpp::control_pspoll_cpp( QWidget* parent, const char* name, WFlags fl )
- : inj_control_pspoll( parent,name,fl )
+control_pspoll_cpp::control_pspoll_cpp(QWidget* parent, const char* name, WFlags fl)
+ : inj_control_pspoll(parent, name, fl)
{
- FILE *file1;
- char frame1[2], frame2[2], frame3[2], frame4[2], frame5[2], frame6[2], frame7[2], frame8[2], frame9[2], frame10[2], frame11[2], frame12[2], frame13[2], frame14[2], frame15[2], frame16[2], asso_id[5], add1[3], add2[3], add3[3], add4[3], add5[3], add6[3], add7[3], add8[3], add9[3], add10[3], add11[3], add12[3];
+ FILE *file1;
+ char frame1[2], frame2[2], frame3[2], frame4[2], frame5[2], frame6[2], frame7[2], frame8[2], frame9[2], frame10[2], frame11[2], frame12[2], frame13[2], frame14[2], frame15[2], frame16[2], asso_id[5], add1[3], add2[3], add3[3], add4[3], add5[3], add6[3], add7[3], add8[3], add9[3], add10[3], add11[3], add12[3];
- file1 = fopen( default_pspoll_file,"r" );
+ file1 = fopen(default_pspoll_file, "r");
- if ( file1==NULL )
- {
- KMessageBox::error( this,"Unable to open file. Loading initial values" );
- reset_ps_poll();
- }
- else
- {
- while ( fscanf( file1,"%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s", &frame1[0],&frame2[0],&frame3[0],&frame4[0],&frame5[0],&frame6[0],&frame7[0],&frame8[0],&frame9[0],&frame10[0],&frame11[0],&frame12[0],&frame13[0],&frame14[0],&frame15[0],&frame16[0],&asso_id[0],&add1[0],&add2[0],&add3[0],&add4[0],&add5[0],&add6[0],&add7[0],&add8[0],&add9[0],&add10[0],&add11[0],&add12[0] )!=EOF )
- {
+ if (file1 == NULL)
+ {
+ /* Cannot open. Load form with initial values */
+ KMessageBox::error(this, "Unable to open file. Loading initial values");
+ reset_ps_poll();
+ }
+ else
+ {
+ /* Read values from file and set in the form */
+ while (fscanf(file1, "%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s", &frame1[0], &frame2[0], &frame3[0], &frame4[0], &frame5[0], &frame6[0], &frame7[0], &frame8[0], &frame9[0], &frame10[0], &frame11[0], &frame12[0], &frame13[0], &frame14[0], &frame15[0], &frame16[0], &asso_id[0], &add1[0], &add2[0], &add3[0], &add4[0], &add5[0], &add6[0], &add7[0], &add8[0], &add9[0], &add10[0], &add11[0], &add12[0]) != EOF)
+ {
- lineedit_frame_1->setText( frame1 );
- lineedit_frame_2->setText( frame2 );
- lineedit_frame_3->setText( frame3 );
- lineedit_frame_4->setText( frame4 );
- lineedit_frame_5->setText( frame5 );
- lineedit_frame_6->setText( frame6 );
- lineedit_frame_7->setText( frame7 );
- lineedit_frame_8->setText( frame8 );
- lineedit_frame_9->setText( frame9 );
- lineedit_frame_10->setText( frame10 );
- lineedit_frame_11->setText( frame11 );
- lineedit_frame_12->setText( frame12 );
- lineedit_frame_13->setText( frame13 );
- lineedit_frame_14->setText( frame14 );
- lineedit_frame_15->setText( frame15 );
- lineedit_frame_16->setText( frame16 );
+ lineedit_frame_1->setText(frame1);
+ lineedit_frame_2->setText(frame2);
+ lineedit_frame_3->setText(frame3);
+ lineedit_frame_4->setText(frame4);
+ lineedit_frame_5->setText(frame5);
+ lineedit_frame_6->setText(frame6);
+ lineedit_frame_7->setText(frame7);
+ lineedit_frame_8->setText(frame8);
+ lineedit_frame_9->setText(frame9);
+ lineedit_frame_10->setText(frame10);
+ lineedit_frame_11->setText(frame11);
+ lineedit_frame_12->setText(frame12);
+ lineedit_frame_13->setText(frame13);
+ lineedit_frame_14->setText(frame14);
+ lineedit_frame_15->setText(frame15);
+ lineedit_frame_16->setText(frame16);
- lineedit_asso_id->setText( asso_id );
+ lineedit_asso_id->setText(asso_id);
- lineedit_address1_1->setText( add1 );
- lineedit_address1_2->setText( add2 );
- lineedit_address1_3->setText( add3 );
- lineedit_address1_4->setText( add4 );
- lineedit_address1_5->setText( add5 );
- lineedit_address1_6->setText( add6 );
+ lineedit_address1_1->setText(add1);
+ lineedit_address1_2->setText(add2);
+ lineedit_address1_3->setText(add3);
+ lineedit_address1_4->setText(add4);
+ lineedit_address1_5->setText(add5);
+ lineedit_address1_6->setText(add6);
- lineedit_address2_1->setText( add7 );
- lineedit_address2_2->setText( add8 );
- lineedit_address2_3->setText( add9 );
- lineedit_address2_4->setText( add10 );
- lineedit_address2_5->setText( add11 );
- lineedit_address2_6->setText( add12 );
- }
+ lineedit_address2_1->setText(add7);
+ lineedit_address2_2->setText(add8);
+ lineedit_address2_3->setText(add9);
+ lineedit_address2_4->setText(add10);
+ lineedit_address2_5->setText(add11);
+ lineedit_address2_6->setText(add12);
+ }
- fclose( file1 );
- }
+ fclose(file1);
+ }
- pspoll_run_button->setEnabled( 1 );
+ pspoll_run_button->setEnabled(1);
}
control_pspoll_cpp::~control_pspoll_cpp()
@@ -104,364 +103,363 @@
/*$SPECIALIZATION$*/
void control_pspoll_cpp::pspoll_main_win() //Event invoked after pressing Main_win push button
{
- pspoll_run_button->setEnabled( 1 );
- close();
+ pspoll_run_button->setEnabled(1);
+ close();
}
void control_pspoll_cpp::pspoll_clear_click()
{
- reset_ps_poll();
- pspoll_run_button->setEnabled( 1 );
+ reset_ps_poll();
+ pspoll_run_button->setEnabled(1);
}
void control_pspoll_cpp::pspoll_run_click() //Event invoked after pressing Run push button
{
- global_pspoll_flag=1;
- func_pspoll_hex_convertion();
+ global_pspoll_flag = 1;
+ func_pspoll_hex_convertion();
}
void control_pspoll_cpp::pspoll_default_click()
{
- global_pspoll_flag=2;
- func_pspoll_hex_convertion();
+ global_pspoll_flag = 2;
+ func_pspoll_hex_convertion();
}
void control_pspoll_cpp::pspoll_save_click()
{
- if ( lineedit_testid->text()!="" )
- {
- global_pspoll_flag=3;
- func_pspoll_hex_convertion();
- lineedit_testid->clear();
- }
- else
- QMessageBox::critical( this, tr( "Error" ), tr( "Test ID is empty" ) );
+ if (lineedit_testid->text() != "")
+ {
+ global_pspoll_flag = 3;
+ func_pspoll_hex_convertion();
+ lineedit_testid->clear();
+ }
+ else
+ QMessageBox::critical(this, tr("Error"), tr("Test ID is empty"));
}
void control_pspoll_cpp::func_pspoll_hex_convertion()
{
- mac_80211 mac;
- bool ok;
- //Qvalidator initialization
+ mac_80211 mac;
+ bool ok;
+ //Qvalidator initialization
- QRegExp rx( "[0-9A-Fa-f]{2}" );
- QRegExpValidator v( rx, this );
+ QRegExp rx("[0-9A-Fa-f]{2}");
+ QRegExpValidator v(rx, this);
- lineedit_address1_1->setValidator( &v );
- lineedit_address1_2->setValidator( &v );
- lineedit_address1_3->setValidator( &v );
- lineedit_address1_4->setValidator( &v );
- lineedit_address1_5->setValidator( &v );
- lineedit_address1_6->setValidator( &v );
- lineedit_address2_1->setValidator( &v );
- lineedit_address2_2->setValidator( &v );
- lineedit_address2_3->setValidator( &v );
- lineedit_address2_4->setValidator( &v );
- lineedit_address2_5->setValidator( &v );
- lineedit_address2_6->setValidator( &v );
+ lineedit_address1_1->setValidator(&v);
+ lineedit_address1_2->setValidator(&v);
+ lineedit_address1_3->setValidator(&v);
+ lineedit_address1_4->setValidator(&v);
+ lineedit_address1_5->setValidator(&v);
+ lineedit_address1_6->setValidator(&v);
+ lineedit_address2_1->setValidator(&v);
+ lineedit_address2_2->setValidator(&v);
+ lineedit_address2_3->setValidator(&v);
+ lineedit_address2_4->setValidator(&v);
+ lineedit_address2_5->setValidator(&v);
+ lineedit_address2_6->setValidator(&v);
- // address fields values to local variable
- QString add1_1=lineedit_address1_1->text();
- QString add1_2=lineedit_address1_2->text();
- QString add1_3=lineedit_address1_3->text();
- QString add1_4=lineedit_address1_4->text();
- QString add1_5=lineedit_address1_5->text();
- QString add1_6=lineedit_address1_6->text();
- QString add2_1=lineedit_address2_1->text();
- QString add2_2=lineedit_address2_2->text();
- QString add2_3=lineedit_address2_3->text();
- QString add2_4=lineedit_address2_4->text();
- QString add2_5=lineedit_address2_5->text();
- QString add2_6=lineedit_address2_6->text();
+ // address fields values to local variable
+ QString add1_1 = lineedit_address1_1->text();
+ QString add1_2 = lineedit_address1_2->text();
+ QString add1_3 = lineedit_address1_3->text();
+ QString add1_4 = lineedit_address1_4->text();
+ QString add1_5 = lineedit_address1_5->text();
+ QString add1_6 = lineedit_address1_6->text();
+ QString add2_1 = lineedit_address2_1->text();
+ QString add2_2 = lineedit_address2_2->text();
+ QString add2_3 = lineedit_address2_3->text();
+ QString add2_4 = lineedit_address2_4->text();
+ QString add2_5 = lineedit_address2_5->text();
+ QString add2_6 = lineedit_address2_6->text();
- int pos=0;
- // validating fields
+ int pos = 0;
+ // validating fields
- if (( v.validate( add1_1, pos )!=0 ) &&
- ( v.validate( add1_2, pos )!=0 ) &&
- ( v.validate( add1_3, pos )!=0 ) &&
- ( v.validate( add1_4, pos )!=0 ) &&
- ( v.validate( add1_5, pos )!=0 ) &&
- ( v.validate( add1_6, pos )!=0 ) &&
- ( v.validate( add2_1, pos )!=0 ) &&
- ( v.validate( add2_2, pos )!=0 ) &&
- ( v.validate( add2_3, pos )!=0 ) &&
- ( v.validate( add2_4, pos )!=0 ) &&
- ( v.validate( add2_5, pos )!=0 ) &&
- ( v.validate( add2_6, pos )!=0 ) )
+ if ((v.validate(add1_1, pos) != 0) &&
+ (v.validate(add1_2, pos) != 0) &&
+ (v.validate(add1_3, pos) != 0) &&
+ (v.validate(add1_4, pos) != 0) &&
+ (v.validate(add1_5, pos) != 0) &&
+ (v.validate(add1_6, pos) != 0) &&
+ (v.validate(add2_1, pos) != 0) &&
+ (v.validate(add2_2, pos) != 0) &&
+ (v.validate(add2_3, pos) != 0) &&
+ (v.validate(add2_4, pos) != 0) &&
+ (v.validate(add2_5, pos) != 0) &&
+ (v.validate(add2_6, pos) != 0))
+ {
+ // validating frame control field values
- {
- // validating frame control field values
+ if (lineedit_frame_1->text().toInt() <= 1 && lineedit_frame_1->text() != "" && lineedit_frame_2->text().toInt() <= 1 && lineedit_frame_2->text() != "" && lineedit_frame_3->text().toInt() <= 1 && lineedit_frame_3->text() != "" && lineedit_frame_4->text().toInt() <= 1 && lineedit_frame_4->text() != "" && lineedit_frame_5->text().toInt() <= 1 && lineedit_frame_5->text() != "" && lineedit_frame_6->text().toInt() <= 1 && lineedit_frame_6->text() != "" && lineedit_frame_7->text().toInt() <= 1 && lineedit_frame_7->text() != "" && lineedit_frame_8->text().toInt() <= 1 && lineedit_frame_8->text() != "" && lineedit_frame_9->text().toInt() <= 1 && lineedit_frame_9->text() != "" && lineedit_frame_10->text().toInt() <= 1 && lineedit_frame_10->text() != "" && lineedit_frame_11->text().toInt() <= 1 && lineedit_frame_11->text() != "" && lineedit_frame_12->text().toInt() <= 1 && lineedit_frame_12->text() != "" && lineedit_frame_13->text().toInt() <= 1 && lineedit_frame_13->text() != "" && lineedit_frame_14->text().toInt() <= 1 && lineedit_frame_14->text() != "" && lineedit_frame_15->text().toInt() <= 1 && lineedit_frame_15->text() != "" && lineedit_frame_16->text().toInt() <= 1 && lineedit_frame_16->text() != "")
+ {
+ // validating address fields to not have empty space
+ if (lineedit_address1_1->text() != "" && lineedit_address1_2->text() != "" && lineedit_address1_3->text() != "" && lineedit_address1_4->text() != "" && lineedit_address1_5->text() != "" && lineedit_address1_6->text() != "" && lineedit_address2_1->text() != "" && lineedit_address2_2->text() != "" && lineedit_address2_3->text() != "" && lineedit_address2_4->text() != "" && lineedit_address2_5->text() != "" && lineedit_address2_6->text() != "")
+ {
+ if (lineedit_asso_id->text() != "") //validating asso field
+ {
+ uint8_t frame_ctrl[2] = { 0X00, 0x00 };
- if ( lineedit_frame_1->text().toInt()<=1 && lineedit_frame_1->text()!="" && lineedit_frame_2->text().toInt()<=1 && lineedit_frame_2->text()!="" && lineedit_frame_3->text().toInt()<=1 && lineedit_frame_3->text()!="" && lineedit_frame_4->text().toInt()<=1 && lineedit_frame_4->text()!="" && lineedit_frame_5->text().toInt()<=1 && lineedit_frame_5->text()!="" && lineedit_frame_6->text().toInt()<=1 && lineedit_frame_6->text()!="" && lineedit_frame_7->text().toInt()<=1 && lineedit_frame_7->text()!="" && lineedit_frame_8->text().toInt()<=1 && lineedit_frame_8->text()!="" && lineedit_frame_9->text().toInt()<=1 && lineedit_frame_9->text()!="" && lineedit_frame_10->text().toInt()<=1 && lineedit_frame_10->text()!="" && lineedit_frame_11->text().toInt()<=1 && lineedit_frame_11->text()!="" && lineedit_frame_12->text().toInt()<=1 && lineedit_frame_12->text()!="" && lineedit_frame_13->text().toInt()<=1 && lineedit_frame_13->text()!="" && lineedit_frame_14->text().toInt()<=1 && lineedit_frame_14->text()!="" && lineedit_frame_15->text().toInt()<=1 && lineedit_frame_15->text()!="" && lineedit_frame_16->text().toInt()<=1 && lineedit_frame_16->text()!="" )
- {
- // validating address fields to not have empty space
- if ( lineedit_address1_1->text()!="" && lineedit_address1_2->text()!="" && lineedit_address1_3->text()!="" && lineedit_address1_4->text()!="" && lineedit_address1_5->text()!="" && lineedit_address1_6->text()!="" && lineedit_address2_1->text()!="" && lineedit_address2_2->text()!="" && lineedit_address2_3->text()!="" && lineedit_address2_4->text()!="" && lineedit_address2_5->text()!="" && lineedit_address2_6->text()!="" )
- {
- if ( lineedit_asso_id->text()!="" ) //validating asso field
- {
- uint8_t frame_ctrl0 = 0X00, frame_ctrl1 = 0x00;
+ // Form Frame control
+ frame_ctrl[0] = mac.bits_to_byte(lineedit_frame_1->text(), lineedit_frame_2->text(), lineedit_frame_3->text(), lineedit_frame_4->text(), lineedit_frame_5->text(), lineedit_frame_6->text(), lineedit_frame_7->text(), lineedit_frame_8->text());
- // Form Frame control
- frame_ctrl0 = mac.bits_to_byte( lineedit_frame_1->text(), lineedit_frame_2->text(), lineedit_frame_3->text(), lineedit_frame_4->text(), lineedit_frame_5->text(), lineedit_frame_6->text(), lineedit_frame_7->text(), lineedit_frame_8->text() );
+ // Form Frame control (flags)
+ frame_ctrl[1] = mac.bits_to_byte(lineedit_frame_9->text(), lineedit_frame_10->text(), lineedit_frame_11->text(), lineedit_frame_12->text(), lineedit_frame_13->text(), lineedit_frame_14->text(), lineedit_frame_15->text(), lineedit_frame_16->text());
- // Form Frame control (flags)
- frame_ctrl1 = mac.bits_to_byte( lineedit_frame_9->text(), lineedit_frame_10->text(), lineedit_frame_11->text(), lineedit_frame_12->text(), lineedit_frame_13->text(), lineedit_frame_14->text(), lineedit_frame_15->text(), lineedit_frame_16->text() );
+ uint16_t i, asso_id = lineedit_asso_id->text().toInt();
+ uint8_t asso_char[2];
- uint16_t asso_id = lineedit_asso_id->text().toInt(), i;
- uint8_t asso_char[2];
+ asso_id = asso_id | 0X0c00;
- asso_id = asso_id | 0X0c00;
+ for (i = 0;i < 2;i++)
+ asso_char[i] = *(((unsigned char*) & asso_id) + i);
- for ( i=0;i<2;i++ )
- asso_char[i] = *((( unsigned char* )&asso_id )+i );
+ // convert the MAC address to hex values and store it in a local variable
+ uint8_t addr1_1 = (unsigned char) lineedit_address1_1->text().toInt(&ok , 16);
- // address field values to local variable
+ uint8_t addr1_2 = (unsigned char) lineedit_address1_2->text().toInt(&ok , 16);
- uint8_t addr1_1 = ( unsigned char ) lineedit_address1_1->text().toInt( &ok ,16 );
+ uint8_t addr1_3 = (unsigned char) lineedit_address1_3->text().toInt(&ok , 16);
- uint8_t addr1_2 = ( unsigned char ) lineedit_address1_2->text().toInt( &ok ,16 );
+ uint8_t addr1_4 = (unsigned char) lineedit_address1_4->text().toInt(&ok , 16);
- uint8_t addr1_3 = ( unsigned char ) lineedit_address1_3->text().toInt( &ok ,16 );
+ uint8_t addr1_5 = (unsigned char) lineedit_address1_5->text().toInt(&ok , 16);
- uint8_t addr1_4 = ( unsigned char ) lineedit_address1_4->text().toInt( &ok ,16 );
+ uint8_t addr1_6 = (unsigned char) lineedit_address1_6->text().toInt(&ok , 16);
- uint8_t addr1_5 = ( unsigned char ) lineedit_address1_5->text().toInt( &ok ,16 );
+ uint8_t addr2_1 = (unsigned char) lineedit_address2_1->text().toInt(&ok , 16);
- uint8_t addr1_6 = ( unsigned char ) lineedit_address1_6->text().toInt( &ok ,16 );
+ uint8_t addr2_2 = (unsigned char) lineedit_address2_2->text().toInt(&ok , 16);
- uint8_t addr2_1 = ( unsigned char ) lineedit_address2_1->text().toInt( &ok ,16 );
+ uint8_t addr2_3 = (unsigned char) lineedit_address2_3->text().toInt(&ok , 16);
- uint8_t addr2_2 = ( unsigned char ) lineedit_address2_2->text().toInt( &ok ,16 );
+ uint8_t addr2_4 = (unsigned char) lineedit_address2_4->text().toInt(&ok , 16);
- uint8_t addr2_3 = ( unsigned char ) lineedit_address2_3->text().toInt( &ok ,16 );
+ uint8_t addr2_5 = (unsigned char) lineedit_address2_5->text().toInt(&ok , 16);
- uint8_t addr2_4 = ( unsigned char ) lineedit_address2_4->text().toInt( &ok ,16 );
+ uint8_t addr2_6 = (unsigned char) lineedit_address2_6->text().toInt(&ok , 16);
- uint8_t addr2_5 = ( unsigned char ) lineedit_address2_5->text().toInt( &ok ,16 );
+ //values initializing in a dynamic array
+ uint8_t control_header_arr[] =
+ {
+ frame_ctrl[0],
+ frame_ctrl[1],
+ asso_char[0],
+ asso_char[1],
+ addr1_1,
+ addr1_2,
+ addr1_3,
+ addr1_4,
+ addr1_5,
+ addr1_6,
+ addr2_1,
+ addr2_2,
+ addr2_3,
+ addr2_4,
+ addr2_5,
+ addr2_6
+ };
- uint8_t addr2_6 = ( unsigned char ) lineedit_address2_6->text().toInt( &ok ,16 );
+ uint16_t frame_len = sizeof(control_header_arr) / sizeof(unsigned char);
- //values initializing in a dynamic array
- uint8_t control_header_arr[] =
- {
- frame_ctrl0,
- frame_ctrl1,
- asso_char[0],
- asso_char[1],
- addr1_1,
- addr1_2,
- addr1_3,
- addr1_4,
- addr1_5,
- addr1_6,
- addr2_1,
- addr2_2,
- addr2_3,
- addr2_4,
- addr2_5,
- addr2_6
- };
+ int file_exists = 0;
- uint16_t frame_len = sizeof( control_header_arr )/sizeof( unsigned char );
+ switch (global_pspoll_flag)
+ {
- int file_exists = 0;
+ case 1:
+ {
+ static injection_main_cpp *obj = new injection_main_cpp();
+ obj->func_call(control_header_arr, frame_len);
+ pspoll_run_button->setEnabled(0);
+ break;
+ }
- switch ( global_pspoll_flag )
- {
+ case 2:
+ {
+ save_in_txt(default_pspoll_file);
+ break;
+ }
- case 1:
- {
- static injection_main_cpp *obj=new injection_main_cpp();
- obj->func_call( control_header_arr,frame_len );
- pspoll_run_button->setEnabled( 0 );
- break;
- }
+ case 3:
+ {
+ QString test_id = lineedit_testid->text();
+ char save_file[15] = "TestId_";
+ char hex_file[15], txt_file[15];
- case 2:
- {
- save_in_txt( default_pspoll_file );
- break;
- }
+ strcat(&save_file[0], test_id.latin1());
+ strcpy(&hex_file[0], &save_file[0]);
+ strcpy(&txt_file[0], &save_file[0]);
+ strcat(&hex_file[0], ".hex");
+ strcat(&txt_file[0], ".txt");
- case 3:
- {
- QString test_id=lineedit_testid->text();
- char save_file[15] = "TestId_";
- char hex_file[15], txt_file[15];
+ if (QFile::exists(&hex_file[0]) &&
+ QMessageBox::question(this, tr("Overwrite File?"),
+ tr("%1 : Already exists. Do you want to overwrite it?")
+ .arg(&hex_file[0]),
+ tr("&Yes"), tr("&No"), QString::null, 0, 1))
+ {
+ file_exists = 1;
+ }
- strcat( &save_file[0], test_id.latin1() );
- strcpy( &hex_file[0], &save_file[0] );
- strcpy( &txt_file[0], &save_file[0] );
- strcat( &hex_file[0], ".hex" );
- strcat( &txt_file[0], ".txt" );
+ if (file_exists != 1)
+ {
+ mac.save_in_hex(&hex_file[0], control_header_arr, frame_len);
+ file_exists = 0;
+ }
- if ( QFile::exists( &hex_file[0] ) &&
- QMessageBox::question( this, tr( "Overwrite File?" ),
- tr( "%1 : Already exists. Do you want to overwrite it?" )
- .arg( &hex_file[0] ),
- tr( "&Yes" ), tr( "&No" ),
- QString::null, 0, 1 ) )
- {
- file_exists = 1;
- }
+ if (QFile::exists(&txt_file[0]) &&
+ QMessageBox::question(this, tr("Overwrite File?"),
+ tr("%1 : Already exists. Do you want to overwrite it?")
+ .arg(&txt_file[0]),
+ tr("&Yes"), tr("&No"),
+ QString::null, 0, 1))
+ {
+ file_exists = 1;
+ }
- if ( file_exists!=1 )
- {
- mac.save_in_hex( &hex_file[0], control_header_arr, frame_len );
- file_exists = 0;
- }
+ if (file_exists != 1)
+ {
+ save_in_txt(&txt_file[0]);
+ QMessageBox::about(this,
+ tr("Template Saved"),
+ tr("Template saved successfully"));
+ }
- if ( QFile::exists( &txt_file[0] ) &&
- QMessageBox::question( this, tr( "Overwrite File?" ),
- tr( "%1 : Already exists. Do you want to overwrite it?" )
- .arg( &txt_file[0] ),
- tr( "&Yes" ), tr( "&No" ),
- QString::null, 0, 1 ) )
- {
- file_exists = 1;
- }
-
- if ( file_exists!=1 )
- {
- save_in_txt( &txt_file[0] );
- QMessageBox::about( this,
- tr( "Template Saved" ),
- tr( "Template saved successfully" ) );
- }
-
- break;
- }
- }
- }
- else
- KMessageBox::error( this,"Invalid Association ID" );
- }
- else
- KMessageBox::error( this,"Check the Address fields" );
- }
- else
- KMessageBox::error( this,"Check the frame field values" );
- }
- else
- KMessageBox::error( this,"Hexa decimal values only allowed in address field" );
+ break;
+ }
+ }
+ }
+ else
+ KMessageBox::error(this, "Invalid Association ID");
+ }
+ else
+ KMessageBox::error(this, "Check the Address fields");
+ }
+ else
+ KMessageBox::error(this, "Check the frame field values");
+ }
+ else
+ KMessageBox::error(this, "Hexa decimal values only allowed in address field");
}
void control_pspoll_cpp::reset_ps_poll()
{
- lineedit_frame_1->setText( "0" );
- lineedit_frame_2->setText( "0" );
- lineedit_frame_3->setText( "1" );
- lineedit_frame_4->setText( "0" );
- lineedit_frame_5->setText( "0" );
- lineedit_frame_6->setText( "1" );
- lineedit_frame_7->setText( "0" );
- lineedit_frame_8->setText( "1" );
+ lineedit_frame_1->setText("0");
+ lineedit_frame_2->setText("0");
+ lineedit_frame_3->setText("1");
+ lineedit_frame_4->setText("0");
+ lineedit_frame_5->setText("0");
+ lineedit_frame_6->setText("1");
+ lineedit_frame_7->setText("0");
+ lineedit_frame_8->setText("1");
- lineedit_frame_9->setText( "0" );
- lineedit_frame_10->setText( "0" );
- lineedit_frame_11->setText( "0" );
- lineedit_frame_12->setText( "0" );
- lineedit_frame_13->setText( "0" );
- lineedit_frame_14->setText( "0" );
- lineedit_frame_15->setText( "0" );
- lineedit_frame_16->setText( "0" );
- lineedit_asso_id->setText( "0" );
+ lineedit_frame_9->setText("0");
+ lineedit_frame_10->setText("0");
+ lineedit_frame_11->setText("0");
+ lineedit_frame_12->setText("0");
+ lineedit_frame_13->setText("0");
+ lineedit_frame_14->setText("0");
+ lineedit_frame_15->setText("0");
+ lineedit_frame_16->setText("0");
+ lineedit_asso_id->setText("0");
- lineedit_asso_id->setText( "0" );
- lineedit_address1_1->setText( "FF" );
- lineedit_address1_2->setText( "FF" );
- lineedit_address1_3->setText( "FF" );
- lineedit_address1_4->setText( "FF" );
- lineedit_address1_5->setText( "FF" );
- lineedit_address1_6->setText( "FF" );
+ lineedit_asso_id->setText("0");
+ lineedit_address1_1->setText("FF");
+ lineedit_address1_2->setText("FF");
+ lineedit_address1_3->setText("FF");
+ lineedit_address1_4->setText("FF");
+ lineedit_address1_5->setText("FF");
+ lineedit_address1_6->setText("FF");
- lineedit_address2_1->setText( "FF" );
- lineedit_address2_2->setText( "FF" );
- lineedit_address2_3->setText( "FF" );
- lineedit_address2_4->setText( "FF" );
- lineedit_address2_5->setText( "FF" );
- lineedit_address2_6->setText( "FF" );
+ lineedit_address2_1->setText("FF");
+ lineedit_address2_2->setText("FF");
+ lineedit_address2_3->setText("FF");
+ lineedit_address2_4->setText("FF");
+ lineedit_address2_5->setText("FF");
+ lineedit_address2_6->setText("FF");
}
-void control_pspoll_cpp::save_in_txt( char *file )
+void control_pspoll_cpp::save_in_txt(char *file)
{
- FILE *fptr;
- fptr=fopen( file,"w" );
+ FILE *fptr;
+ fptr = fopen(file, "w");
- if ( fptr==NULL )
- {
- KMessageBox::error( this,"Unable to open setup file" );
- exit( 1 );
- }
+ if (fptr == NULL)
+ {
+ KMessageBox::error(this, "Unable to open setup file");
+ exit(1);
+ }
- QString str_frm1=lineedit_frame_1->text();
+ QString str_frm1 = lineedit_frame_1->text();
+ QString str_frm2 = lineedit_frame_2->text();
+ QString str_frm3 = lineedit_frame_3->text();
+ QString str_frm4 = lineedit_frame_4->text();
+ QString str_frm5 = lineedit_frame_5->text();
+ QString str_frm6 = lineedit_frame_6->text();
+ QString str_frm7 = lineedit_frame_7->text();
+ QString str_frm8 = lineedit_frame_8->text();
+ QString str_frm9 = lineedit_frame_9->text();
+ QString str_frm10 = lineedit_frame_10->text();
+ QString str_frm11 = lineedit_frame_11->text();
+ QString str_frm12 = lineedit_frame_12->text();
+ QString str_frm13 = lineedit_frame_13->text();
+ QString str_frm14 = lineedit_frame_14->text();
+ QString str_frm15 = lineedit_frame_15->text();
+ QString str_frm16 = lineedit_frame_16->text();
- QString str_frm2=lineedit_frame_2->text();
- QString str_frm3=lineedit_frame_3->text();
- QString str_frm4=lineedit_frame_4->text();
- QString str_frm5=lineedit_frame_5->text();
- QString str_frm6=lineedit_frame_6->text();
- QString str_frm7=lineedit_frame_7->text();
- QString str_frm8=lineedit_frame_8->text();
- QString str_frm9=lineedit_frame_9->text();
- QString str_frm10=lineedit_frame_10->text();
- QString str_frm11=lineedit_frame_11->text();
- QString str_frm12=lineedit_frame_12->text();
- QString str_frm13=lineedit_frame_13->text();
- QString str_frm14=lineedit_frame_14->text();
- QString str_frm15=lineedit_frame_15->text();
- QString str_frm16=lineedit_frame_16->text();
- QString str_asso_id=lineedit_asso_id->text();
- QString str_add1=lineedit_address1_1->text();
- QString str_add2=lineedit_address1_2->text();
- QString str_add3=lineedit_address1_3->text();
- QString str_add4=lineedit_address1_4->text();
- QString str_add5=lineedit_address1_5->text();
- QString str_add6=lineedit_address1_6->text();
- QString str_add2_1=lineedit_address2_1->text();
- QString str_add2_2=lineedit_address2_2->text();
- QString str_add2_3=lineedit_address2_3->text();
- QString str_add2_4=lineedit_address2_4->text();
- QString str_add2_5=lineedit_address2_5->text();
- QString str_add2_6=lineedit_address2_6->text();
+ QString str_asso_id = lineedit_asso_id->text();
- fprintf( fptr,"%s\t",str_frm1.latin1() );
- fprintf( fptr,"%s\t",str_frm2.latin1() );
- fprintf( fptr,"%s\t",str_frm3.latin1() );
- fprintf( fptr,"%s\t",str_frm4.latin1() );
- fprintf( fptr,"%s\t",str_frm5.latin1() );
- fprintf( fptr,"%s\t",str_frm6.latin1() );
- fprintf( fptr,"%s\t",str_frm7.latin1() );
- fprintf( fptr,"%s\t",str_frm8.latin1() );
- fprintf( fptr,"%s\t",str_frm9.latin1() );
- fprintf( fptr,"%s\t",str_frm10.latin1() );
- fprintf( fptr,"%s\t",str_frm11.latin1() );
- fprintf( fptr,"%s\t",str_frm12.latin1() );
- fprintf( fptr,"%s\t",str_frm13.latin1() );
- fprintf( fptr,"%s\t",str_frm14.latin1() );
- fprintf( fptr,"%s\t",str_frm15.latin1() );
- fprintf( fptr,"%s\t",str_frm16.latin1() );
- fprintf( fptr,"%s\t",str_asso_id.latin1() );
- fprintf( fptr,"%s\t",str_add1.latin1() );
- fprintf( fptr,"%s\t",str_add2.latin1() );
- fprintf( fptr,"%s\t",str_add3.latin1() );
- fprintf( fptr,"%s\t",str_add4.latin1() );
- fprintf( fptr,"%s\t",str_add5.latin1() );
- fprintf( fptr,"%s\t",str_add6.latin1() );
+ QString str_add1 = lineedit_address1_1->text();
+ QString str_add2 = lineedit_address1_2->text();
+ QString str_add3 = lineedit_address1_3->text();
+ QString str_add4 = lineedit_address1_4->text();
+ QString str_add5 = lineedit_address1_5->text();
+ QString str_add6 = lineedit_address1_6->text();
- fprintf( fptr,"%s\t",str_add2_1.latin1() );
- fprintf( fptr,"%s\t",str_add2_2.latin1() );
- fprintf( fptr,"%s\t",str_add2_3.latin1() );
- fprintf( fptr,"%s\t",str_add2_4.latin1() );
- fprintf( fptr,"%s\t",str_add2_5.latin1() );
- fprintf( fptr,"%s\t",str_add2_6.latin1() );
+ QString str_add2_1 = lineedit_address2_1->text();
+ QString str_add2_2 = lineedit_address2_2->text();
+ QString str_add2_3 = lineedit_address2_3->text();
+ QString str_add2_4 = lineedit_address2_4->text();
+ QString str_add2_5 = lineedit_address2_5->text();
+ QString str_add2_6 = lineedit_address2_6->text();
- fclose( fptr );
+ fprintf(fptr, "%s\t", str_frm1.latin1());
+ fprintf(fptr, "%s\t", str_frm2.latin1());
+ fprintf(fptr, "%s\t", str_frm3.latin1());
+ fprintf(fptr, "%s\t", str_frm4.latin1());
+ fprintf(fptr, "%s\t", str_frm5.latin1());
+ fprintf(fptr, "%s\t", str_frm6.latin1());
+ fprintf(fptr, "%s\t", str_frm7.latin1());
+ fprintf(fptr, "%s\t", str_frm8.latin1());
+ fprintf(fptr, "%s\t", str_frm9.latin1());
+ fprintf(fptr, "%s\t", str_frm10.latin1());
+ fprintf(fptr, "%s\t", str_frm11.latin1());
+ fprintf(fptr, "%s\t", str_frm12.latin1());
+ fprintf(fptr, "%s\t", str_frm13.latin1());
+ fprintf(fptr, "%s\t", str_frm14.latin1());
+ fprintf(fptr, "%s\t", str_frm15.latin1());
+ fprintf(fptr, "%s\t", str_frm16.latin1());
+ fprintf(fptr, "%s\t", str_asso_id.latin1());
+ fprintf(fptr, "%s\t", str_add1.latin1());
+ fprintf(fptr, "%s\t", str_add2.latin1());
+ fprintf(fptr, "%s\t", str_add3.latin1());
+ fprintf(fptr, "%s\t", str_add4.latin1());
+ fprintf(fptr, "%s\t", str_add5.latin1());
+ fprintf(fptr, "%s\t", str_add6.latin1());
+
+ fprintf(fptr, "%s\t", str_add2_1.latin1());
+ fprintf(fptr, "%s\t", str_add2_2.latin1());
+ fprintf(fptr, "%s\t", str_add2_3.latin1());
+ fprintf(fptr, "%s\t", str_add2_4.latin1());
+ fprintf(fptr, "%s\t", str_add2_5.latin1());
+ fprintf(fptr, "%s\t", str_add2_6.latin1());
+
+ fclose(fptr);
}
#include "control_pspoll_cpp.moc"
Modified: frame_injection_g/trunk/src/control_pspoll_cpp.moc
===================================================================
--- frame_injection_g/trunk/src/control_pspoll_cpp.moc 2010-03-15 14:11:41 UTC (rev 238)
+++ frame_injection_g/trunk/src/control_pspoll_cpp.moc 2010-03-15 15:27:54 UTC (rev 239)
@@ -1,7 +1,7 @@
/****************************************************************************
** control_pspoll_cpp meta object code from reading C++ file 'control_pspoll_cpp.h'
**
-** Created: Mon Mar 15 17:04:30 2010
+** Created: Mon Mar 15 20:19:01 2010
** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $)
**
** WARNING! All changes made in this file will be lost!
Modified: frame_injection_g/trunk/src/inj_control_pspoll.h
===================================================================
--- frame_injection_g/trunk/src/inj_control_pspoll.h 2010-03-15 14:11:41 UTC (rev 238)
+++ frame_injection_g/trunk/src/inj_control_pspoll.h 2010-03-15 15:27:54 UTC (rev 239)
@@ -1,95 +1,94 @@
-/****************************************************************************
-** Form interface generated from reading ui file './inj_control_pspoll.ui'
-**
-** Created by User Interface Compiler
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-
-#ifndef INJ_CONTROL_PSPOLL_H
-#define INJ_CONTROL_PSPOLL_H
-
-#include <qvariant.h>
-#include <qwidget.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QSpacerItem;
-class QFrame;
-class QGroupBox;
-class QPushButton;
-class QLineEdit;
-class QLabel;
-
-class inj_control_pspoll : public QWidget
-{
- Q_OBJECT
-
-public:
- inj_control_pspoll( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
- ~inj_control_pspoll();
-
- QFrame* frame4;
- QGroupBox* groupBox2;
- QPushButton* pspoll_run_button;
- QPushButton* pspoll_mainwin_button;
- QPushButton* pspoll_clear_button;
- QPushButton* control_save_button;
- QPushButton* control_default_button;
- QGroupBox* groupBox1;
- QLineEdit* lineedit_frame_13;
- QLineEdit* lineedit_address2_6;
- QLineEdit* lineedit_address1_1;
- QLineEdit* lineedit_frame_9;
- QLabel* textLabel4;
- QLineEdit* lineedit_address1_2;
- QLineEdit* lineedit_frame_6;
- QLabel* bit_position;
- QLineEdit* lineedit_frame_2;
- QLineEdit* lineedit_address2_3;
- QLineEdit* lineedit_address2_1;
- QLineEdit* lineedit_address1_4;
- QLineEdit* lineedit_frame_10;
- QLineEdit* lineedit_frame_7;
- QLineEdit* lineedit_frame_4;
- QLineEdit* lineedit_frame_14;
- QLineEdit* lineedit_address1_6;
- QLineEdit* lineedit_address1_5;
- QLineEdit* lineedit_frame_11;
- QLineEdit* lineedit_frame_15;
- QLineEdit* lineedit_frame_3;
- QLineEdit* lineedit_address2_5;
- QLineEdit* lineedit_address1_3;
- QLineEdit* lineedit_frame_5;
- QLineEdit* lineedit_address2_4;
- QLabel* textLabel3_2;
- QLineEdit* lineedit_frame_12;
- QLineEdit* lineedit_address2_2;
- QLineEdit* lineedit_frame_16;
- QLineEdit* lineedit_frame_8;
- QLabel* textLabel1;
- QLabel* textLabel2_2;
- QLabel* textLabel2;
- QLabel* textLabel3;
- QLineEdit* lineedit_frame_1;
- QLineEdit* lineedit_asso_id;
- QGroupBox* groupBox3;
- QLineEdit* lineedit_testid;
-
-public slots:
- virtual void pspoll_run_click();
- virtual void pspoll_clear_click();
- virtual void pspoll_main_win();
- virtual void pspoll_save_click();
- virtual void pspoll_default_click();
-
-protected:
-
-protected slots:
- virtual void languageChange();
-
-};
-
-#endif // INJ_CONTROL_PSPOLL_H
-
+/****************************************************************************
+** Form interface generated from reading ui file './inj_control_pspoll.ui'
+**
+** Created by User Interface Compiler
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef INJ_CONTROL_PSPOLL_H
+#define INJ_CONTROL_PSPOLL_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QFrame;
+class QGroupBox;
+class QPushButton;
+class QLineEdit;
+class QLabel;
+
+class inj_control_pspoll : public QWidget
+{
+ Q_OBJECT
+
+public:
+ inj_control_pspoll( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~inj_control_pspoll();
+
+ QFrame* frame4;
+ QGroupBox* groupBox2;
+ QPushButton* pspoll_run_button;
+ QPushButton* pspoll_mainwin_button;
+ QPushButton* pspoll_clear_button;
+ QPushButton* control_save_button;
+ QPushButton* control_default_button;
+ QGroupBox* groupBox1;
+ QLineEdit* lineedit_frame_13;
+ QLineEdit* lineedit_address2_6;
+ QLineEdit* lineedit_address1_1;
+ QLineEdit* lineedit_frame_9;
+ QLabel* textLabel4;
+ QLineEdit* lineedit_address1_2;
+ QLineEdit* lineedit_frame_6;
+ QLabel* bit_position;
+ QLineEdit* lineedit_frame_2;
+ QLineEdit* lineedit_address2_3;
+ QLineEdit* lineedit_address2_1;
+ QLineEdit* lineedit_address1_4;
+ QLineEdit* lineedit_frame_10;
+ QLineEdit* lineedit_frame_7;
+ QLineEdit* lineedit_frame_4;
+ QLineEdit* lineedit_frame_14;
+ QLineEdit* lineedit_address1_6;
+ QLineEdit* lineedit_address1_5;
+ QLineEdit* lineedit_frame_11;
+ QLineEdit* lineedit_frame_15;
+ QLineEdit* lineedit_frame_3;
+ QLineEdit* lineedit_address2_5;
+ QLineEdit* lineedit_address1_3;
+ QLineEdit* lineedit_frame_5;
+ QLineEdit* lineedit_address2_4;
+ QLabel* textLabel3_2;
+ QLineEdit* lineedit_frame_12;
+ QLineEdit* lineedit_address2_2;
+ QLineEdit* lineedit_frame_16;
+ QLineEdit* lineedit_frame_8;
+ QLabel* textLabel1;
+ QLabel* textLabel2_2;
+ QLabel* textLabel2;
+ QLabel* textLabel3;
+ QLineEdit* lineedit_frame_1;
+ QLineEdit* lineedit_asso_id;
+ QGroupBox* groupBox3;
+ QLineEdit* lineedit_testid;
+
+public slots:
+ virtual void pspoll_run_click();
+ virtual void pspoll_clear_click();
+ virtual void pspoll_main_win();
+ virtual void pspoll_save_click();
+ virtual void pspoll_default_click();
+
+protected:
+
+protected slots:
+ virtual void languageChange();
+
+};
+
+#endif // INJ_CONTROL_PSPOLL_H
Modified: frame_injection_g/trunk/src/inj_mgmt_association_form.h
===================================================================
--- frame_injection_g/trunk/src/inj_mgmt_association_form.h 2010-03-15 14:11:41 UTC (rev 238)
+++ frame_injection_g/trunk/src/inj_mgmt_association_form.h 2010-03-15 15:27:54 UTC (rev 239)
@@ -1,159 +1,158 @@
-/****************************************************************************
-** Form interface generated from reading ui file './inj_mgmt_association_form.ui'
-**
-** Created by User Interface Compiler
-**
-** WARNING! All changes made in this file will be lost!
-****************************************************************************/
-
-#ifndef INJ_MGMT_ASSOCIATION_FORM_H
-#define INJ_MGMT_ASSOCIATION_FORM_H
-
-#include <qvariant.h>
-#include <qwidget.h>
-
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QSpacerItem;
-class QFrame;
-class QGroupBox;
-class QLineEdit;
-class QLabel;
-class QPushButton;
-class QCheckBox;
-
-class inj_mgmt_association_form : public QWidget
-{
- Q_OBJECT
-
-public:
- inj_mgmt_association_form( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
- ~inj_mgmt_association_form();
-
- QFrame* frame4;
- QGroupBox* groupBox1;
- QLineEdit* lineedit_frame_4;
- QLineEdit* lineedit_frame_3;
- QLabel* textLabel2_2;
- QLineEdit* lineedit_frame_2;
- QLabel* bit_position;
- QLineEdit* lineedit_address3_3;
- QLineEdit* lineedit_address3_1;
- QLineEdit* lineedit_address1_4;
- QLineEdit* lineedit_address1_3;
- QLineEdit* lineedit_address3_5;
- QLineEdit* lineedit_address2_3;
- QLineEdit* lineedit_address2_6;
- QLineEdit* lineedit_address2_5;
- QLineEdit* lineedit_address3_2;
- QLineEdit* lineedit_address3_4;
- QLineEdit* lineedit_address2_2;
- QLineEdit* lineedit_address1_6;
- QLineEdit* lineedit_address1_1;
- QLineEdit* lineedit_address3_6;
- QLineEdit* lineedit_address2_4;
- QLineEdit* lineedit_address1_5;
- QLineEdit* lineedit_address2_1;
- QLineEdit* lineedit_address1_2;
- QLineEdit* lineedit_NAV;
- QLineEdit* lineedit_frame_8;
- QLineEdit* lineedit_frame_6;
- QLineEdit* lineedit_frame_5;
- QLineEdit* lineedit_frame_7;
- QLabel* textLabel3_2;
- QLineEdit* lineedit_frame_1;
- QGroupBox* groupBox2;
- QLineEdit* lineedit_frag_no;
- QLineEdit* lineedit_seq_no;
- QLabel* textLabel1_2;
- QLabel* textLabel2_3;
- QLineEdit* lineedit_frame_11;
- QLineEdit* lineedit_frame_10;
- QLineEdit* lineedit_frame_9;
- QLineEdit* lineedit_frame_13;
- QLineEdit* lineedit_frame_12;
- QLineEdit* lineedit_frame_14;
- QLineEdit* lineedit_frame_15;
- QLineEdit* lineedit_frame_16;
- QLabel* textLabel1;
- QLabel* textLabel2;
- QLabel* textLabel3;
- QLabel* textLabel4;
- QLabel* textLabel4_2;
- QGroupBox* groupBox9;
- QPushButton* assoreq_run_button;
- QPushButton* assoreq_clear_button;
- QPushButton* assoreq_mainwin_button;
- QPushButton* assoreq_save_button;
- QPushButton* assoreq_default_button;
- QGroupBox* groupBox3;
- QLabel* textLabel3_3;
- QGroupBox* groupBox7;
- QLabel* textLabel1_4;
- QCheckBox* checkbox_srate_2;
- QCheckBox* checkbox_srate_3;
- QCheckBox* checkbox_srate_4;
- QCheckBox* checkbox_mand_2;
- QCheckBox* checkbox_mand_3;
- QCheckBox* checkbox_mand_4;
- QCheckBox* checkbox_srate_1;
- QCheckBox* checkbox_mand_1;
- QCheckBox* checkbox_mand_7;
- QCheckBox* checkbox_srate_8;
- QCheckBox* checkbox_mand_8;
- QCheckBox* checkbox_srate_6;
- QCheckBox* checkbox_mand_6;
- QCheckBox* checkbox_mand_5;
- QCheckBox* checkbox_srate_7;
- QCheckBox* checkbox_srate_5;
- QLabel* textLabel2_5;
- QGroupBox* groupBox8;
- QCheckBox* checkbox_mand_10;
- QCheckBox* checkbox_esrate_2;
- QCheckBox* checkbox_mand_9;
- QCheckBox* checkbox_mand_11;
- QCheckBox* checkbox_esrate_3;
- QLabel* textLabel1_4_2;
- QCheckBox* checkbox_mand_12;
- QCheckBox* checkbox_esrate_4;
- QCheckBox* checkbox_esrate_1;
- QLineEdit* lineedit_ssid;
- QLabel* textLabel2_4;
- QLabel* textLabel1_3;
- QLineEdit* lineedit_cap_info_13;
- QLineEdit* lineedit_cap_info_12;
- QLineEdit* lineedit_cap_info_1;
- QLineEdit* lineedit_cap_info_16;
- QLineEdit* lineedit_cap_info_15;
- QLineEdit* lineedit_cap_info_14;
- QLineEdit* lineedit_cap_info_2;
- QLineEdit* lineedit_cap_info_7;
- QLineEdit* lineedit_cap_info_5;
- QLineEdit* lineedit_cap_info_4;
- QLineEdit* lineedit_cap_info_9;
- QLineEdit* lineedit_cap_info_3;
- QLineEdit* lineedit_cap_info_8;
- QLineEdit* lineedit_cap_info_11;
- QLineEdit* lineedit_cap_info_10;
- QLineEdit* lineedit_cap_info_6;
- QLineEdit* lineedit_listen_interval;
- QGroupBox* groupBox3_2;
- QLineEdit* lineedit_testid;
-
-public slots:
- virtual void run_button_click();
- virtual void clear_button_click();
- virtual void mainwin_click();
- virtual void assoreq_save_click();
- virtual void assoreq_default_click();
-
-protected:
-
-protected slots:
- virtual void languageChange();
-
-};
-
-#endif // INJ_MGMT_ASSOCIATION_FORM_H
-
+/****************************************************************************
+** Form interface generated from reading ui file './inj_mgmt_association_form.ui'
+**
+** Created by User Interface Compiler
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef INJ_MGMT_ASSOCIATION_FORM_H
+#define INJ_MGMT_ASSOCIATION_FORM_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QFrame;
+class QGroupBox;
+class QLineEdit;
+class QLabel;
+class QPushButton;
+class QCheckBox;
+
+class inj_mgmt_association_form : public QWidget
+{
+ Q_OBJECT
+
+public:
+ inj_mgmt_association_form( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~inj_mgmt_association_form();
+
+ QFrame* frame4;
+ QGroupBox* groupBox1;
+ QLineEdit* lineedit_frame_4;
+ QLineEdit* lineedit_frame_3;
+ QLabel* textLabel2_2;
+ QLineEdit* lineedit_frame_2;
+ QLabel* bit_position;
+ QLineEdit* lineedit_address3_3;
+ QLineEdit* lineedit_address3_1;
+ QLineEdit* lineedit_address1_4;
+ QLineEdit* lineedit_address1_3;
+ QLineEdit* lineedit_address3_5;
+ QLineEdit* lineedit_address2_3;
+ QLineEdit* lineedit_address2_6;
+ QLineEdit* lineedit_address2_5;
+ QLineEdit* lineedit_address3_2;
+ QLineEdit* lineedit_address3_4;
+ QLineEdit* lineedit_address2_2;
+ QLineEdit* lineedit_address1_6;
+ QLineEdit* lineedit_address1_1;
+ QLineEdit* lineedit_address3_6;
+ QLineEdit* lineedit_address2_4;
+ QLineEdit* lineedit_address1_5;
+ QLineEdit* lineedit_address2_1;
+ QLineEdit* lineedit_address1_2;
+ QLineEdit* lineedit_NAV;
+ QLineEdit* lineedit_frame_8;
+ QLineEdit* lineedit_frame_6;
+ QLineEdit* lineedit_frame_5;
+ QLineEdit* lineedit_frame_7;
+ QLabel* textLabel3_2;
+ QLineEdit* lineedit_frame_1;
+ QGroupBox* groupBox2;
+ QLineEdit* lineedit_frag_no;
+ QLineEdit* lineedit_seq_no;
+ QLabel* textLabel1_2;
+ QLabel* textLabel2_3;
+ QLineEdit* lineedit_frame_11;
+ QLineEdit* lineedit_frame_10;
+ QLineEdit* lineedit_frame_9;
+ QLineEdit* lineedit_frame_13;
+ QLineEdit* lineedit_frame_12;
+ QLineEdit* lineedit_frame_14;
+ QLineEdit* lineedit_frame_15;
+ QLineEdit* lineedit_frame_16;
+ QLabel* textLabel1;
+ QLabel* textLabel2;
+ QLabel* textLabel3;
+ QLabel* textLabel4;
+ QLabel* textLabel4_2;
+ QGroupBox* groupBox9;
+ QPushButton* assoreq_run_button;
+ QPushButton* assoreq_clear_button;
+ QPushButton* assoreq_mainwin_button;
+ QPushButton* assoreq_save_button;
+ QPushButton* assoreq_default_button;
+ QGroupBox* groupBox3;
+ QLabel* textLabel3_3;
+ QGroupBox* groupBox7;
+ QLabel* textLabel1_4;
+ QCheckBox* checkbox_srate_2;
+ QCheckBox* checkbox_srate_3;
+ QCheckBox* checkbox_srate_4;
+ QCheckBox* checkbox_mand_2;
+ QCheckBox* checkbox_mand_3;
+ QCheckBox* checkbox_mand_4;
+ QCheckBox* checkbox_srate_1;
+ QCheckBox* checkbox_mand_1;
+ QCheckBox* checkbox_mand_7;
+ QCheckBox* checkbox_srate_8;
+ QCheckBox* checkbox_mand_8;
+ QCheckBox* checkbox_srate_6;
+ QCheckBox* checkbox_mand_6;
+ QCheckBox* checkbox_mand_5;
+ QCheckBox* checkbox_srate_7;
+ QCheckBox* checkbox_srate_5;
+ QLabel* textLabel2_5;
+ QGroupBox* groupBox8;
+ QCheckBox* checkbox_mand_10;
+ QCheckBox* checkbox_esrate_2;
+ QCheckBox* checkbox_mand_9;
+ QCheckBox* checkbox_mand_11;
+ QCheckBox* checkbox_esrate_3;
+ QLabel* textLabel1_4_2;
+ QCheckBox* checkbox_mand_12;
+ QCheckBox* checkbox_esrate_4;
+ QCheckBox* checkbox_esrate_1;
+ QLineEdit* lineedit_ssid;
+ QLabel* textLabel2_4;
+ QLabel* textLabel1_3;
+ QLineEdit* lineedit_cap_info_13;
+ QLineEdit* lineedit_cap_info_12;
+ QLineEdit* lineedit_cap_info_1;
+ QLineEdit* lineedit_cap_info_16;
+ QLineEdit* lineedit_cap_info_15;
+ QLineEdit* lineedit_cap_info_14;
+ QLineEdit* lineedit_cap_info_2;
+ QLineEdit* lineedit_cap_info_7;
+ QLineEdit* lineedit_cap_info_5;
+ QLineEdit* lineedit_cap_info_4;
+ QLineEdit* lineedit_cap_info_9;
+ QLineEdit* lineedit_cap_info_3;
+ QLineEdit* lineedit_cap_info_8;
+ QLineEdit* lineedit_cap_info_11;
+...
[truncated message content] |