Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,80 @@
(lang dune 3.2)
(name rawlink)
(generate_opam_files)
(source (github haesbaert/rawlink))
(homepage https://github.com/haesbaert/rawlink)
(bug_reports https://github.com/haesbaert/rawlink/issues)
(documentation https://haesbaert.github.io/rawlink/)
(authors "Christiano F. Haesbaert <haesbaert@haesbaert.org>")
(maintainers "Christiano F. Haesbaert <haesbaert@haesbaert.org>")
(license "ISC")

(package
(name rawlink)
(synopsis "Portable library to read and write raw packets")
(description "Rawlink is an ocaml library for sending and receiving raw packets at the link
layer level. Sometimes you need to have full control of the packet, including
building the full ethernet frame.

The API is platform independent, it uses BPF on real UNIXes and AF_SOCKET on
linux. Some functionality is sacrificed so that the API is portable enough.

Currently BPF and AF_PACKET are implemented, including filtering capabilities.
Writing a BPF program is a pain in the ass, so no facilities are provided for
it. If you need a BPF filter, I suggest you write a small .c file with a
function that returns the BPF program as a string, check `rawlink_stubs.c` for
an example.")
(depends (ocaml (>= "4.09.0"))
(cstruct (>= "6.1.0"))
ppx_cstruct)
)

(package
(name rawlink-eio)
(synopsis "Portable library to read and write raw packets with EIO bindings")
(description "
Rawlink is an ocaml library for sending and receiving raw packets at the link
layer level. Sometimes you need to have full control of the packet, including
building the full ethernet frame.

The API is platform independent, it uses BPF on real UNIXes and AF_SOCKET on
linux. Some functionality is sacrificed so that the API is portable enough.

Currently BPF and AF_PACKET are implemented, including filtering capabilities.
Writing a BPF program is a pain in the ass, so no facilities are provided for
it. If you need a BPF filter, I suggest you write a small .c file with a
function that returns the BPF program as a string, check `rawlink_stubs.c` for
an example.

This version of Rawlink is to be used with Eio, the IO functions will produce
EIO effects.
")
(depends (ocaml (>= "5.0.0"))
(rawlink (>= "2.1"))
(eio (>= "0.4")))
)

(package
(name rawlink-lwt)
(synopsis "Portable library to read and write raw packets with Lwt bindings")
(description "
Rawlink is an ocaml library for sending and receiving raw packets at the link
layer level. Sometimes you need to have full control of the packet, including
building the full ethernet frame.

The API is platform independent, it uses BPF on real UNIXes and AF_SOCKET on
linux. Some functionality is sacrificed so that the API is portable enough.

Currently BPF and AF_PACKET are implemented, including filtering capabilities.
Writing a BPF program is a pain in the ass, so no facilities are provided for
it. If you need a BPF filter, I suggest you write a small .c file with a
function that returns the BPF program as a string, check `rawlink_stubs.c` for
an example.

This version of Rawlink is to be used with Lwt, the IO functions will produce
Lwt threads (promises).
")
(depends (ocaml (>= "4.09.0"))
(rawlink (>= "2.1"))
(lwt (>= "2.4.7")))
)
49 changes: 30 additions & 19 deletions rawlink-eio.opam
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "Christiano F. Haesbaert <haesbaert@haesbaert.org>"
authors: "Christiano F. Haesbaert <haesbaert@haesbaert.org>"
license: "ISC"
homepage: "https://github.com/haesbaert/rawlink"
bug-reports: "https://github.com/haesbaert/rawlink/issues"
dev-repo: "git+https://github.com/haesbaert/rawlink.git"
doc: "https://haesbaert.github.io/rawlink/"
build: [
[ "dune" "subst" ] {dev}
[ "dune" "build" "-p" name "-j" jobs ] ]
depends: [
"ocaml" {>= "5.0.0"}
"dune" {>= "3.2"}
"rawlink" {>= "2.1"}
"eio" {>= "0.4"}
]
depexts: [
["linux-headers"] {os-distribution = "alpine"}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We lose this in the generated opam, is it possible to add this in dune so it gets generated as well ?

(same for the other opam files)

]
synopsis: "Portable library to read and write raw packets with EIO bindings"
description: """

Rawlink is an ocaml library for sending and receiving raw packets at the link
layer level. Sometimes you need to have full control of the packet, including
building the full ethernet frame.
Expand All @@ -36,3 +19,31 @@ an example.
This version of Rawlink is to be used with Eio, the IO functions will produce
EIO effects.
"""
maintainer: ["Christiano F. Haesbaert <haesbaert@haesbaert.org>"]
authors: ["Christiano F. Haesbaert <haesbaert@haesbaert.org>"]
license: "ISC"
homepage: "https://github.com/haesbaert/rawlink"
doc: "https://haesbaert.github.io/rawlink/"
bug-reports: "https://github.com/haesbaert/rawlink/issues"
depends: [
"dune" {>= "3.2"}
"ocaml" {>= "5.0.0"}
"rawlink" {>= "2.1"}
"eio" {>= "0.4"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/haesbaert/rawlink.git"
49 changes: 30 additions & 19 deletions rawlink-lwt.opam
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "Christiano F. Haesbaert <haesbaert@haesbaert.org>"
authors: "Christiano F. Haesbaert <haesbaert@haesbaert.org>"
license: "ISC"
homepage: "https://github.com/haesbaert/rawlink"
bug-reports: "https://github.com/haesbaert/rawlink/issues"
dev-repo: "git+https://github.com/haesbaert/rawlink.git"
doc: "https://haesbaert.github.io/rawlink/"
build: [
[ "dune" "subst" ] {dev}
[ "dune" "build" "-p" name "-j" jobs ] ]
depends: [
"ocaml" {>= "4.09.0"}
"dune" {>= "3.2"}
"rawlink" {>= "2.1"}
"lwt" {>= "2.4.7"}
]
depexts: [
["linux-headers"] {os-distribution = "alpine"}
]
synopsis: "Portable library to read and write raw packets with Lwt bindings"
description: """

Rawlink is an ocaml library for sending and receiving raw packets at the link
layer level. Sometimes you need to have full control of the packet, including
building the full ethernet frame.
Expand All @@ -36,3 +19,31 @@ an example.
This version of Rawlink is to be used with Lwt, the IO functions will produce
Lwt threads (promises).
"""
maintainer: ["Christiano F. Haesbaert <haesbaert@haesbaert.org>"]
authors: ["Christiano F. Haesbaert <haesbaert@haesbaert.org>"]
license: "ISC"
homepage: "https://github.com/haesbaert/rawlink"
doc: "https://haesbaert.github.io/rawlink/"
bug-reports: "https://github.com/haesbaert/rawlink/issues"
depends: [
"dune" {>= "3.2"}
"ocaml" {>= "4.09.0"}
"rawlink" {>= "2.1"}
"lwt" {>= "2.4.7"}
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/haesbaert/rawlink.git"
51 changes: 30 additions & 21 deletions rawlink.opam
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
maintainer: "Christiano F. Haesbaert <haesbaert@haesbaert.org>"
authors: "Christiano F. Haesbaert <haesbaert@haesbaert.org>"
license: "ISC"
homepage: "https://github.com/haesbaert/rawlink"
bug-reports: "https://github.com/haesbaert/rawlink/issues"
dev-repo: "git+https://github.com/haesbaert/rawlink.git"
doc: "https://haesbaert.github.io/rawlink/"
build: [
[ "dune" "subst" ] {dev}
[ "dune" "build" "-p" name "-j" jobs ] ]
depends: [
"ocaml" {>= "4.09.0"}
"dune" {>= "3.2"}
"cstruct" {>= "6.1.0"}
"ppx_cstruct"
]
depexts: [
["linux-headers"] {os-distribution = "alpine"}
]
synopsis: "Portable library to read and write raw packets"
description: """
Rawlink is an ocaml library for sending and receiving raw packets at the link
Expand All @@ -31,5 +13,32 @@ Currently BPF and AF_PACKET are implemented, including filtering capabilities.
Writing a BPF program is a pain in the ass, so no facilities are provided for
it. If you need a BPF filter, I suggest you write a small .c file with a
function that returns the BPF program as a string, check `rawlink_stubs.c` for
an example.
"""
an example."""
maintainer: ["Christiano F. Haesbaert <haesbaert@haesbaert.org>"]
authors: ["Christiano F. Haesbaert <haesbaert@haesbaert.org>"]
license: "ISC"
homepage: "https://github.com/haesbaert/rawlink"
doc: "https://haesbaert.github.io/rawlink/"
bug-reports: "https://github.com/haesbaert/rawlink/issues"
depends: [
"dune" {>= "3.2"}
"ocaml" {>= "4.09.0"}
"cstruct" {>= "6.1.0"}
"ppx_cstruct"
"odoc" {with-doc}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/haesbaert/rawlink.git"