Sending  and recieving packets across network

In my work, I had to send raw packets across the network. I had developed a program in Java using Socket class. It is sending packets but not recieving any.
Please give me a solution for the same.

import java.net.*;
import java.io.*;
public class SocketExample
public static void main(String args[]) throws UnknownHostException
try{
byte b[] = new byte[20];
b[0] = 0x00;
b[1] = 0x6e;
b[2] = 0x04;
b[3] = 0x7f;
b[4] = 0x74;
b[5] = 0x5b;
b[6] = 0x7e;
b[7] = 0x72;
b[8] = 0x59;
b[9] = 0x7a;
b[10] = 0x00;
b[11] = 0x0e;
b[12] = 0x50;
b[13] = 0x00;
b[14] = 0x24;
b[15] = 0x00;
b[16] = 0x73;
b[17] = 0x2a;
b[18] = 0x00;
b[19] = 0x00;
InetAddress inet = InetAddress.getByName(args[0]);
Socket skt = new Socket(inet,1025);
skt.getOutputStream().write(b,0,19);
System.out.println("Written the bytes");
DataInputStream dis = new DataInputStream(skt.getInputStream());
byte c[] = new byte[20];
int k = dis.read(c,0,19);
System.out.println(k);
for(int i=0;i<20;i++)
     System.out.println(c);
}catch(IOException ioe){System.out.println(ioe);}
Hello ejb, is it now as you told? This code is also not working fully. Printing wtiittenbytes, then continous loop.
Prasanth.r

Similar Messages

  • Airplay disconnecting when sending and recieving a message

    I use Airplay on my iPhone to stream music from the music app to my Apple TV. When sending and recieving a message over Skype or Facebook, my phone disconnects from Airplay, pausing the music.
    Is this a common issue, and are there any known fixes, or do i just have to wait for Apple to fix this in a future update?

    That is silly - Facebook message notifications are tiny.  You can't provide some vague hand waving dismissal of the problem and blame network throughput.
    I have the same issue - it's obviously a bug with iOS or Facebook.  Airplay shouldn't disconnect every time a new message arrives.  If I don't have Facebook open the same messages still arrive in the background and airplay works fine.
    The issue is specific to a foreground app receiving notifications and then Airplay craps out.
    Come on Apple, fix this!

  • Since updating to iOS 6 I no longer can hear the send and recieve text sounds when texting

    Updated to IOS 6 yesterday and now I am having trouble hearing the text "swoosh" or whatever it is called while in a converstation the sound you hear when you send one or recieve one. Also when my phone is switched to vibrate mode when I receive a text message all my phone does is light up and it dosn't not vibrate which stinks cuz if it is my pocket I don't know if I'm getting a text message. I went into the message settings to try and set a vibrate tone for when recieveing a text and It won't even vibrate when I click on an option or click to create my own vibration pattern. My phone still however vibrates when I recieve an email or when someone calls me ect.... just not on texts and no sound when in a text conversation as in sent and recieved sounds. My sister, and both my parents updated to IOS 6 yesterday and they are having not probems of any sort? Anyone else have this problem and know of a solution? Ive already tried resetting my phone thinking maybe it was a glitch but still have the same problems.

    I figured out my problem...... I have custom text tones set up for certain ppl and had the default text tone set to "none" well with the iOS6 update it made it so if your default text tone is set on "none" then you won't hear what I call the send and recieve text sounds when in a converstation... if you change the default text tone to any text tone other than "none" you will get your send and recieve sounds back.... kinda annoying if you don't won't random texts from ppl waking you up... so I made a custon text tone that is called silence with just recording a few seconds of dead noise then edited it and turned all the sound levels down to 0 and set that as my default text tone.... now I have the send and recieve text sounds in a conversation and everything is fine! Sorry Nehucskter the first time I had this problem thats the first thing I did was reboot my phone.... first thing you do for everything lol....

  • I have my Dad's apple ID etc, but he has an iphone and i have an Ipod Touch then on IMessage i can read all the messages he recieves and sends and he can read all the messages i send and recieve how do i stop this?

    Hi
    I have my Dad's apple ID etc, but he has an iphone and i have an Ipod Touch then on IMessage i can read all the messages he recieves and sends and he can read all the messages i send and recieve how do i stop this? But i still want to send messages to him.
    Thank You

    . You do not need a seperate Apple ID. One one device you just need to go to Settings>Messages and add another/different Messaging email address and delete the common Apple ID address. Also see:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime

  • Sender and reciever tabs of a Business systems

    Hi,
    I use XI 3.0 TCC version.
    My doubt is reated Integration Directory.
    When i assign Business system XXXXXX.
    The sender and reciever tabs of the business systems are populated with some standard and user defined
    Name Namespace and Software component versions.
    and i want to know y does this happen.
    Thanks
    Pradeep

    Hi Pradeep,
      i have understood what is ur doubt.
    Suppose u want to create a Business system of type WebAS ABAP.
    When u create a BS it will ask for a Technical system and client associated with it.After filling this u can see the installed product and all the Software component associated with it.u can see this due to dependency.
    Thats why ..when u import the BS in ID .. u can see the SWCVs and the namespaces.
    Sometimes the BS is used as a sender and sometimes rcvr.
    Regards
    Biplab

  • My imessages are gone. i cant activate them now. When i go into send and recieve its only my e-mail address thats ticked and not my phone number ticked also. When i sign in with my apple ID it is ticked there. can anyone help me please.

    my imessages are gone. i cant activate them now. When i go into send and recieve its only my e-mail address thats ticked and not my phone number ticked also. When i sign in with my apple ID it is ticked there. can anyone help me please.

    Hi,
    Go to the iPhone
    GO to Settings > Messages
    Is the iPhone Number ticked to be enabled (It will be greyed out and not editable but should be On)
    If it is Off (Unticked remove the Apple ID)
    Place the iPhone in Airplane mode for a few minutes.
    Go back to Settings Messages and make sure the Message app Is Enabled overall.
    Check the iPhone Number is verifying.
    When Completed test by sending an iMessage to your Apple ID (Mac)
    If that works add back the Apple ID to the iPhone's Settings.
    Restart the Mac App and Accept the op ups that appear as to what the iPhone is using.
    9:52 pm      Friday; April 4, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • File and photo and video sending and recieving

    I have been able to send and recieve videos photos and files till today. i have the latest skype version. The only thing i did different today was when asked if i wanted to accept the file i said yes and ticked the box for "do not ask again'' ..can i reverse that? and will it solve my problem?..thank you 

    What version of Windows are you on (XP, Vista, Windows 7, Windows 8 )? Is it 32-bit or 64-bit?
    http://support.microsoft.com/kb/827218
    What is the version of Internet Explorer installed on your computer?
    In Internet Explorer go to Help -> About Internet Explorer.
    P.S. Please, don’t say that you are not using Internet Explorer. This is irrelevant. Skype depends on Internet Explorer.

  • My NEW ipod touch stopped sending and recieving messages!

    My NEW ipod touch stopped sending and recieving messages even though I am connected to the internet and all other internet apps are working just fine.  I am just replying to messages sent to me.  Any suggestions as to the solution?

    This one
    http://www.apple.com/support/itunes/

  • Sending and recieving photos

    Does anyone know how I get the capability to send and recieve photos using the IPhone, I have the 8GB and it is far from full?

    That would not work if I'm sending and receiving from a person without e-mail capability on their phone. I used to be able to take a picture with my phone and send it a friends cell phone, is that not an option?

  • Outbound IDOC - Sender and reciever

    Hello SDNites,
    I have created a report pgm which is equipped to send an outbound IDOC i.e used FM 'MASTER_IDOC_DISTRIBUTE'. Can someone please tell me how do I decide my sender and reciever when populating the control record in this FM.
    I know sender will be my system and reciver will be third party system but can you please tell me what values need to be opulated there or

    Thanks for the information,
    Can you please give the info in following form,
    1. Partner profile configuration with the values in your system.
    2. Code snippet where control records are poulated for Outbound IDOC with the values you specified in step 1.
    This will help me in understanding the same.
    Regards,
    Abhi

  • SAP TDMS add on setup on central/control , sender and reciever systems

    I found that SAP TDMS is shipped in the following add-ons:
    DMIS: Contains general functions, for example for the process monitor and for the technical data transfer
    DMIS_CNT: Contains TDMS-specific functions and some of the process types
    DMIS_EXT: For various additional process types (reduction scenarios) for SAP TDMS; currently, it contains only the process   type for business process library
    DMIS_BSC: For the process types to be used with SAP BI or CRM systems
    DMIS_HR: For the process types to be used in the context of SAP Human Capital Management (HCM)
    I have read TDMS master guide under section 3.4.1 Setting up the TDMS Server. There is a reference to SAP Note 970531 which is for DIMS setup and there is also reference to SAP note 970532 which is for DMIS_CNT setup.
    I would like to know if DMIS_EXT,DMIS_BSC and DMIS_HR need to be setup on TDMS central/control server , sender and reciever or only need to be setup on central/control server for respective scenario realization.
    Best Regards
    Mohammed Ashraf

    All the add-on components need to be installed in all the system (sender, receiver, central, control) in the landscape.

  • Node failed to join the cluster because it ould not send and receive failure detection network messages

    One of my customers has a Windows Server 2008 R2 cluster for an Exchange 2010 Mailbox Database Availability Group.  Lately, they've been having problems with one of their nodes (the one node that is on a different subnet in a different datacenter) where
    their Exchange databases aren't replicating.  While looking into this issue it seems that the problem is the Network Manager isn't started because the cluster service is failing.  Since the issue seems to be with the cluster service, and not Exchange,
    I'm asking here. 
    When the cluster service starts, it appears to start working, but within a few minutes the following is logged in the system event log.
    FailoverClustering
    1572
    Critical
    Cluster Virtual Adapter
    Node 'nodename' failed to join the cluster because it could not send and receive failure detection network messages with other cluster nodes. ...
    It seems that the problem is with the 169.254 address on the cluster virtual adapter.  An entry in the cluster.log file says: Aborting connection because NetFT route to node nodename on virtual IP 169.254.1.44:~3343~ has failed to come up. 
    In my experience, you never have to mess with the cluster virtual adapter.  I'm not sure what happened here, but I doubt it has been modified.  I need the cluster to communicate with its other nodes on our routed 10. network.  I've never experienced
    this before and found little in my searches on the subject.  Any idea how I can fix this?
    Thanks,
    Joe
    Joseph M. Durnal MCM: Exchange 2010 MCITP: Enterprise Messaging Administrator, Exchange 2010 MCITP: Enterprise Messaging Administrator, MCITP: Enterprise Administrator

    Hi,
    I suspected an issue with communication on UDP port 3343. Please confirm the set rules for port 3343 on all the nodes in firewall and enabled all connections for all the profiles
    in firewall on all the nodes are opened, or confirm the connectivity of all the node.
    Use ipconfig /flushdns to update all the node DNS register, then confirm the DNS in your DNS server entry is correct.
    The similar issue article:
    Exchange 2010 DAG - NetworkManager has not yet been initialized
    https://blogs.technet.com/b/dblanch/archive/2012/03/05/exchange-2010-dag-networkmanager-has-not-yet-been-initialized.aspx?Redirected=true
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Send and recieving emails

    Are there some VI's that give the posibility to send and reciev emails?

    The internet toolkit has vi's that allow you to send email pragmatically. It does not include vi's to receive emails. I did, however, find some utilities on NI's site that allows you to receive mail in the POP protocol. Both work well.

  • I don't seem to have the option to send and recieve SMS

    I don't seem to have the option to send and recieve SMS.  There are no options under "Settings"/ Messaging.  I used to be able to about a month ago or so but it has disappeared...

    Sorry, still no go.  I've even checked to make sure "pop ups" aren't blocked on either device.  I'm signed into iCloud, have the same wifi connection on both, Bluetooth is on, on both....but no pop up message on the iPad received yet...

  • I am new to the ethernet communicat​ion using labview. I do not have any hardware. I have two laptop i need to send and recieve the data via these 2 laptop using labview. Kindly help me on this.

    i am new to the ethernet communication using labview. I do not have any hardware. I have two laptop i need to send and recieve the data via these 2 laptop using labview. Kindly help me on this.
    Solved!
    Go to Solution.

    Hi thanks for the help.
    Actually i am trying to send 10 sine signals from server pc to client pc. So i will bundle 10 signals in server pc and send it and in client pc i am unbundling it and need to save in TDMS format.
    Till unbundling i was able to do. TDMS format it is saving only last value. I need to save all the values. Kindly help me on same. I am attaching both the VI.
    Attachments:
    Client.vi ‏62 KB
    Server.vi ‏252 KB

Maybe you are looking for

  • Bank Statement Interface

    I'm working at a site setting up Cash Management for the first time in the UK - they want to import bank statements using Barclays Business Manager software - the format that seems most useful is BAI - does anyone have the specification of the fields

  • How to Send RFQ output to Supplier

    Hi Gurus, I am researching the use of RFQ's in Purchasing in Oracle 11.5.10 or R12 I would like to know which request needs to be run to produce the RFQ output, how to send the soft copy of RFQ to supplier by emaill? Regards AK

  • Can only hear 1 audio track?

    I,m new to Elements 10 and have just started editing. I just dragged a clip onto my timeline but can only hear one audio channel. I know there are two tracks, how can I mix both through? thanks.  Darrell

  • Filter second selectOneChoice depending on choice in first selectOneChoice

    I have JSP page Report_start.jsp. On this page found 3 selectOneChoice. 1 - Country, 2 - Archive, 3 - Fund. First falling out list (country) is filled by class FillCountryComboBox, located in file FillCountryComboBox.java. Second falling out list (ar

  • Local Scenario: Invoice 'Error in Process'

    Hi We are implementing SRM5.0. Some product cat are defined as Extended Classic via a BADI whereas Local scenario has been defined for the rest. There is no problem with the extended classic process. When we create an invoice for a local product (whi