caucyj / protobuf-wireshark

Automatically exported from code.google.com/p/protobuf-wireshark
Apache License 2.0
0 stars 0 forks source link

Failure to read .proto file which really does exist and works OK in the Java code generator (protoc). #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. start wireshark (built from source)

What is the expected output? What do you see instead?

I expect to see no errors from the protobuf-wireshark dissector.

Instead I see:

filename to import /home/chris/protobuf/pbtest/src/addressbook.proto
Error in file /home/chris/protobuf/pbtest/src/addressbook.proto at 
line/col:-1/0File not found.
Unable to parse /home/chris/protobuf/pbtest/src/addressbook.proto
Couldnt get descriptor from addressbook.conf

and the dissector does not work.

What version of the product are you using? On what operating system?

protobuf-wireshark-runtime-0.1
libprotoc 2.4.1
wireshark 1.6.4

Please provide any additional information below.

Here is the console...

chris@chris-linux-desktop:~/protobuf/wireshark$ bin/wireshark
filename to import /home/chris/protobuf/pbtest/src/addressbook.proto
Error in file /home/chris/protobuf/pbtest/src/addressbook.proto at 
line/col:-1/0File not found.
Unable to parse /home/chris/protobuf/pbtest/src/addressbook.proto
Couldnt get descriptor from addressbook.conf

// Wireshark GUI appears at this point... exit manually.

chris@chris-linux-desktop:~/protobuf/wireshark$ ls -lA 
/home/chris/protobuf/pbtest/src/addressbook.proto
-rw-r--r-- 1 chris chris 472 2012-01-03 10:56 
/home/chris/protobuf/pbtest/src/addressbook.proto

chris@chris-linux-desktop:~/protobuf/wireshark$ cat 
/home/chris/protobuf/pbtest/src/addressbook.proto
package tutorial;

option java_package = "pbtest";
option java_outer_classname = "AddressBookProtos";

message Person {
  required string name = 1;
  required int32 id = 2;
  optional string email = 3;

  enum PhoneType {
    MOBILE = 0;
    HOME = 1;
    WORK = 2;
  }

  message PhoneNumber {
    required string number = 1;
    optional PhoneType type = 2 [default = HOME];
  }

  repeated PhoneNumber phone = 4;
}

message AddressBook {
  repeated Person person = 1;
}

Original issue reported on code.google.com by cms...@gmail.com on 3 Jan 2012 at 12:28

GoogleCodeExporter commented 8 years ago
I have found a work-around:

Put a copy of yourfile.proto file in $HOME/.wireshark/protobuf/
and reference simply as yourfile.proto (with no path) in  
$HOME/.wireshark/protobuf/yourfile.conf

Original comment by cms...@gmail.com on 4 Jan 2012 at 10:24

GoogleCodeExporter commented 8 years ago
The proto file paths are relative to protobuf config directory so as cmsdew 
suggested place your proto in that dir or create a link to actual path. 

Original comment by dear.c...@gmail.com on 9 Oct 2012 at 4:00

GoogleCodeExporter commented 8 years ago

Original comment by dear.c...@gmail.com on 12 Oct 2012 at 2:33