diff --git a/p2p/protocol.go b/p2p/protocol.go
index fe359fc5496027dac4a38e78f89cfe04a4b2ef76..5fa395eda45cc390fdcb2a085b2edfac49592698 100644
--- a/p2p/protocol.go
+++ b/p2p/protocol.go
@@ -1,5 +1,7 @@
 package p2p
 
+import "fmt"
+
 // Protocol represents a P2P subprotocol implementation.
 type Protocol struct {
 	// Name should contain the official protocol name,
@@ -37,6 +39,10 @@ func (cap Cap) RlpData() interface{} {
 	return []interface{}{cap.Name, cap.Version}
 }
 
+func (cap Cap) String() string {
+	return fmt.Sprintf("%s/%d", cap.Name, cap.Version)
+}
+
 type capsByName []Cap
 
 func (cs capsByName) Len() int           { return len(cs) }