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
4 changes: 2 additions & 2 deletions src/main/java/org/filesys/netbios/NetBIOSDatagramSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public final void sendDatagram(NetBIOSDatagram dgram, InetAddress destAddr, int
throws IOException {

// Create a datagram packet using the NetBIOS datagram buffer
DatagramPacket pkt = new DatagramPacket(dgram.getBuffer(), dgram.getLength(), destAddr, destPort);
DatagramPacket pkt = new DatagramPacket(dgram.getBuffer(), dgram.getLength(), destAddr, RFCNetBIOSProtocol.DATAGRAM);

// Send the NetBIOS datagram
m_socket.send(pkt);
Expand All @@ -152,7 +152,7 @@ public final void sendBroadcastDatagram(NetBIOSDatagram dgram)
throws IOException {

// Create a datagram packet using the NetBIOS datagram buffer
DatagramPacket pkt = new DatagramPacket(dgram.getBuffer(), dgram.getLength(), m_broadcastAddr, m_defPort);
DatagramPacket pkt = new DatagramPacket(dgram.getBuffer(), dgram.getLength(), m_broadcastAddr, RFCNetBIOSProtocol.DATAGRAM);

// Send the NetBIOS datagram
m_socket.send(pkt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ private final boolean sendAddName(NetBIOSRequest req, InetAddress dest, boolean
addPkt.setFlags(0);

// Allocate the datagram packet, using the add name buffer
DatagramPacket pkt = new DatagramPacket(buf, len, dest, getPort());
DatagramPacket pkt = new DatagramPacket(buf, len, dest, RFCNetBIOSProtocol.NAMING);

// Send the add name request
if (m_socket != null)
Expand Down Expand Up @@ -385,7 +385,7 @@ private final boolean sendRefreshName(NetBIOSRequest req, InetAddress dest, bool
refreshPkt.setFlags(0);

// Allocate the datagram packet, using the refresh name buffer
DatagramPacket pkt = new DatagramPacket(buf, len, dest, getPort());
DatagramPacket pkt = new DatagramPacket(buf, len, dest, RFCNetBIOSProtocol.NAMING);

// Send the refresh name request
if (m_socket != null)
Expand Down Expand Up @@ -430,7 +430,7 @@ private final boolean sendDeleteName(NetBIOSRequest req, InetAddress dest, boole
delPkt.setFlags(0);

// Allocate the datagram packet, using the add name buffer
DatagramPacket pkt = new DatagramPacket(buf, len, dest, getPort());
DatagramPacket pkt = new DatagramPacket(buf, len, dest, RFCNetBIOSProtocol.NAMING);

// Send the add name request
if (m_socket != null)
Expand Down Expand Up @@ -1502,7 +1502,7 @@ protected final void sendPacket(NetBIOSPacket nbpkt, int len)
throws java.io.IOException {

// Allocate the datagram packet, using the add name buffer
DatagramPacket pkt = new DatagramPacket(nbpkt.getBuffer(), len, NetworkSettings.getBroadcastAddress(), getPort());
DatagramPacket pkt = new DatagramPacket(nbpkt.getBuffer(), len, NetworkSettings.getBroadcastAddress(), RFCNetBIOSProtocol.NAMING);

// Send the datagram packet
m_socket.send(pkt);
Expand Down