Skip to content

Commit

Permalink
Docs: class diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
caser789 committed Apr 16, 2020
1 parent ff8a9b7 commit a34bbc6
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
59 changes: 57 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,60 @@
ethernet [![Build Status](https://travis-ci.org/caser789/ethernet.svg?branch=master)](https://travis-ci.org/caser789/ethernet)
[![GoDoc](https://godoc.org/github.com/caser789/ethernet?status.svg)](https://godoc.org/github.com/caser789/ethernet)
ethernet [![Build Status](https://travis-ci.org/caser789/ethernet.svg?branch=master)](https://travis-ci.org/caser789/ethernet)
[![GoDoc](https://godoc.org/github.com/caser789/ethernet?status.svg)](https://godoc.org/github.com/caser789/ethernet)
[![Go Report Card](https://goreportcard.com/badge/github.com/caser789/ethernet)](https://goreportcard.com/report/github.com/caser789/ethernet)
[![Coverage Status](https://coveralls.io/repos/caser789/ethernet/badge.svg?branch=master)](https://coveralls.io/r/caser789/ethernet?branch=master)
=====

![uml class diagram](./ethernet.png)

```
@startuml
title ethernet
class Frame {
+Destination net.HardwareAddr
+Source net.HardwareAddr
+VLAN []*VLAN
+EtherType EtherType
+Payload []byte
+MarshalBinary() []byte
+UnmarshalBinary([]byte)
+MarshalFCS() []byte
+UnmarshalFCS([]byte)
-read([]byte)
-length()
}
enum EtherType {
IPv4
ARP
IPv6
VLAN
}
enum Priority {
Background
BestEffort
ExcellentEffort
CriticalApplications
Video
Voice
InternetworkControl
NetworkControl
}
interface net.HardwareAddr {}
class VLAN {
+Priority
+DropEligible
+ID
+MarshalBinary() []byte
-read([]byte)
+UnmarshalBinary([]byte)
}
Frame *-- VLAN
@enduml
```
Binary file added ethernet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a34bbc6

Please sign in to comment.