This commit is contained in:
John Jones 2016-11-30 11:47:01 -05:00
commit 8553fcf6c1
6 changed files with 224 additions and 20 deletions

View file

@ -82,6 +82,10 @@
int IsTLD (char *s);
int IsDomain (char *s);
typedef struct s_DNSResolver {
// TODO
} DNSResolver;
int DNSResolverResolveOnce (DNSResolver *r, char **path, char *name);
int workDomain (int output, DNSResolver *r, char *name);
int parseEntry (char **Path, char *txt);

View file

@ -1,16 +1,20 @@
#ifndef IPFS_PATH_H
#define IPFS_PATH_H
char *ErrPath[] = {
NULL,
// ErrBadPath is returned when a given path is incorrectly formatted
"invalid 'ipfs ref' path",
// Paths after a protocol must contain at least one component
"path must contain at least one component",
"TODO: ErrCidDecode",
NULL,
"no link named %s under %s"
};
#ifdef IPFS_PATH_C
char *ErrPath[] = {
NULL,
// ErrBadPath is returned when a given path is incorrectly formatted
"invalid 'ipfs ref' path",
// Paths after a protocol must contain at least one component
"path must contain at least one component",
"TODO: ErrCidDecode",
NULL,
"no link named %s under %s"
};
#else
extern char **ErrPath;
#endif // IPFS_PATH_C
enum {
ErrBadPath = 1,