Gammu internals  1.38.0
gsmnet.c File Reference
#include <string.h>
#include <gammu-info.h>
#include "gsmnet.h"
#include "../misc/coding/coding.h"
Include dependency graph for gsmnet.c:

Go to the source code of this file.

Functions

const unsigned char * GSM_GetNetworkName (const char *NetworkCode)
 
const unsigned char * GSM_GetCountryName (const char *CountryCode)
 
void NOKIA_EncodeNetworkCode (unsigned char *buffer, const char *input)
 
void NOKIA_DecodeNetworkCode (const unsigned char *buffer, char *output)
 

Variables

const GSM_CodeName GSM_Countries []
 
const GSM_CodeName GSM_Networks []
 

Function Documentation

§ NOKIA_DecodeNetworkCode()

void NOKIA_DecodeNetworkCode ( const unsigned char *  buffer,
char *  output 
)

Definition at line 2473 of file gsmnet.c.

References DecodeBCD().

Referenced by GSM_DecodeMultiPartSMS().

2474 {
2475  DecodeBCD(output, buffer, 3);
2476  output[6] = output[5];
2477  output[5] = output[4];
2478  output[4] = output[3];
2479  output[3] = ' ';
2480 }
void DecodeBCD(unsigned char *dest, const unsigned char *src, size_t len)
Definition: coding.c:328

§ NOKIA_EncodeNetworkCode()

void NOKIA_EncodeNetworkCode ( unsigned char *  buffer,
const char *  input 
)

Definition at line 2467 of file gsmnet.c.

References EncodeBCD(), and FALSE.

Referenced by GSM_EncodeMultiPartSMS().

2468 {
2469  EncodeBCD(buffer, input, 6, FALSE);
2470  buffer[1] = buffer[1] | 0xf0;
2471 }
void EncodeBCD(unsigned char *dest, const unsigned char *src, size_t len, gboolean fill)
Definition: coding.c:342
#define FALSE
Definition: gammu-types.h:25