How to receive the datas?

Look:
the first I create socket sk:
sk=socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
and I fill data into Ip Head and Icmp Head,
then I sendto the packet,but I don't receive
any datas:
lenrecv=recvfrom(sk,buf,100,0,(struct sockaddr*)&addr,&rlen);
my codes run at the function recvfrom,but it
couldn't return variable lenrecv,and it look like down,
I want to know why?how to receive the data?
(I couldn't creat socket like this:
sk=socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
I want to know when I creat socket like this
sk=socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
How to receive datas?)

Last edited by joseperezc (2012-08-14 18:58:22)

Similar Messages

  • I am receiving the data through the rs232 in labview and i have to store the data in to the word file only if there is a change in the data and we have to scan the data continuasly how can i do that.

    i am receiving the data through the rs232 in labview and i have to store the data in to the word or text file only if there is a change in the data. I have to scan the data continuasly. how can i do that. I was able to store the data into the text or word file but could not be able to do it.  I am gettting the data from rs232 interms of 0 or 1.  and i have to print it only if thereis a change in data from 0 to 1. if i use if-loop , each as much time there is 0 or 1 is there that much time the data gets printed. i dont know how to do this program please help me if anybody knows the answer

    I have attatched the vi.  Here in this it receives the data from rs232 as string and converted into binery. and indicated in led also normally if the data 1 comes then the led's will be off.  suppose if 0 comes the corresponding data status is wrtten into the text file.  But here the problem is the same data will be printed many number of times.  so i have to make it like if there is a transition from 1 to o then only print it once.  how to do it.  I am doing this from few weeks please reply if you know the answer immediatly
    thanking you 
    Attachments:
    MOTORTESTJIG.vi ‏729 KB

  • How to receive the images / binary data t ype

    How to receive the images / binary data type in webdynpro....
    i have a website that let's the user send email, the email attachment and message are stored in both in images data type....
    q1) can i stored the message into binary data type...but the message is very long.....
    q2) if i have a textbox ...i surely will need to display the message  in string ,right ?
    [......... msg here ........]
    what is the codes to receive the images / binary data type in webdynpro....

    As in your previous post if you are storing them as BLOB object.. am sure you are able to get a byte stream or byte array(bytes[]) out of it.
    There should be some way to identify if its a image or a message BLOB. If its a image , convert into bytes and use 
       WDWebResource.getWebResource(bytes,resource type).getAbsoluteURL()
    to obtain the url.. assign this image UI element..
    In case its the message , use bytes.toString to get the message ..
    Regards
    Bharathwaj

  • How will u receive the data into XI when HTTP as sender?

    How will u receive the data into XI when HTTP as sender?

    Hi,
    There is no need to a Sender HTTP adapter, the URL that you are using from the source system to send data to XI will directly post into the integration server.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm
    Regards,
    Prakash

  • How to import the data to Data manager

    Hi All,
    I am new to MDM and need your help in handling the following issue
    In our setup we are sending the Customer master data from R/3->XI->MDM (R/3-> XI IDOCs,  XI->MDM XML files).
    with the help of extraction job in R/3 IDOCs r generated and XI has onverted these IDOCs to XML Files and created at MDM Server. Now my Question is how to import the Data from these XML files to Data Manager !!!!
    Note : Import Map settings are done already in the system.
    Can any one help me the steps requeired to get this data to Data manager .
    and am I need to do some activity in MDM to import the data to Data manager each and every time or is there any automatic way of doing this .
    Please guide me.
    Thanks in advance!

    Hi MDM User,
    Generally there are 2 cases while importing the data,
    1) Initial Load
    2) Delta Load
    Initial Load means importing the data into MDM at first time.This is usually done by manual importing
    without using import server.
    Delta Load means importing the data into MDM when we have changes to existing data or added new data
    to existing data.This is usually done by automatically using import server.
    To manually import the data,just create a remote system and port in console and login into import manager
    using remote system.Create ,save the map and execute the map.There is no other configurations needed.
    To automatically import the data without manual intervention,we go for import server.
    To let this happen we need to set some configuarations in mdis.ini file of import server.
    Give the repository name,username and password which are set in console for that repository and also
    give schedule time based on which import server picks the file from ready folder.
    Go to the import manager , change the map and import action depends on your requriment and save that
    map.
    and also you need to set port type as inbound and automatic and select the map which you saved earlier in
    MDM console.
    As soon as we start the import server, it picks the file from ready folder of MDM server based on
    configurations which we set in mdis.ini file and executes the map.
    Here i am giving complete path of ready folder.
    SAP MDM 5.5> Server>Distributions>bp1bocap080.bp.co_MSQL> BP3_PoC_Customer> Inbound>Siebel> SIEBEL_OB_CUS_SIEBELCUS01> Ready)
    This path has to be given in target directory of receiver communication channel of XI so that it puts XML
    file in the above path.
    For better understanding,go through below blogs.
    /people/balas.gorla/blog/2007/02/05/r3-xi-mdm-outbound-scenario
    /people/balas.gorla/blog/2006/09/27/mdm-xi-r3-integration
    Hope it helps
    Reward points,if found useful
    Thanks
    Narendra

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

  • How to download the data which is in the table?

    how to download the data which is in the table?
    every field data in the table i want to download and once the download is finished then i have to set the flag as 'download is finished ' as one field in table?
    can any one help me in this.
    Phani.
    Edited by: phani kumarDurusoju on Jan 9, 2008 6:36 AM

    One way is to Download the data Directly from the database table using the path SE11->Give table name ->Execute -> system ->List ->Save ->Local File
    There u can downlaad the data .
    The ither way is to use the code
    The Following Code will be helpfull to You
    Data :ITAB  TYPE TRUXS_T_TEXT_DATA,
            FILE  TYPE STRING.
             C_ASC     TYPE CHAR10   VALUE 'ASC',
    DATA: L_STATUS TYPE C,
           L_MESSAGE TYPE PMST_RAW_MESSAGE,
           L_SUBJECT TYPE SO_OBJ_DES.
    DATA: L_FILELENGTH TYPE I.
      PERFORM download_to_pc
                  TABLES
                     itab
                  USING
                     filename
                     c_asc
                     c_x
                  CHANGING
                     l_status
                     l_message
                     l_filelength.
    FORM DOWNLOAD_TO_PC TABLES   DOWNLOADTAB
                        USING    FILENAME
                                 FILETYPE TYPE CHAR10
                                 DELIMITED
                        CHANGING STATUS
                                 MESSAGE TYPE PMST_RAW_MESSAGE
                                 FILELENGTH TYPE I.
      DATA: L_FILE TYPE STRING,
            L_SEP.
      L_FILE = FILENAME.
      IF NOT DELIMITED IS INITIAL.
        L_SEP = 'X'.
      ENDIF.
      STATUS = 'S'.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = L_FILE
          FILETYPE                = FILETYPE
          WRITE_FIELD_SEPARATOR   = L_SEP
        IMPORTING
          FILELENGTH              = FILELENGTH
        TABLES
          DATA_TAB                = DOWNLOADTAB
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
        STATUS = 'E'.
        CASE SY-SUBRC.
          WHEN 1.
            MESSAGE = 'gui_download::file write error'.
          WHEN 2.
            MESSAGE = 'gui_download::no batch'.
          WHEN 3.
            MESSAGE = 'gui_download::gui refuse file transfer'.
          WHEN 4.
            MESSAGE = 'gui_download::invalid type'.
          WHEN 5.
            MESSAGE = 'gui_download::no authority'.
          WHEN 6.
            MESSAGE = 'gui_download::unknown error'.
          WHEN 7.
            MESSAGE = 'gui_download::header not allowed'.
          WHEN 8.
            MESSAGE = 'gui_download::separator not allowed'.
          WHEN 9.
            MESSAGE = 'gui_download::filesize not allowed'.
          WHEN 10.
            MESSAGE = 'gui_download::header too long'.
          WHEN 11.
            MESSAGE = 'gui_download::dp error create'.
          WHEN 12.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 13.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 14.
            MESSAGE = 'gui_download::ubknown dp error'.
          WHEN 15.
            MESSAGE = 'gui_download::access denied'.
          WHEN 16.
            MESSAGE = 'gui_download::dp out of memory'.
          WHEN 17.
            MESSAGE = 'gui_download::disk full'.
          WHEN 18.
            MESSAGE = 'gui_download::dp timeout'.
          WHEN 19.
            MESSAGE = 'gui_download::file not found'.
          WHEN 20.
            MESSAGE = 'gui_download::dataprovider exception'.
          WHEN 21.
            MESSAGE = 'gui_download::control flush error'.
          WHEN 22.
            MESSAGE = 'gui_download::Error'.
        ENDCASE.
      ENDIF.
    ENDFORM.             "download_to_pc
    At The End Reward points.
    Please it's Required.
    Thanks ,
    Rahul

  • How to add the date field in the dso and info cube

    Hi all.
    I am new to bi 7. in the earlier version v hav to button to add the date field. but in the bi 7 der is no option so can any body tell me how to add the date field in the data targets
    Thanks & Regard
    KK

    my prob is solved
    KK

  • How to read the data in excel sheet

    Dear sir,
    How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
    Cell A       Cell B
       A           Apple 
       B           Ball
       C           Cat
       D           Doll
    when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on.. 

    Hi, 
    I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached. 
    Trust this would help you solve the issue. 
    Regards, 
    Sagar G Yadav | Application Engineer | National Instruments
    Attachments:
    read_from_excel.vi ‏10 KB
    Book1.txt ‏1 KB

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

  • How to get the data from pcl2 cluster for TCRT table.

    Hi frndz,
    How to get the data from pcl2 cluster for tcrt table for us payroll.
    Thanks in advance.
    Harisumanth.Ch

    PL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
    ~Suresh

  • How to get the data from Pooled Table T157E.

    Hi Experts,
    How to get the data from Pooled Table T157E.
    Any help.
    Thanks in Advance,
    Ur's Harsha.

    create some internal table similar to T157E and pass all data as per SPRAS.
    After that use internal table in your program as per the requirement.
    Regds,
    Anil

  • How to bring the data from application server to presentation server

    hi,
    i have one problem,i have written the program which will open the files in the application server when we run the program in the background(sm37),the same data from application server i want to bring into presentation server in the format of (.csv),how to bring the data from application to presentation server can any body help me on this  topic.folowing is the code .
    *& Report  ZPFA_HIER_LOAD
    REPORT  ZFPA_HIER_LOAD.
    *---- Declaration of Oracle connectioN
    DATA con_name LIKE dbcon-con_name VALUE 'COMSHARE'.
    DATA: MFL1(9),MFL2(5),MFL3(9),MFL4(2),MFL5(8) TYPE c.
    DATA : mfilename type string.
    data: begin of matab1 occurs 0,
          MFL1(9) TYPE C,
          MFL2(5) TYPE C,
          MFL3(9) TYPE C,
          MFL4(2) TYPE C,
          MFL5(8) TYPE C  ,
         end of matab1 .
    data: setid(8) type c.
    data: begin of source occurs 0,
          setid(8) type c,
          end of source.
    *PARAMETERS : p_pfile LIKE filename-FILEEXTERN.
    *PARAMETERS : m_bsenty(8). " type c obligatory.
    *mfilename = P_PFILE.
    EXEC SQL.
      SET CONNECTION :con_name
    ENDEXEC.
    EXEC SQL.
      CONNECT TO :con_name
    ENDEXEC.
    EXEC SQL PERFORMING get_source.
      SELECT set_id FROM UNIT_SET INTO
      :setid
      ORDER BY SET_ID
    ENDEXEC.
    start-of-selection.
    LOOP AT SOURCE.
      REFRESH matab1. CLEAR matab1.
      EXEC SQL PERFORMING evaluate.
    SELECT TO_CHAR(MEM_ID),TRIM(TO_CHAR(MEM_PID)) FROM UNIT_TREE INTO :MFL1,
    :MFL5
    where set_id = :SOURCE-SETID ORDER BY MEM_ID
      ENDEXEC.
      if SOURCE-SETID = '80000000'.
       mfilename = '/tmp/aesorg'.
      elseif SOURCE-SETID = '80000006'.
       mfilename = '/tmp/Consolidation_Manager'.
      elseif SOURCE-SETID = '80000010'.
       mfilename = '/tmp/10org'.
      elseif SOURCE-SETID = '80000012'.
       mfilename = '/tmp/20org'.
      elseif SOURCE-SETID = '80000018'.
       mfilename = '/tmp/30org'.
      elseif SOURCE-SETID = '80000025'.
       mfilename = '/tmp/40org'.
      Endif.
      mfilename = '/usr/test.dat'.
    ************************This was i tried***********************
      open dataset mfilename for output in text mode encoding default." IN
    *TEXT MODE ENCODING DEFAULT.
    if sy-subrc <> 0.
    exit.
    endif.
    close dataset mfilename.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         FILENAME         = MFILENAME
         FILETYPE         = 'ASC'
       TABLES
         data_tab         = matab1
       EXCEPTIONS
         file_write_error = 1
         invalid_type     = 2
         no_authority     = 3
         unknown_error    = 4
         OTHERS           = 10.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
      clear matab1.
    ENDLOOP.
    loop at matab1 .
    transfer matab1 to mfilename.
    endloop.
    close dataset mfilename.
         MFL5 = '0'.
       CLEAR MFL5.
    FORM evaluate.
      if MFL5 = -1.
        MFL5 = ''.
      ENDIF.
      concatenate MFL1 ','   into MFL1.
      concatenate MFL1 ','   into MFL3.
      matab1-MFL1 = MFL1.
      matab1-MFL2 = 'ZBUE,'.
      matab1-MFL3 = MFL3.
      matab1-MFL4 = ' ,'.
      matab1-MFL5 = MFL5.
      append matab1 .
      CLEAR MFL1.
      CLEAR MFL2.
      CLEAR MFL3.
      CLEAR MFL4.
      CLEAR MFL5.
    ENDFORM.
                     "evaluate
    *&      Form  GET_SOURCE
          text
    FORM GET_SOURCE.
      source-setid = setid.
      append source.
      clear source.
    ENDFORM.                    "GET_SOURCE

    Hi Rammohan,
    You cannot use OPEN DATASET to transfer data from application server to presentation server.
    You can do the following :
    <b>Do 1st point in BACKGROUND</b>
    1. Read the data file from application server into an internal table using OPEN DATASET
    <b>Do 2nd point in Foreground</b>
    2. Once you get the data into an internal table, then use FM GUI_DOWNLOAD to download it on presentation server
    You cannot use the above 2 point together in Background because its not possible. Hence you need program it partially in background and partially in foreground.
    Best regards,
    Prashant

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

Maybe you are looking for