c-multiaddr/include/multiaddr/protocols.h

36 lines
840 B
C
Raw Normal View History

2016-11-02 16:27:58 +00:00
#ifndef PROTOCOLS
#define PROTOCOLS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "varhexutils.h"
2016-11-02 16:27:58 +00:00
struct protocol
{
char hexcode[21];
int deccode;
int size;
char name[30];
};
2016-11-02 16:27:58 +00:00
struct protocol *protocol_P; //Pointer for holding multiple structures
int protocol_REMOVE_id(int remid); //Function to remove & shift back all data, sort of like c++ vectors.
2016-11-02 16:27:58 +00:00
void unload_protocols();
void load_protocols();
struct protocol * proto_with_name(char proto_w_name[]); //Search for protocol with inputted name
struct protocol * proto_with_deccode(int proto_w_deccode); //Search for protocol with inputted deccode
void pp(); //Purely for debugging purposes, prints the entire loaded protocols.
void protocols_with_string(char * meee,int sizi); // NOT FINISHED, DO NOT USE!
2016-11-02 16:27:58 +00:00
#endif