Changeset 0773396 in mainline for uspace/lib/c/include/types/inet.h


Ignore:
Timestamp:
2013-12-25T13:05:25Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc54126c
Parents:
f4a47e52 (diff), 6946f23 (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 mainline changes

File:
1 moved

Legend:

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

    rf4a47e52 r0773396  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2012 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3030 * @{
    3131 */
    32 
    3332/** @file
    34  * Network device.
    3533 */
    3634
    37 #ifndef LIBC_NET_DEVICE_H_
    38 #define LIBC_NET_DEVICE_H_
     35#ifndef LIBC_TYPES_INET_H_
     36#define LIBC_TYPES_INET_H_
    3937
    40 #include <adt/int_map.h>
    41 #include <nic/nic.h>
     38#include <inet/addr.h>
     39#include <ipc/loc.h>
     40#include <sys/types.h>
    4241
    43 /** Device identifier to generic type map declaration. */
    44 #define DEVICE_MAP_DECLARE  INT_MAP_DECLARE
     42#define INET_TTL_MAX 255
    4543
    46 /** Device identifier to generic type map implementation. */
    47 #define DEVICE_MAP_IMPLEMENT  INT_MAP_IMPLEMENT
     44typedef struct {
     45        /** Local IP link service ID (optional) */
     46        service_id_t iplink;
     47        inet_addr_t src;
     48        inet_addr_t dest;
     49        uint8_t tos;
     50        void *data;
     51        size_t size;
     52} inet_dgram_t;
    4853
    49 /** Device identifier type. */
    50 typedef int nic_device_id_t;
     54typedef struct {
     55        int (*recv)(inet_dgram_t *);
     56} inet_ev_ops_t;
    5157
    52 /** Invalid device identifier. */
    53 #define NIC_DEVICE_INVALID_ID  (-1)
     58typedef enum {
     59        INET_DF = 1
     60} inet_df_t;
    5461
    5562#endif
Note: See TracChangeset for help on using the changeset viewer.