Changeset fab2746 in mainline for uspace/lib/c/include/inet/endpoint.h


Ignore:
Timestamp:
2015-04-08T21:25:30Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
99ea91b2
Parents:
ba0eac5
Message:

New transport layer API. Only UDP implemented.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/inet/endpoint.h

    rba0eac5 rfab2746  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2015 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2828
    2929/** @addtogroup libc
    30  *  @{
     30 * @{
     31 */
     32/** @file
    3133 */
    3234
    33 /** @file
    34  * Internet protocol numbers according to the on-line IANA - Assigned Protocol
    35  * numbers:
    36  *
    37  * http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
    38  */
     35#ifndef LIBC_INET_ASSOC_H_
     36#define LIBC_INET_ASSOC_H_
    3937
    40 #ifndef LIBC_IP_PROTOCOLS_H_
    41 #define LIBC_IP_PROTOCOLS_H_
     38#include <stdint.h>
     39#include <inet/addr.h>
     40#include <loc.h>
    4241
    43 /** @name IP protocols definitions */
    44 /*@{*/
     42/** Internet endpoint (address-port pair), a.k.a. socket */
     43typedef struct {
     44        inet_addr_t addr;
     45        uint16_t port;
     46} inet_ep_t;
    4547
    46 #define IPPROTO_ICMP    1
    47 #define IPPROTO_TCP     6
    48 #define IPPROTO_UDP     17
    49 #define IPPROTO_ICMPV6  58
     48/** Internet endpoint pair */
     49typedef struct {
     50        service_id_t local_link;
     51        inet_ep_t local;
     52        inet_ep_t remote;
     53} inet_ep2_t;
    5054
    51 /*@}*/
     55extern void inet_ep_init(inet_ep_t *);
     56extern void inet_ep2_init(inet_ep2_t *);
    5257
    5358#endif
Note: See TracChangeset for help on using the changeset viewer.