summaryrefslogtreecommitdiff
path: root/components/net/sal_socket/include
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/sal_socket/include')
-rw-r--r--components/net/sal_socket/include/sal.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/components/net/sal_socket/include/sal.h b/components/net/sal_socket/include/sal.h
index 8a9dd61b67..e1a6dbedba 100644
--- a/components/net/sal_socket/include/sal.h
+++ b/components/net/sal_socket/include/sal.h
@@ -82,8 +82,9 @@ struct sal_socket
struct proto_family
{
- int family; /* primary protocol families type*/
- int sec_family; /* secondary protocol families type*/
+ char name[RT_NAME_MAX];
+ int family; /* primary protocol families type */
+ int sec_family; /* secondary protocol families type */
int (*create)(struct sal_socket *sal_socket, int type, int protocol); /* register socket options */
struct hostent* (*gethostbyname) (const char *name);
@@ -92,10 +93,14 @@ struct proto_family
int (*getaddrinfo) (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res);
};
-/* SAL socket initialization */
+/* SAL(Socket Abstraction Layer) initialize */
int sal_init(void);
-int sal_proto_family_register(const struct proto_family *pf);
struct sal_socket *sal_get_socket(int sock);
+/* protocol family register and unregister operate */
+int sal_proto_family_register(const struct proto_family *pf);
+int sal_proto_family_unregister(const struct proto_family *pf);
+struct proto_family *sal_proto_family_find(const char *name);
+
#endif /* SAL_H__ */