include/linux/inet.h

Source file repositories/reference/linux-study-clean/include/linux/inet.h

File Facts

System
Linux kernel
Corpus path
include/linux/inet.h
Extension
.h
Size
2708 bytes
Lines
61
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _LINUX_INET_H
#define _LINUX_INET_H

#include <linux/types.h>
#include <net/net_namespace.h>
#include <linux/socket.h>

/*
 * These mimic similar macros defined in user-space for inet_ntop(3).
 * See /usr/include/netinet/in.h .
 */
#define INET_ADDRSTRLEN		(16)
#define INET6_ADDRSTRLEN	(48)

extern __be32 in_aton(const char *str);
extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);
extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end);

extern int inet_pton_with_scope(struct net *net, unsigned short af,
		const char *src, const char *port, struct sockaddr_storage *addr);
bool inet_addr_is_any(struct sockaddr_storage *addr);

#endif	/* _LINUX_INET_H */

Annotation

Implementation Notes