mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-20 17:44:20 +08:00
[at][sal] Add query and unregistered protocol family functions
This commit is contained in:
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user