DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th April 2018
Scripter Scripter is offline
Port Guard
 
Join Date: Apr 2018
Posts: 12
Default tcptrack or equivalent

Hey everyone,

On Linux, I use a utility called tcptrack to monitor connections on the fly. I use it because it groups connections based on ip and port, updates the status, and removes the connection when it ends. Whereas tcpdump/{wire,t}shark output comprehensive, and logs everything, tcptrack gives more of an overview. tcpdump is more like a film reel, whereas tcptrack is like watching the movie.
https://4.bp.blogspot.com/-W4UnvlrNa...KY/s1600/1.png

I've tried compiling it, but it complains about not finding ethernet.h, and I can't find anything about that online, either.

My question is, is there any way to either:
a) use existing utilities to produce the same output as tcptrack, or
b) compile tcptrack (or obtain ethernet.h)
Reply With Quote
  #2   (View Single Post)  
Old 27th April 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Hello, and welcome!

I don't know anything about tcptrack, but Ethernet.h is included with the arduino package.

Alternative applications may include pftop and even the venerable systat(1).
Reply With Quote
  #3   (View Single Post)  
Old 27th April 2018
Scripter Scripter is offline
Port Guard
 
Join Date: Apr 2018
Posts: 12
Default

Thanks! I'm going to check that out when I get home. Pure n00b question, but how were you able to determine that ethernet.h was in that package?
Reply With Quote
  #4   (View Single Post)  
Old 27th April 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It's a good question, and not noobish at all.

I cheat.

I have pkglocatedb installed. The pkglocate command really helps!
Reply With Quote
  #5   (View Single Post)  
Old 4th May 2018
Scripter Scripter is offline
Port Guard
 
Join Date: Apr 2018
Posts: 12
Default

Quote:
Originally Posted by jibberjabber
I have pkglocatedb installed. The pkglocate command really helps!
Good to know -- thanks for sharing!

Quote:
I don't know anything about tcptrack, but Ethernet.h is included with the arduino package.
I took your advice and installed the arduino package. However, it didn't contain the correct ethernet.h; digging deeper, it appears that a folder called "net" should have been available with the source code folder. I need to try building this on Linux, but I'm wondering if the cloned repo is incomplete.
Reply With Quote
  #6   (View Single Post)  
Old 4th May 2018
TronDD TronDD is offline
Spam Deminer
 
Join Date: Sep 2014
Posts: 304
Default

You're deeper into software porting territory here. You can't just take any old ethernet.h file.

Seems that is a linux header file which is not part of OpenBSD. If you look in a linux ethernet.h then grep around for the structs and constants in /usr/include/net on OpenBSD, you'll find them defined in various other includes. You would need to include those files in place of ethernet.h and the includes it includes if needed.

OpenBSD may not provide the expected functionality at all. This is when porting gets a little more tedious.
Reply With Quote
  #7   (View Single Post)  
Old 4th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

There is a pkg-readme for arduino which may help. If that doesn't help, I recommend reaching out to the ports@ mailing list, since there is no $MAINTAINER defined for arduino at this time.
Reply With Quote
  #8   (View Single Post)  
Old 4th May 2018
Scripter Scripter is offline
Port Guard
 
Join Date: Apr 2018
Posts: 12
Default

Quote:
Originally Posted by TronDD
Seems that [ethernet.h] is a linux header file which is not part of OpenBSD. If you look in a linux ethernet.h then grep around for the structs and constants in /usr/include/net on OpenBSD, you'll find them defined in various other includes.
Thanks for your response! I just want to make sure I'm understanding this correctly: on a Linux system, I "should" be able to find ethernet.h in a kernel header folder. Is this correct?
Quote:
Originally Posted by jggimi
There is a pkg-readme for arduino which may help.
I think TronDD is implying that ethernet.h may be a linux-specific file, and the one in the arduino package may be a red herring. I'm keeping note of it in case it contains clues for porting.

Thank you guys for the responses and guidance.
Reply With Quote
  #9   (View Single Post)  
Old 4th May 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Congratulations Scripter, you have a port now:
https://github.com/jasperla/openbsd-...r/net/tcptrack

Go edit the Makefile and add your info to the MAINTAINER line and submit it to the ports@ mailing list.
Reply With Quote
Old 4th May 2018
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

On my Slackware Linux system, the only ethernet.h file comes from the glibc package.
Reply With Quote
Old 4th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

ibara's recommended patch/patch-src_headers_h solves the ethernet.h dilemma.
Reply With Quote
Old 4th May 2018
Scripter Scripter is offline
Port Guard
 
Join Date: Apr 2018
Posts: 12
Default

Quote:
Originally Posted by ibara View Post
Congratulations Scripter, you have a port now:
https://github.com/jasperla/openbsd-...r/net/tcptrack

Go edit the Makefile and add your info to the MAINTAINER line and submit it to the ports@ mailing list.
https://preview.ibb.co/bMLub7/goldblum.jpg
Where is the donate button so I can buy you a case of beer or something?
This is awesome, thank you a millionfold.
Reply With Quote
Old 4th May 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

I don't take payment for this stuff. But if you really want to, my paypal is callab3rpi & gmail ! com
People have tossed me money in the past, which is always weird to me, but I guess I'm not one to stop people from doing so.
Reply With Quote
Old 4th May 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Oh, and use your real name (or a good enough pseudonym) for your MAINTAINER name. A MAINTAINER name of "Scripter on Daemonforums" isn't gonna work. (Looking at: https://github.com/souperdoupe/crunk...track/Makefile)
Reply With Quote
Old 18th May 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Hey, Scripter. I see you've posted the port to the ports@ mailing list. Two things I noticed:


1. You missed ibara's advice above regarding your $MAINTAINER string.


2. The GitHub repository from which the port was built is no longer available. It appears to have been deleted.
Reply With Quote
Old 18th May 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Yes, you will need to change the MAINTAINER line.
GH_ACCOUNT should be bchretien
Also, you should tar up the directory itself. As in, when you run tar xzf on the tarball, it should produce a new directory with all the files inside it, not dump all the files to $CWD.
Reply With Quote
Old 23rd June 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

This has still not been committed to the ports tree.
Why not?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unison equivalent of rsync --inplace Oko General software and network 0 27th April 2016 11:43 PM
equivalent to freebsd fetch pbd OpenBSD General 9 7th August 2009 11:45 AM
OpenSolaris equivalent of systrace? DraconianTimes Solaris 9 31st January 2009 05:36 AM
Remastersys FreeBSD equivalent? businessgeeks FreeBSD General 2 4th August 2008 01:44 PM
FreeBSD equivalent of DOS's fdisk /mbr Nobber FreeBSD General 5 3rd June 2008 07:19 AM


All times are GMT. The time now is 02:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick