summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/nbtscan
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/nbtscan')
-rw-r--r--net-analyzer/nbtscan/Manifest1
-rw-r--r--net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch15
-rw-r--r--net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch42
-rw-r--r--net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch119
-rw-r--r--net-analyzer/nbtscan/metadata.xml5
-rw-r--r--net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild30
6 files changed, 212 insertions, 0 deletions
diff --git a/net-analyzer/nbtscan/Manifest b/net-analyzer/nbtscan/Manifest
new file mode 100644
index 00000000000..e52b8f9eeda
--- /dev/null
+++ b/net-analyzer/nbtscan/Manifest
@@ -0,0 +1 @@
+DIST nbtscan-1.5.1.tar.gz 82107 SHA256 f9f95d5555356c8d467a576e69d9d348bf2a821ded9a85f895b5e6d21e2aa7eb SHA512 2e2ac6a3ce7b188552c4f5f82b1e2bb99049bd0cd6f69361c59066c0b262d9311186aabc0c03c3096b7d2c48276052b1ddf230eba43051e221019c9bf223ae3e WHIRLPOOL 21c41ed7f21bc60d1949b814eb3e38d45971c9eff67b2dfc6054b3b9f16310733252ae5e75a15b6c698a194dc5c4f4fab0fc754ffddbe36957662d6c109e1b1c
diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch
new file mode 100644
index 00000000000..dbf2457bc29
--- /dev/null
+++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-gentoo.patch
@@ -0,0 +1,15 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,10 +11,10 @@
+ BINDIR = @bindir@
+
+ nbtscan: $(OBJECTS)
+- $(CC) $(CFLAGS) -o nbtscan $(OBJECTS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o nbtscan $(OBJECTS) $(LIBS)
+
+ install:
+- $(INSTALL) $(TARGET) $(BINDIR)/$(TARGET)
++ $(INSTALL) $(TARGET) $(DESTDIR)/$(BINDIR)/$(TARGET)
+
+ nbtscan.o: nbtscan.c statusq.h range.h list.h
+ $(CC) $(CFLAGS) $(DEFS) -c nbtscan.c
diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch
new file mode 100644
index 00000000000..a585d4495fb
--- /dev/null
+++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-includes-declarations.patch
@@ -0,0 +1,42 @@
+--- a/list.h
++++ b/list.h
+@@ -19,3 +19,5 @@
+ int compare(struct list_item* item1, struct list_item* item2);
+
+ int insert(struct list* lst, unsigned long content);
++
++int in_list(struct list* lst, unsigned long content);
+--- a/nbtscan.c
++++ b/nbtscan.c
+@@ -5,6 +5,8 @@
+ #include <stdlib.h>
+ #include <sys/time.h>
+ #include <string.h>
++#include <ctype.h>
++#include <unistd.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+--- a/statusq.h
++++ b/statusq.h
+@@ -103,4 +103,10 @@
+ char* service_name;
+ } nb_service_t ;
+
++char* getnbservicename(my_uint8_t service, int unique, char* name);
++
++struct nb_host_info* parse_response(char* buff, int buffsize);
++
++int send_query(int sock, struct in_addr dest_addr, my_uint32_t rtt_base);
++
+ #endif /* STATUSQ_H */
+--- a/statusq.c
++++ b/statusq.c
+@@ -29,6 +29,7 @@
+ #include <sys/time.h>
+ #include "statusq.h"
+ #include <string.h>
++#include <ctype.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ #include "errors.h"
diff --git a/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch b/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch
new file mode 100644
index 00000000000..4aca976dcd3
--- /dev/null
+++ b/net-analyzer/nbtscan/files/nbtscan-1.5.1-script-whitespace.patch
@@ -0,0 +1,119 @@
+--- a/nbtscan.c
++++ b/nbtscan.c
+@@ -86,7 +86,7 @@
+ int d_print_hostinfo(struct in_addr addr, const struct nb_host_info* hostinfo) {
+ int i;
+ unsigned char service; /* 16th byte of NetBIOS name */
+- char name[16];
++ char comp_name[16];
+
+ printf("\nPacket dump for Host %s:\n\n", inet_ntoa(addr));
+ if(hostinfo->is_broken) printf("Incomplete packet, %d bytes long.\n", hostinfo->is_broken);
+@@ -110,9 +110,9 @@
+ printf("Names received:\n");
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+- strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
+- printf("%-17s Service: 0x%02x Flags: 0x%04x\n", name, service, hostinfo->names[i].rr_flags);
++ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
++ comp_name[15]=0;
++ printf("%-17s Service: 0x%02x Flags: 0x%04x\n", comp_name, service, hostinfo->names[i].rr_flags);
+ }
+ };
+
+@@ -147,9 +147,9 @@
+
+
+ int v_print_hostinfo(struct in_addr addr, const struct nb_host_info* hostinfo, char* sf, int hr) {
+- int i, unique;
++ int i, j, unique;
+ my_uint8_t service; /* 16th byte of NetBIOS name */
+- char name[16];
++ char comp_name[16];
+ char* sname;
+
+ if(!sf) {
+@@ -163,20 +163,27 @@
+ if(hostinfo->header && hostinfo->names) {
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+- strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
++ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
++
++ // Eliminate trailing spaces
++ for(j=0; j < 15; j++) {
++ if (comp_name[j] == ' ')
++ break;
++ }
++ comp_name[j] = 0;
++
+ unique = !(hostinfo->names[i].rr_flags & 0x0080);
+ if(sf) {
+- printf("%s%s%s%s", inet_ntoa(addr), sf, name, sf);
+- if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name));
++ printf("%s%s%s%s", inet_ntoa(addr), sf, comp_name, sf);
++ if(hr) printf("%s\n", (char*)getnbservicename(service, unique, comp_name));
+ else {
+ printf("%02x", service);
+ if(unique) printf("U\n");
+ else printf("G\n");
+ }
+ } else {
+- printf("%-17s", name);
+- if(hr) printf("%s\n", (char*)getnbservicename(service, unique, name));
++ printf("%-17s", comp_name);
++ if(hr) printf("%s\n", (char*)getnbservicename(service, unique, comp_name));
+ else {
+ printf("<%02x>", service);
+ if(unique) printf(" UNIQUE\n");
+@@ -199,7 +206,7 @@
+ };
+
+ int print_hostinfo(struct in_addr addr, struct nb_host_info* hostinfo, char* sf) {
+- int i;
++ int i,j;
+ unsigned char service; /* 16th byte of NetBIOS name */
+ char comp_name[16], user_name[16];
+ int is_server=0;
+@@ -215,7 +222,13 @@
+ if(service == 0 && unique && first_name) {
+ /* Unique name, workstation service - this is computer name */
+ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
+- comp_name[15] = 0;
++
++ // Eliminate trailing spaces
++ for(j=0; j < 15; j++) {
++ if (comp_name[j] == ' ')
++ break;
++ }
++ comp_name[j] = 0;
+ first_name = 0;
+ };
+ if(service == 0x20 && unique) {
+@@ -252,7 +265,7 @@
+ /* If l is true adds #PRE to each line of output (for lmhosts) */
+
+ int l_print_hostinfo(struct in_addr addr, struct nb_host_info* hostinfo, int l) {
+- int i;
++ int i,j;
+ unsigned char service; /* 16th byte of NetBIOS name */
+ char comp_name[16];
+ int is_server=0;
+@@ -268,7 +281,13 @@
+ if(service == 0 && unique && first_name) {
+ /* Unique name, workstation service - this is computer name */
+ strncpy(comp_name, hostinfo->names[i].ascii_name, 15);
+- comp_name[15]=0;
++
++ // Eliminate trailing spaces
++ for(j=0; j < 15; j++) {
++ if (comp_name[j] == ' ')
++ break;
++ }
++ comp_name[j] = 0;
+ first_name = 0;
+ };
+ };
+
diff --git a/net-analyzer/nbtscan/metadata.xml b/net-analyzer/nbtscan/metadata.xml
new file mode 100644
index 00000000000..03aa50bab7e
--- /dev/null
+++ b/net-analyzer/nbtscan/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild b/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild
new file mode 100644
index 00000000000..b3110596d59
--- /dev/null
+++ b/net-analyzer/nbtscan/nbtscan-1.5.1-r3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="NBTscan is a program for scanning IP networks for NetBIOS name information"
+HOMEPAGE="http://www.inetcat.net/software/nbtscan.html"
+SRC_URI="http://www.sourcefiles.org/Networking/Tools/Miscellanenous/${P}.tar.gz"
+SRC_URI="http://www.inetcat.net/software/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+S=${WORKDIR}/${P}a
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-includes-declarations.patch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-script-whitespace.patch
+}
+
+src_install () {
+ dobin ${PN}
+ dodoc ChangeLog README
+}