Go to the source code of this file.
Functions | |
| BOOL | authenticationFunctionRFCOMM (LPVOID *param, BLUETOOTH_DEVICE_INFO *bdi) |
| callback function for authenticating remote device | |
| int | checkEOL (char *text) |
| Checks wether null terminated string contains 13+10. | |
| int | checkIfNoFlagsSet (struct parseoptsOptionStruct myOpts) |
| Checks wether parseoptsOptionStruct has no flags set. | |
| int | checkString (char *text, char *target) |
| Checks wether null terminated string contains target string. | |
| void | cleanup (void) |
| cleanup | |
| BOOL | CtrlHandler (DWORD fdwCtrlType) |
| Handle control events. | |
| void | help (void) |
| Print helps. | |
| SOCKET | openChannel (char *address, int channel, BOOL silent) |
| Opens channel. | |
| printDataInHex (int length) | |
| Print out data in stdinBuffer in hex format. | |
| int | readAT (SOCKET sock, char *buffer, int bufferSize) |
| Reads AT channel. | |
| int | readFromStream (FILE *stream) |
| Reads from stream to stdinBuffer. | |
| void | scan (char *address) |
| Performs scan for each channel at target device. | |
| BOOL authenticationFunctionRFCOMM | ( | LPVOID * | param, | |
| BLUETOOTH_DEVICE_INFO * | bdi | |||
| ) |
callback function for authenticating remote device
Authentication callback function registered by opptool and called by system when remote device requsts authentication
| param | LPVOID*, Parameter from opptool given when registering the callback. | |
| bdi | BLUETOOTH_DEVICE_INFO*, Pointer to the bluetooth device info specifying the device which requests authentication |
| int checkEOL | ( | char * | text | ) |
Checks wether null terminated string contains 13+10.
Checks wether null terminated string contains 13+10
| text | char*, null terminated string |
| int checkIfNoFlagsSet | ( | struct parseoptsOptionStruct | myOpts | ) |
Checks wether parseoptsOptionStruct has no flags set.
This function goes through all the flags in parseoptsOptionStruct if no flag set then return value is 1. Otherwise 0.
| myOpts | parseoptsOptionStruct |
| int checkString | ( | char * | text, | |
| char * | target | |||
| ) |
Checks wether null terminated string contains target string.
Checks wether null terminated string contains target string
| text | char*, null terminated string | |
| target | char* null terminated string |
| void cleanup | ( | void | ) |
cleanup
Free memory, clean up socket and WinSock
| BOOL CtrlHandler | ( | DWORD | fdwCtrlType | ) |
Handle control events.
Currently handles Ctrl-C event. Which run program down gracefully.
| void help | ( | void | ) |
Print helps.
This function print help to the screen.
| SOCKET openChannel | ( | char * | address, | |
| int | channel, | |||
| BOOL | silent | |||
| ) |
Opens channel.
Opens socket in target address and channel
| address | char*, device address | |
| channel | int, channel number. Must be between 1..30 | |
| silent | BOOL, if true openChannel will not print out error messages |
| printDataInHex | ( | int | length | ) |
Print out data in stdinBuffer in hex format.
Prints out data in stdinBuffer in hex format
| length | int, Data length in buffer |
| int readAT | ( | SOCKET | sock, | |
| char * | buffer, | |||
| int | bufferSize | |||
| ) |
Reads AT channel.
Reads AT channel until 13+10 has received or Timeout happens
| sock | SOCKET, socket which is read | |
| buffer | char*, buffer where the data is read | |
| bufferSize | int, maximum buffer size |
| int readFromStream | ( | FILE * | stream | ) |
Reads from stream to stdinBuffer.
Reads stream to stdinBuffer. If buffer would overflow then reallocate will done.
| stream | *FILE |
| void scan | ( | char * | address | ) |
Performs scan for each channel at target device.
Performs scan for each channel at target device and tries to identify channel type.
| address | char*, Address to device |