Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra Credit - Networking #38

Open
srujun opened this issue Nov 22, 2016 · 0 comments
Open

Extra Credit - Networking #38

srujun opened this issue Nov 22, 2016 · 0 comments
Assignees
Milestone

Comments

@srujun
Copy link
Owner

srujun commented Nov 22, 2016

This issue will keep track of things that will need to be done to implement Networking within MazeOS.

System Calls - from Beej's Networking Guide

1. getaddrinfo() (and freeaddrinfo())

Populates a linked list of connection information.

int
getaddrinfo(const char *node,    // e.g. "www.example.com" or IP
            const char *service, // e.g. "http" or port number
            const struct addrinfo *hints,
            struct addrinfo **res);

2. socket()

Creates the file descriptor to use when sending or receiving data.

int
socket(int domain, int type, int protocol);

3. connect()

Connects the socket to the remote host.

int
bind(int sockfd, struct sockaddr *my_addr, int addrlen);

4. send() and recv() - for TCP sockets

Sending and receiving data for stream sockets.

int
send(int sockfd, const void *msg, int len, int flags);

int
recv(int sockfd, void *buf, int len, int flags);

4. sendto() and recvfrom() - for UDP sockets

Sending and receiving data for datagram sockets.

int
sendto(int sockfd, const void *msg, int len, unsigned int flags, const struct sockaddr *to, socklen_t tolen);

int
recvfrom(int sockfd, void *buf, int len, unsigned int flags, struct sockaddr *from, int *fromlen);
@srujun srujun added this to the Checkpoint 5 milestone Nov 22, 2016
@srujun srujun self-assigned this Nov 22, 2016
@srujun srujun modified the milestones: Checkpoint 5, Extra Credit Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant