~as-s/helenos/ipv6

« back to all changes in this revision

Viewing changes to uspace/srv/net/inetsrv/inet_std.h

  • Committer: Anthony Steinhauser
  • Date: 2013-07-08 01:07:36 UTC
  • Revision ID: as@strmilov.cz-20130708010736-pbvrszhamp0v64ez
HelenOS networking stack supports IPv6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright (c) 2012 Jiri Svoboda
 
3
 * Copyright (c) 2013 Antonin Steinhauser
3
4
 * All rights reserved.
4
5
 *
5
6
 * Redistribution and use in source and binary forms, with or without
39
40
 
40
41
#include <sys/types.h>
41
42
 
42
 
/** Internet Datagram header (fixed part) */
 
43
/** IPv4 Datagram header (fixed part) */
43
44
typedef struct {
44
45
        /** Version, Internet Header Length */
45
46
        uint8_t ver_ihl;
89
90
        FF_FRAGOFF_l = 0
90
91
};
91
92
 
 
93
/** IPv6 Datagram header (fixed part) */
 
94
typedef struct {
 
95
        /** Version, Traffic class first 4 bits */
 
96
        uint8_t ver_tc;
 
97
        /** Traffic class (the rest), Flow label */
 
98
        uint8_t tc_fl [3];
 
99
        /* Payload length */
 
100
        uint16_t payload_len;
 
101
        /** Next header */
 
102
        uint8_t next;
 
103
        /** Hop limit */
 
104
        uint8_t hop_limit;
 
105
        /** Source address */
 
106
        uint8_t src_addr [16];
 
107
        /** Destination address */
 
108
        uint8_t dest_addr [16];
 
109
} ip6_header_t;
 
110
 
92
111
/** Fragment offset is expressed in units of 8 bytes */
93
112
#define FRAG_OFFS_UNIT 8
94
113