Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Berkeley sockets
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History and implementations== Berkeley sockets originated with the 4.2BSD [[Unix]] [[operating system]], released in 1983, as a programming interface. Not until 1989, however, could the [[University of California, Berkeley]] release versions of the operating system and networking library free from the licensing constraints of [[AT&T Corporation]]'s proprietary Unix. All modern operating systems implement a version of the Berkeley socket interface. It became the standard interface for applications running in the [[Internet]]. Even the [[Winsock]] implementation for MS Windows, created by unaffiliated developers, closely follows the standard. The BSD sockets API is written in the [[C (programming language)|C programming language]]. Most other programming languages provide similar interfaces, typically written as a [[wrapper library]] based on the C API.<ref>E. g. in the [[Ruby (programming language)|Ruby programming language]] [https://docs.ruby-lang.org/en/master/Socket.html class Socket ]</ref> ===BSD and POSIX sockets=== As the Berkeley socket API evolved and ultimately yielded the POSIX socket API,<ref>{{cite web|url=http://www.opengroup.org/onlinepubs/9699919799/functions/contents.html |title=β POSIX.1-2008 specification |publisher=Opengroup.org |access-date=2012-07-26}}</ref> certain functions were deprecated or removed and replaced by others. The POSIX API is also designed to be [[Reentrancy (computing)|reentrant]] and supports IPv6. {|class="wikitable" |- !Action !BSD !POSIX |- |Conversion from text address to packed address |inet_aton |inet_pton |- |Conversion from packed address to text address |inet_ntoa |inet_ntop |- |Forward lookup for host name/service |gethostbyname, gethostbyaddr, getservbyname, getservbyport |[[getaddrinfo]] |- |Reverse lookup for host name/service |gethostbyaddr, getservbyport |[[getnameinfo]] |} ===Alternatives=== The [[Streams (networking API)|STREAMS]]-based [[Transport Layer Interface]] (TLI) API offers an alternative to the socket API. Many systems that provide the TLI API also provide the Berkeley socket API. Non-Unix systems often expose the Berkeley socket API with a translation layer to a native networking API. [[Plan 9 from Bell Labs|Plan 9]]<ref>{{cite web|url=http://doc.cat-v.org/plan_9/4th_edition/papers/net/|title=The Organization of Networks in Plan 9}}</ref> and [[Genode]]<ref>{{cite web|url=https://genode.org/documentation/release-notes/17.02#Linux_TCP_IP_stack_as_VFS_plugin|title=Linux TCP/IP stack as VFS plugin}}</ref> use file-system APIs with control files rather than file-descriptors.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)