1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 21da177e4SLinus Torvalds /* 31da177e4SLinus Torvalds * Swansea University Computer Society NET3 41da177e4SLinus Torvalds * 51da177e4SLinus Torvalds * This work is derived from NET2Debugged, which is in turn derived 61da177e4SLinus Torvalds * from NET2D which was written by: 71da177e4SLinus Torvalds * Fred N. van Kempen, <[email protected]> 81da177e4SLinus Torvalds * 91da177e4SLinus Torvalds * This work was derived from Ross Biro's inspirational work 101da177e4SLinus Torvalds * for the LINUX operating system. His version numbers were: 111da177e4SLinus Torvalds * 121da177e4SLinus Torvalds * $Id: Space.c,v 0.8.4.5 1992/12/12 19:25:04 bir7 Exp $ 131da177e4SLinus Torvalds * $Id: arp.c,v 0.8.4.6 1993/01/28 22:30:00 bir7 Exp $ 141da177e4SLinus Torvalds * $Id: arp.h,v 0.8.4.6 1993/01/28 22:30:00 bir7 Exp $ 151da177e4SLinus Torvalds * $Id: dev.c,v 0.8.4.13 1993/01/23 18:00:11 bir7 Exp $ 161da177e4SLinus Torvalds * $Id: dev.h,v 0.8.4.7 1993/01/23 18:00:11 bir7 Exp $ 171da177e4SLinus Torvalds * $Id: eth.c,v 0.8.4.4 1993/01/22 23:21:38 bir7 Exp $ 181da177e4SLinus Torvalds * $Id: eth.h,v 0.8.4.1 1992/11/10 00:17:18 bir7 Exp $ 191da177e4SLinus Torvalds * $Id: icmp.c,v 0.8.4.9 1993/01/23 18:00:11 bir7 Exp $ 201da177e4SLinus Torvalds * $Id: icmp.h,v 0.8.4.2 1992/11/15 14:55:30 bir7 Exp $ 211da177e4SLinus Torvalds * $Id: ip.c,v 0.8.4.8 1992/12/12 19:25:04 bir7 Exp $ 221da177e4SLinus Torvalds * $Id: ip.h,v 0.8.4.2 1993/01/23 18:00:11 bir7 Exp $ 231da177e4SLinus Torvalds * $Id: loopback.c,v 0.8.4.8 1993/01/23 18:00:11 bir7 Exp $ 241da177e4SLinus Torvalds * $Id: packet.c,v 0.8.4.7 1993/01/26 22:04:00 bir7 Exp $ 251da177e4SLinus Torvalds * $Id: protocols.c,v 0.8.4.3 1992/11/15 14:55:30 bir7 Exp $ 261da177e4SLinus Torvalds * $Id: raw.c,v 0.8.4.12 1993/01/26 22:04:00 bir7 Exp $ 271da177e4SLinus Torvalds * $Id: sock.c,v 0.8.4.6 1993/01/28 22:30:00 bir7 Exp $ 281da177e4SLinus Torvalds * $Id: sock.h,v 0.8.4.7 1993/01/26 22:04:00 bir7 Exp $ 291da177e4SLinus Torvalds * $Id: tcp.c,v 0.8.4.16 1993/01/26 22:04:00 bir7 Exp $ 301da177e4SLinus Torvalds * $Id: tcp.h,v 0.8.4.7 1993/01/22 22:58:08 bir7 Exp $ 311da177e4SLinus Torvalds * $Id: timer.c,v 0.8.4.8 1993/01/23 18:00:11 bir7 Exp $ 321da177e4SLinus Torvalds * $Id: timer.h,v 0.8.4.2 1993/01/23 18:00:11 bir7 Exp $ 331da177e4SLinus Torvalds * $Id: udp.c,v 0.8.4.12 1993/01/26 22:04:00 bir7 Exp $ 341da177e4SLinus Torvalds * $Id: udp.h,v 0.8.4.1 1992/11/10 00:17:18 bir7 Exp $ 351da177e4SLinus Torvalds * $Id: we.c,v 0.8.4.10 1993/01/23 18:00:11 bir7 Exp $ 361da177e4SLinus Torvalds * $Id: wereg.h,v 0.8.4.1 1992/11/10 00:17:18 bir7 Exp $ 371da177e4SLinus Torvalds */ 381da177e4SLinus Torvalds #ifndef _LINUX_INET_H 391da177e4SLinus Torvalds #define _LINUX_INET_H 401da177e4SLinus Torvalds 411da177e4SLinus Torvalds #include <linux/types.h> 42b1a951feSSagi Grimberg #include <net/net_namespace.h> 43b1a951feSSagi Grimberg #include <linux/socket.h> 441da177e4SLinus Torvalds 45ce3b7e19SChuck Lever /* 46ce3b7e19SChuck Lever * These mimic similar macros defined in user-space for inet_ntop(3). 47ce3b7e19SChuck Lever * See /usr/include/netinet/in.h . 48ce3b7e19SChuck Lever */ 49ce3b7e19SChuck Lever #define INET_ADDRSTRLEN (16) 50ce3b7e19SChuck Lever #define INET6_ADDRSTRLEN (48) 51ce3b7e19SChuck Lever 52a2167dc6SAlexey Dobriyan extern __be32 in_aton(const char *str); 539a7c9337SPatrick McHardy extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); 549a7c9337SPatrick McHardy extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); 55b1a951feSSagi Grimberg 56b1a951feSSagi Grimberg extern int inet_pton_with_scope(struct net *net, unsigned short af, 57b1a951feSSagi Grimberg const char *src, const char *port, struct sockaddr_storage *addr); 58a470143fSSagi Grimberg extern bool inet_addr_is_any(struct sockaddr *addr); 59b1a951feSSagi Grimberg 601da177e4SLinus Torvalds #endif /* _LINUX_INET_H */ 61