Changeset b1213b0 in mainline for uspace/srv/net/udp/assoc.h


Ignore:
Timestamp:
2012-04-17T07:13:35Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
96c0b7b
Parents:
d76a329 (diff), 06a1d077 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge internet stack rewrite (IP+ICMP, UDP, IP over Ethernet).

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/udp/assoc.h

    rd76a329 rb1213b0  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2012 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libnet
     29/** @addtogroup udp
    3030 * @{
    3131 */
    32 
    33 /** @file
    34  * Ethernet protocol numbers according to the on-line IANA - Ethernet numbers
    35  * http://www.iana.org/assignments/ethernet-numbers
    36  * cited January 17 2009.
     32/** @file UDP associations
    3733 */
    3834
    39 #ifndef LIBNET_ETHERNET_PROTOCOLS_H_
    40 #define LIBNET_ETHERNET_PROTOCOLS_H_
     35#ifndef ASSOC_H
     36#define ASSOC_H
    4137
    4238#include <sys/types.h>
     39#include "udp_type.h"
    4340
    44 /** Ethernet protocol type definition. */
    45 typedef uint16_t eth_type_t;
     41extern udp_assoc_t *udp_assoc_new(udp_sock_t *, udp_sock_t *);
     42extern void udp_assoc_delete(udp_assoc_t *);
     43extern void udp_assoc_add(udp_assoc_t *);
     44extern void udp_assoc_remove(udp_assoc_t *);
     45extern void udp_assoc_addref(udp_assoc_t *);
     46extern void udp_assoc_delref(udp_assoc_t *);
     47extern void udp_assoc_set_foreign(udp_assoc_t *, udp_sock_t *);
     48extern void udp_assoc_set_local(udp_assoc_t *, udp_sock_t *);
     49extern int udp_assoc_send(udp_assoc_t *, udp_sock_t *, udp_msg_t *);
     50extern int udp_assoc_recv(udp_assoc_t *, udp_msg_t **, udp_sock_t *);
     51extern void udp_assoc_received(udp_sockpair_t *, udp_msg_t *);
    4652
    47 /** @name Ethernet protocols definitions */
    48 /*@{*/
    49 
    50 /** Ethernet minimal protocol number.
    51  * According to the IEEE 802.3 specification.
    52  */
    53 #define ETH_MIN_PROTO           0x0600 /* 1536 */
    54 
    55 /** Internet IP (IPv4) ethernet protocol type. */
    56 #define ETH_P_IP                0x0800
    57 
    58 /** ARP ethernet protocol type. */
    59 #define ETH_P_ARP               0x0806
    60 
    61 /*@}*/
    6253
    6354#endif
Note: See TracChangeset for help on using the changeset viewer.