daemon designed to read short data bursts from weather stations transmitting over the Iridium satellite network
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
608 B
30 lines
608 B
#ifndef IMEI_SET_H
|
|
#define IMEI_SET_H
|
|
|
|
typedef struct
|
|
{
|
|
size_t sz;
|
|
size_t cp;
|
|
uint64_t imeis[];
|
|
} imei_set;
|
|
|
|
|
|
// Convert a string representation of an IMEI
|
|
// to a uint64_t
|
|
uint64_t imei_uint64(unsigned char *, size_t);
|
|
|
|
// Create a new IMEI set n size
|
|
imei_set* imei_set_new(size_t);
|
|
|
|
// Free existing imei set
|
|
void imei_set_free(imei_set *);
|
|
|
|
// Search an existing set for an IMEI,
|
|
// returns 1 if found, or 0 if not found
|
|
int imei_set_search(imei_set*, uint64_t);
|
|
|
|
// Adds IMEI to existing set,
|
|
// returns 0 on success, non-zero on failure
|
|
int imei_set_add(imei_set**, uint64_t);
|
|
|
|
#endif // IMEI_SET_H
|