Rev 3886 | Rev 4243 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3886 | Rev 3912 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * Copyright (c) 2008 Lukas Mejdrech |
2 | * Copyright (c) 2009 Lukas Mejdrech |
3 | * All rights reserved. |
3 | * All rights reserved. |
4 | * |
4 | * |
5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
7 | * are met: |
7 | * are met: |
Line 29... | Line 29... | ||
29 | /** @addtogroup arp |
29 | /** @addtogroup arp |
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | 32 | ||
33 | /** @file |
33 | /** @file |
- | 34 | * ARP protocol header. |
|
34 | */ |
35 | */ |
35 | 36 | ||
36 | #ifndef __NET_ARP_HEADER_H__ |
37 | #ifndef __NET_ARP_HEADER_H__ |
37 | #define __NET_ARP_HEADER_H__ |
38 | #define __NET_ARP_HEADER_H__ |
38 | 39 | ||
39 | #include <sys/types.h> |
40 | #include <sys/types.h> |
40 | 41 | ||
- | 42 | /** Type definition of an ARP protocol header. |
|
- | 43 | * @see arp_header |
|
- | 44 | */ |
|
41 | typedef struct arp_header arp_header_t; |
45 | typedef struct arp_header arp_header_t; |
- | 46 | ||
- | 47 | /** Type definition of an ARP protocol header pointer. |
|
- | 48 | * @see arp_header |
|
- | 49 | */ |
|
42 | typedef arp_header_t * arp_header_ref; |
50 | typedef arp_header_t * arp_header_ref; |
43 | 51 | ||
- | 52 | /** ARP protocol header. |
|
- | 53 | */ |
|
44 | struct arp_header{ |
54 | struct arp_header{ |
- | 55 | /** Hardware type identifier. |
|
- | 56 | * @see hardware.h |
|
- | 57 | */ |
|
45 | uint16_t hardware; |
58 | uint16_t hardware; |
- | 59 | /** Protocol identifier. |
|
- | 60 | */ |
|
46 | uint16_t protocol; |
61 | uint16_t protocol; |
- | 62 | /** Hardware address length in bytes. |
|
- | 63 | */ |
|
47 | uint8_t hardware_length; |
64 | uint8_t hardware_length; |
- | 65 | /** Protocol address length in bytes. |
|
- | 66 | */ |
|
48 | uint8_t protocol_length; |
67 | uint8_t protocol_length; |
- | 68 | /** ARP packet type. |
|
- | 69 | * @see arp_oc.h |
|
- | 70 | */ |
|
49 | uint16_t operation; |
71 | uint16_t operation; |
50 | }; |
72 | }; |
51 | 73 | ||
52 | #endif |
74 | #endif |
53 | 75 |